spender-sandbox / cuckoo-modified

Modified edition of cuckoo
395 stars 178 forks source link

Gunicorn issue with cuckoo "SECRET_KEY must not be empty" #492

Closed DigiAngel closed 7 years ago

DigiAngel commented 7 years ago

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.

DigiAngel commented 7 years ago

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

hackdefendr commented 7 years ago

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.

DigiAngel commented 7 years ago

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