Commit b6a360c4 authored by Maarten de Waard's avatar Maarten de Waard 🤘🏻
Browse files

document instructor page error

parent 7f8bb150
......@@ -136,6 +136,102 @@ hardcoding the following in the nginx role (
- install
- install:configuration
Runtime problems
----------------
Apparently, when this install method is used, the username for one of the
databases that is configured is too long. This renders the "instructor" page of
a course unusable, because you're not able to load some database data. This is
the log error:
.. code::
2017-05-08 09:13:30,400 ERROR 8063 [django.request] base.py:256 - Internal Server Error: /courses/course-v1:Maarten+TST101+2017-Q1/instructor
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/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/views/decorators/cache.py", line 43, in _cache_controlled
response = viewfunc(request, *args, **kw)
File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/instructor_dashboard.py", line 123, in instructor_dashboard_2
_section_course_info(course, access),
File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/instructor_dashboard.py", line 439, in _section_course_info
section_data['enrollment_count'] = CourseEnrollment.objects.enrollment_counts(course_key)
File "/edx/app/edxapp/edx-platform/common/djangoapps/student/models.py", line 950, in enrollment_counts
for item in query:
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 1085, in iterator
for row in self.query.get_compiler(self.db).results_iter():
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 794, in results_iter
results = self.execute_sql(MULTI)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 829, in execute_sql
sql, params = self.as_sql()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 387, in as_sql
where, w_params = self.compile(self.query.where)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 357, in compile
sql, params = node.as_sql(self, self.connection)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/where.py", line 104, in as_sql
sql, params = compiler.compile(child)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 357, in compile
sql, params = node.as_sql(self, self.connection)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/lookups.py", line 218, in as_sql
lhs_sql, params = self.process_lhs(compiler, connection)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/lookups.py", line 211, in process_lhs
db_type = self.lhs.output_field.db_type(connection=connection)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 614, in db_type
return connection.data_types[self.get_internal_type()] % data
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/functional.py", line 59, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 196, in data_types
if self.features.supports_microsecond_precision:
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/functional.py", line 59, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/mysql/features.py", line 52, in supports_microsecond_precision
return self.connection.mysql_version >= (5, 6, 4) and Database.version_info >= (1, 2, 5)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/functional.py", line 59, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 371, in mysql_version
with self.temporary_connection():
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 462, in temporary_connection
cursor = self.cursor()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 164, in cursor
cursor = self.make_cursor(self._cursor())
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 135, in _cursor
self.ensure_connection()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
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/base/base.py", line 130, in ensure_connection
self.connect()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 276, in get_new_connection
conn = Database.connect(**conn_params)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (1045, "Access denied for user 'edxapp001'@'localhost' (using password: YES)")
This problem is solved by following the instructions on `this page`_
.. _this page: http://oonlab.com/edx/2017/03/23/open-edx-instructor-error/
"Simple! to fix this problem after installation of ficus is to change
``lms.auth.json`` and ``cms.auth.json`` database configuration. We can use
``edxapp001`` user for read_replica database instead instead of
``edxapp_replica001``."
Indices and tables
==================
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment