lexpredict-contraxsuite-deploy
lexpredict-contraxsuite-deploy copied to clipboard
The SECRET_KEY setting must not be empty
I am using ubuntu 16.04. I have generated a key online for django from http://www.miniwebtool.com/django-secret-key-generator/ then input in the /opt/lexpredict-contraxsuite/contraxsuite_services/settings.py as ( SECRET_KEY = "yj6o@&vrar6^l1u68!bxugj@xr4&5)zzk!h1qw&13^&@2d3wp#") and also in /opt/lexpredict-contraxsuite-deploy/local/local_settings.py files. after following all the steps of local machine installation setup mentioned in https://github.com/LexPredict/lexpredict-contraxsuite/blob/master/documentation/Installation%20and%20Configuration/Quick%20Start%20Installation%20Guide%20for%20Linux.pdf I am executing the following commad: bash setup_local.sh | tee -a log.txt
after few steps of exection, I am getting the following error: django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty
need help to resolve this. I don't know where I am doing mistake.
Currently we use docker based approach for application deployment, see https://github.com/LexPredict/lexpredict-contraxsuite/tree/master/docker
We had a lot of changes since we used lexpredict-contraxsuite-deploy for deployment last time. I made some important updates there and it should work now. So please update it using git pull and try again.
But I would recommend to use docker.
@reddalexx : Even after taking the update of 'lexpredict-contraxsuite-deploy' using git pull, I am facing the same issue. Below is the stack trace.
$ /opt/ve/bin/celery multi restart worker -A apps -B -Q serial --concurrency=1 -Ofair -l DEBUG -n beat@%h ->
[localhost] out: celery multi v4.2.0 (windowlicker)
[localhost] out: Traceback (most recent call last):
[localhost] out: File "/opt/ve/lib/python3.5/site-packages/celery/app/utils.py", line 365, in find_app
[localhost] out: found = sym.app
[localhost] out: AttributeError: module 'apps' has no attribute 'app'
[localhost] out:
[localhost] out: During handling of the above exception, another exception occurred:
[localhost] out:
[localhost] out: Traceback (most recent call last):
[localhost] out: File "/opt/ve/lib/python3.5/site-packages/celery/app/utils.py", line 370, in find_app
[localhost] out: found = sym.celery
[localhost] out: AttributeError: module 'apps' has no attribute 'celery'
[localhost] out:
[localhost] out: During handling of the above exception, another exception occurred:
[localhost] out:
[localhost] out: Traceback (most recent call last):
[localhost] out: File "/opt/ve/lib/python3.5/site-packages/celery/app/utils.py", line 359, in find_app
[localhost] out: sym = symbol_by_name(app, imp=imp)
[localhost] out: File "/opt/ve/lib/python3.5/site-packages/celery/bin/base.py", line 504, in symbol_by_name
[localhost] out: return imports.symbol_by_name(name, imp=imp)
[localhost] out: File "/opt/ve/lib/python3.5/site-packages/kombu/utils/imports.py", line 61, in symbol_by_name
[localhost] out: return getattr(module, cls_name) if cls_name else module
[localhost] out: AttributeError: module 'apps' has no attribute 'celery'
[localhost] out:
[localhost] out: During handling of the above exception, another exception occurred:
[localhost] out:
[localhost] out: Traceback (most recent call last):
[localhost] out: File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
[localhost] out: "main", mod_spec)
[localhost] out: File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
[localhost] out: exec(code, run_globals)
[localhost] out: File "/opt/ve/lib/python3.5/site-packages/celery/main.py", line 20, in
Fatal error: run() received nonzero return code 1 while executing!
Requested: /opt/ve/bin/celery multi restart worker -A apps -B -Q serial --concurrency=1 -Ofair -l DEBUG -n beat@%h Executed: /bin/bash -l -c "cd /opt/lexpredict-contraxsuite/contraxsuite_services >/dev/null && /opt/ve/bin/celery multi restart worker -A apps -B -Q serial --concurrency=1 -Ofair -l DEBUG -n beat@%h"
Aborting. Disconnecting from localhost... done.
That means that probably local_setting.py template wasn't transfered into destination folder.
go to deploy folder cd lexpredict-contraxsuite-deploy
activate virtual environment source ve/bin/activate
run fab -c local/fabricrc upload_template_and_reload:settings to apply local settings
run fab -c local/fabricrc start to start application
then open browser at localhost
@reddalexx: As per your suggestion, I have tried the docker setup and followed the steps mentioned here: https://github.com/LexPredict/lexpredict-contraxsuite/tree/master/docker
But it didn't load the Contraxsuite application at http://localhost:65080
I have used a Clean Ubuntu 16.04 machine having more than 8GB RAM. Below are the screenshots attached of the step by step execution.

@reddalexx: Any update on the above issue?
@SandeepKumarJoshi @reddalexx I am having the same issues. For the first approach "lexpredict-contraxsuite-deploy", i used the script to copy the settings but then I ran to celery issue that is the application could not find "apps" worker. The second approach docker also does not work. The dockers are deployed but it shows the same errors for me as @SandeepKumarJoshi . Any help would suffice. Thanks.
I ran into the same issue: The SECRET_KEY setting must not be empty Udpate base/fabricrc with the SECRET Key SECRET_KEY = <secret key without @ to be specified without key>
Application is now up with few other issues like Email verification and Super User Account but was able to fix that.