Couldn't sign in Edx LMS (CMS is OK) using default accounts

332 views
Skip to first unread message

Ping Yu

unread,
Sep 15, 2017, 4:33:56 AM9/15/17
to Open edX operations
I've installed Edx Ginkgo.1 using the official native installation instructions https://openedx.atlassian.net/wiki/spaces/OpenOPS/pages/146440579/Native+Open+edX+Ubuntu+16.04+64+bit+Installation.

But I couldn't log in successfully using the default users/passwords:
User: ho...@example.com Password: edx
User: au...@example.com Password: edx
User: veri...@example.com Password: edx
User: st...@example.com Password:edx

The snapshot is





The same error occurred for Django admin web page http://ipaddress/admin



I checked the /edx/var/log/lms/edx.log, which showsSep 15 16:27:01 ubuntu204 [service_variant=lms][django.request][env:sandbox] ERROR [ubuntu204  2824] [base.py:256] - Internal Server Error: /user_api/v1/account/login_session/Traceback (most recent call last):  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response    response = wrapped_callback(request, *callback_args, **callback_kwargs)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner    return func(*args, **kwargs)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view    return view_func(*args, **kwargs)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view    return self.dispatch(request, *args, **kwargs)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py", line 466, in dispatch    response = self.handle_exception(exc)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py", line 463, in dispatch    response = handler(request, *args, **kwargs)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 34, in _wrapper    return bound_func(*args, **kwargs)  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_api/helpers.py", line 112, in _wrapped    return func(request)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 30, in bound_func    return func.__get__(self, type(self))(*args2, **kwargs2)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 34, in _wrapper    return bound_func(*args, **kwargs)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view    response = view_func(request, *args, **kwargs)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 30, in bound_func    return func.__get__(self, type(self))(*args2, **kwargs2)  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_api/views.py", line 156, in post    return shim_student_view(login_user, check_logged_in=True)(request)  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_api/helpers.py", line 441, in _inner    response = view_func(request)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view    response = view_func(request, *args, **kwargs)  File "/edx/app/edxapp/edx-platform/common/djangoapps/student/views.py", line 1516, in login_user    return set_logged_in_cookies(request, response, user)  File "/edx/app/edxapp/edx-platform/common/djangoapps/student/cookies.py", line 92, in set_logged_in_cookies    CREATE_LOGON_COOKIE.send(sender=None, user=user, response=response)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 189, in send    response = receiver(signal=self, sender=sender, **named)  File "/edx/app/edxapp/edx-platform/lms/djangoapps/email_marketing/signals.py", line 40, in add_email_marketing_cookies    email_config = EmailMarketingConfiguration.current()  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/config_models/models.py", line 143, in current    current = cls.objects.filter(**key_dict).order_by('-change_date')[0]  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 201, in __getitem__    return list(qs)[0]  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 162, in __iter__    self._fetch_all()  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 965, in _fetch_all    self._result_cache = list(self.iterator())  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 238, in iterator    results = compiler.execute_sql()  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql    cursor.execute(sql, params)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute      File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__    six.reraise(dj_exc_type, dj_exc_value, traceback)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute    return self.cursor.execute(sql, params)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 124, in execute    return self.cursor.execute(query, args)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute    self.errorhandler(self, exc, value)  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler    raise errorclass, errorvalueOperationalError: (1054, "Unknown column 'email_marketing_emailmarketingconfiguration.sailthru_activation_template' in 'field list'")

However, I signed in CMS (http://xx.xx.xx.xx:18010) successfully using the account st...@example.com and then visited LMS normally.
  




 





Frane Kalebic

unread,
Sep 22, 2017, 8:48:27 AM9/22/17
to Open edX operations
When logging into the admin interface, use the username and not the email address, so try staff instead of st...@example.com.

As for LMS, it seems that the sailthru_activation_template column is not created in the emailmarketingconfiguration table. 
Go to edx-platform/lms/djangoapps/email_marketing/migrations/ folder in your server, and check does the folder contain 0009_remove_emailmarketingconfiguration_sailthru_activation_template.py, like in the current  master
If so, try reverting the migration to the one before that (0008).
python /edx/app/edxapp/edx-platform/manage.py lms migrate email_marketing 0008 --settings=aws
Just be sure to back up your DB beforehand.

If that is not the case, see if the column is being created in any of the migrations, and try to run them again, 
python /edx/app/edxapp/edx-platform/manage.py lms migrate email_marketing --settings=aws
(Again, back up your DB)

Ping Yu

unread,
Sep 25, 2017, 12:18:11 AM9/25/17
to Open edX operations
Thank you!
I've resolved this problem by reinstalling the Edx on a new Ubuntu 1604 server. And now it is running correctly!
Reply all
Reply to author
Forward
0 new messages