1

I install open edx on ubuntu server. And I caught this error:

TASK: [edxapp | syncdb and migrate] *******************************************
failed: [localhost] => (item=lms) => {"changed": true, "cmd": " /edx/app/edxapp/venvs/edxapp/bin/python manage.py lms syncdb --migrate --noinput --settings=aws_migrate ", "delta": "0:00:01.233541", "end": "2015-11-23 12:45:40.878404", "item": "lms", "rc": 1, "start": "2015-11-23 12:45:39.644863"}
stderr: Traceback (most recent call last):
  File "manage.py", line 111, in <module>
    startup = importlib.import_module(edx_args.startup)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/edx/app/edxapp/edx-platform/lms/startup.py", line 11, in <module>
    settings.INSTALLED_APPS  # pylint: disable=pointless-statement
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
    self._setup(name)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 113, in __init__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
failed: [localhost] => (item=cms) => {"changed": true, "cmd": " /edx/app/edxapp/venvs/edxapp/bin/python manage.py cms syncdb --migrate --noinput --settings=aws_migrate ", "delta": "0:00:00.833513", "end": "2015-11-23 12:45:41.791966", "item": "cms", "rc": 1, "start": "2015-11-23 12:45:40.958453"}
stderr: Traceback (most recent call last):
  File "manage.py", line 111, in <module>
    startup = importlib.import_module(edx_args.startup)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/edx/app/edxapp/edx-platform/cms/startup.py", line 8, in <module>
    settings.INSTALLED_APPS  # pylint: disable=pointless-statement
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
    self._setup(name)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 113, in __init__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.


FATAL: all hosts have already failed -- aborting

I have checked lms/envs/dev.py. This file contains a SECRET_KEY variable and it is not empty. I have no any idea to fix it

Régis B.
  • 10,092
  • 6
  • 54
  • 90
Dmitry Utrobin
  • 359
  • 1
  • 3
  • 15

2 Answers2

0

You are running management commands with aws_migrate settings. So you should make sure that the lms/envs/aws_migrate.py file contains a proper SECRET_KEY setting.

Régis B.
  • 10,092
  • 6
  • 54
  • 90
-1

"vagrant provision" Solved the problem for me.

Ayub Khan
  • 896
  • 2
  • 14
  • 17