LMS and CMS failed to start after xblock installation

Hi all,

we are trying to setup a open edx platform (ironwood). when we restarted the server after installing the quiz in video xblock “GitHub - Stanford-Online/xblock-in-video-quiz”, the webpage showing error message like " Uh oh, we are having some server issues…" with a sinking ship image. we tried to restart server and lms & cms multiple times. but there is no change.

lab@openedx:~$ sudo /edx/bin/supervisorctl status
analytics_api RUNNING pid 2898, uptime 0:01:20
certs RUNNING pid 6809, uptime 0:00:51
cms STARTING
discovery RUNNING pid 2933, uptime 0:01:19
ecommerce RUNNING pid 2921, uptime 0:01:19
ecomworker RUNNING pid 2890, uptime 0:01:20
edxapp_worker:cms_default_1 STARTING
edxapp_worker:cms_high_1 RUNNING pid 20504, uptime 0:00:01
edxapp_worker:lms_default_1 STARTING
edxapp_worker:lms_high_1 STARTING
edxapp_worker:lms_high_mem_1 RUNNING pid 20502, uptime 0:00:01
forum RUNNING pid 2894, uptime 0:01:20
insights RUNNING pid 2916, uptime 0:01:19
lms RUNNING pid 20499, uptime 0:00:01
notifier-celery-workers RUNNING pid 2896, uptime 0:01:20
notifier-scheduler RUNNING pid 2911, uptime 0:01:19
xqueue RUNNING pid 2887, uptime 0:01:20
xqueue_consumer RUNNING pid 2899, uptime 0:01:20

lms & cms status shows RUNNING and if fails with uptime 0:00:01 or uptime 0:00:02. We followed the troubleshooting steps Unable to connect to the LMS . But no change in server status. Anyone please help to resolve this issue.

Logs are as follows

==> lms_high_1-stderr.log <==
    self._wrapped = Settings(settings_module)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/edx/app/edxapp/edx-platform/lms/envs/production.py", line 31, in <module>
    from .common import *
  File "/edx/app/edxapp/edx-platform/lms/envs/common.py", line 847, in <module>
    from xmodule.x_module import XModuleMixin
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 38, in <module>
    from opaque_keys.edx.asides import AsideUsageKeyV2, AsideDefinitionKeyV2
ImportError: cannot import name AsideUsageKeyV2

==> lms_default_1-stderr.log <==
Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/manage.py", line 119, 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 9, 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 56, in __getattr__
    self._setup(name)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/edx/app/edxapp/edx-platform/lms/envs/production.py", line 31, in <module>
    from .common import *
  File "/edx/app/edxapp/edx-platform/lms/envs/common.py", line 847, in <module>
    from xmodule.x_module import XModuleMixin
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 38, in <module>
    from opaque_keys.edx.asides import AsideUsageKeyV2, AsideDefinitionKeyV2
ImportError: cannot import name AsideUsageKeyV2

==> cms_high_1-stderr.log <==
    __import__(name)
  File "/edx/app/edxapp/edx-platform/cms/startup.py", line 9, 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 56, in __getattr__
    self._setup(name)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/edx/app/edxapp/edx-platform/cms/envs/production.py", line 17, in <module>
    from .common import *
  File "/edx/app/edxapp/edx-platform/cms/envs/common.py", line 49, in <module>
    import lms.envs.common
  File "/edx/app/edxapp/edx-platform/lms/envs/common.py", line 847, in <module>
    from xmodule.x_module import XModuleMixin
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 38, in <module>
    from opaque_keys.edx.asides import AsideUsageKeyV2, AsideDefinitionKeyV2
ImportError: cannot import name AsideUsageKeyV2


==> cms_default_1-stderr.log <==
  File "/edx/app/edxapp/edx-platform/cms/envs/common.py", line 49, in <module>
    import lms.envs.common
  File "/edx/app/edxapp/edx-platform/lms/envs/common.py", line 847, in <module>
    from xmodule.x_module import XModuleMixin
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 38, in <module>
    from opaque_keys.edx.asides import AsideUsageKeyV2, AsideDefinitionKeyV2
ImportError: cannot import name AsideUsageKeyV2

We have uninstalled the this xblcok, still the server is down.

Hi @iamsumesh,

Try to install requirements once again. I doubt that while xblock installation it has changed the version of the opaque-keys

Hi @jramnai, Thanks for the reply. video-quiz xblock currently uninstalled. kindly suggest which requirements need to install. If possible, could you suggest the steps to do after cloning the “opaque-keys” repo. whether it need to cloned in any specific location. we are using ironwoord version of openedx.

The opaque-keys repo will be already there in the site-packages, you do not need to clone it explicitly. You need to install these requirements using pip.

This issue is solved after installing edx-opaque-keys==0.4.4