spender-sandbox / cuckoo-modified

Modified edition of cuckoo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gunicorn issue with cuckoo "SECRET_KEY must not be empty"

DigiAngel opened this issue · comments

So I have this running fine elsewhere, but not able to get this to work with unicorn 19.7.1:. From the web dir:

gunicorn  -b 127.0.0.1:8000 web.wsgi

here's my result:

[2017-11-02 14:54:59 +0000] [3321] [INFO] Starting gunicorn 19.7.1
[2017-11-02 14:54:59 +0000] [3321] [INFO] Listening at: http://127.0.0.1:8000 (3321)
[2017-11-02 14:54:59 +0000] [3321] [INFO] Using worker: sync
[2017-11-02 14:54:59 +0000] [3325] [INFO] Booting worker with pid: 3325
[2017-11-02 14:54:59 +0000] [3325] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 578, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 126, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 135, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 352, in import_app
    __import__(module)
  File "/opt/cuckoo/web/web/wsgi.py", line 89, in <module>
    application = get_wsgi_application()
  File "/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 13, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 22, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 129, in __init__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[2017-11-02 14:54:59 +0000] [3325] [INFO] Worker exiting (pid: 3325)
[2017-11-02 14:54:59 +0000] [3321] [INFO] Shutting down: Master
[2017-11-02 14:54:59 +0000] [3321] [INFO] Reason: Worker failed to boot.

but secret_key.py is filled in, so I'm not sure where to go next. Thanks for any help.

Anything I can do on my end to troubleshoot this? Thank you.

Yes. Open /opt/cuckoo/web/web/secret_key.py. Then copy the entire line. Then paste that line into /op/cuckoo/web/web/local_settings.py. Retry loading Gunicorn.

Thank you that fixed the issue...I now have a different one that I'll try and work though.