Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script fails during database structure creation #50

Closed
Fabian-RY opened this issue Nov 23, 2021 · 2 comments
Closed

Install script fails during database structure creation #50

Fabian-RY opened this issue Nov 23, 2021 · 2 comments

Comments

@Fabian-RY
Copy link

Yesterday, on 22th november I tried to install iSkyLims on a fresh Ubuntu 20.04 with the install.sh script. However, the installation failed while trying to create the database structure. I ran the installation script following the docs. This was the error, in which python found a non-initialized variable in settings.py

imagen

Given that it was the data about the email server that i specified in the conf file of the install script, i checked if the data was updated to settings.py correctly, and it wasn't. In particular, the password file of the email server and the use of tls of the same server were updated with localhost, which it doesn't make sense in this field. The script failed because the value of the EMAIL_USE_TLS is defined as variable. This variable was never initialized, therefore giving the error.

imagen

The dummy values are substituted by a chain of sed commands, in which the first one searches for emailhost and substitutes them all... while the other ones also include emailhost as part of the word to substitute. The first sed will change all emailhost it founds... making all the others sed commands (such as the one which changes emailhostpass or emailhosttls ) not to found the correct pattern and thus not giving the correct data.

imagen

I added an extra sed command that puts a False value to the EMAIL_USE_TLS variable instead of the current value and then the installation ended successfully. iSkyLims can be accessed through localhost in the web browser. The database information it seemed to be correct, and only the email data is affected, as iSkyLIMS worked after solving this problem: registration of the admin user worked correctly and it's able to log in.

The problem is, in fact, that the first sed changes all instances of emailhost, while the next seek for emailhostpass and similar constructions that are changed after the first sed command is run.

@luissian
Copy link
Member

Thanks for helping us to debug the script.
I will create a hot fix to solve this issue.

luissian added a commit that referenced this issue Dec 23, 2021
@luissian
Copy link
Member

Corrected in hotfix 2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants