OpenEdx Discussion Forums Error

912 views
Skip to first unread message

kel...@farwell-consultants.com

unread,
Jul 18, 2018, 10:38:37 AM7/18/18
to Open edX operations
Hi OpenEdx Team,

I trust you are all well. I am having the following error when accessing discussion forums in the courses. While trying to debug, I noticed the following errors with regards to the same:

== /edx/var/log/supervisor/lms-stderr.log ==

2018-07-18 12:00:22,362 ERROR 30391 [edx.courseware] views.py:459 - Error in /courses/course-v1:SLBA+Mod_2+2017/discussion/forum/: user=kelvin-ngunyi, effective_user=kelvin-ngunyi, course=course-v1:SLBA+Mod_2+2017
Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/views/views.py", line 438, in get
    return super(CourseTabView, self).get(request, course=course, page_context=page_context, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/web_fragments/views.py", line 26, in get
    fragment = self.render_to_fragment(request, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/views/views.py", line 515, in render_to_fragment
    return tab.render_to_fragment(request, course, **kwargs)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/tabs.py", line 286, in render_to_fragment
    return self.fragment_view.render_to_fragment(request, course_id=unicode(course.id), **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/discussion/views.py", line 636, in render_to_fragment
    thread_id=thread_id,
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/discussion/views.py", line 394, in _create_discussion_board_context
    context = _create_base_discussion_view_context(request, course_key)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/discussion/views.py", line 367, in _create_base_discussion_view_context
    user_info = cc_user.to_dict()
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/models.py", line 59, in to_dict
    self.retrieve()
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/models.py", line 64, in retrieve
    self._retrieve(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/user.py", line 152, in _retrieve
    metric_tags=self._metric_tags,
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/utils.py", line 122, in perform_request
    content=response.text[:100]
CommentClientError: u'Invalid JSON response for request 5503d0a2-f767-4484-9816-b651912ea594; first 100 characters: \'<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gat\''

== /edx/var/log/supervisor/forum-stderr.log ==


ERROR: ElasticSearch configuration validation failed. "rake search:validate_index" failed with the following message: Alias 'content' does not exist.
ERROR: ElasticSearch configuration validation failed. "rake search:validate_index" failed with the following message: Alias 'content' does not exist.
ERROR: ElasticSearch configuration validation failed. "rake search:validate_index" failed with the following message: Alias 'content' does not exist.
ERROR: ElasticSearch configuration validation failed. "rake search:validate_index" failed with the following message: Alias 'content' does not exist.
ERROR: ElasticSearch configuration validation failed. "rake search:validate_index" failed with the following message: Alias 'content' does not exist.
ERROR: ElasticSearch configuration validation failed. "rake search:validate_index" failed with the following message: Alias 'content' does not exist.
ERROR: ElasticSearch configuration validation failed. "rake search:validate_index" failed with the following message: Alias 'content' does not exist.
ERROR: ElasticSearch configuration validation failed. "rake search:validate_index" failed with the following message: Alias 'content' does not exist.

What could be the reason for this error. When I run sudo /edx/bin/supervisorctl status, the following is the response:

analytics_api                    RUNNING   pid 2318, uptime 1:18:23
certs                            RUNNING   pid 4453, uptime 0:00:02
discovery                        RUNNING   pid 2351, uptime 1:18:23
ecommerce                        RUNNING   pid 2327, uptime 1:18:23
ecomworker                       RUNNING   pid 2313, uptime 1:18:23
edxapp:cms                       RUNNING   pid 30310, uptime 0:47:21
edxapp:lms                       RUNNING   pid 30309, uptime 0:47:21
edxapp_worker:cms_default_1      RUNNING   pid 2343, uptime 1:18:23
edxapp_worker:cms_high_1         RUNNING   pid 2336, uptime 1:18:23
edxapp_worker:cms_low_1          RUNNING   pid 2332, uptime 1:18:23
edxapp_worker:lms_default_1      RUNNING   pid 2342, uptime 1:18:23
edxapp_worker:lms_high_1         RUNNING   pid 2349, uptime 1:18:23
edxapp_worker:lms_high_mem_1     RUNNING   pid 2334, uptime 1:18:23
edxapp_worker:lms_low_1          RUNNING   pid 2346, uptime 1:18:23
forum                            RUNNING   pid 3708, uptime 0:00:42
insights                         RUNNING   pid 2323, uptime 1:18:23
notifier-celery-workers          RUNNING   pid 2317, uptime 1:18:23
notifier-scheduler               RUNNING   pid 2321, uptime 1:18:23
xqueue                           RUNNING   pid 2312, uptime 1:18:23
xqueue_consumer                  RUNNING   pid 2319, uptime 1:18:23

The forums service seems to be restarting several times also. Kindly assist in resolving the above. 

Lupus Furyo

unread,
Jul 18, 2018, 2:32:01 PM7/18/18
to opene...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Open edX operations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/0209d192-aaa1-42c3-bfa7-f916747e2926%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lupus Furyo

unread,
Jul 18, 2018, 2:43:09 PM7/18/18
to opene...@googlegroups.com
Other things that comes to my mind,

1. # Forum service port
/edx/app/forum/forum_env
should have
export LISTEN_PORT="4567"

2. API_KEY in /edx/app/forum/cs_comments_service/config/application.yml and Elasticsearch port:
# Note: the api_key below needs to match the value you have for EDX_API_KEY in lms.auth.json

api_key: <%= ENV['API_KEY'] || 'PUT_YOUR_API_KEY_HERE' %>
elasticsearch_server: <%= ENV['SEARCH_SERVER'] || 'http://localhost:9200' %>

Are you using Comments Service and Notifier app as well?




On Wed, Jul 18, 2018 at 10:31 PM, Lupus Furyo <furyos...@gmail.com> wrote:

kel...@farwell-consultants.com

unread,
Jul 19, 2018, 2:16:01 AM7/19/18
to Open edX operations
Open JDK wasn't installed manually, the installation was done correctly.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops...@googlegroups.com.

kel...@farwell-consultants.com

unread,
Jul 19, 2018, 2:24:03 AM7/19/18
to Open edX operations
No.1 is okay. The port is well configured.

My lms.auth.json has the default value: "EDX_API_KEY": "PUT_YOUR_API_KEY_HERE" 

The installation hasn't been modified thus unsure about Comments Service and Notifier app, are they enabled by default?

On Wednesday, July 18, 2018 at 9:43:09 PM UTC+3, Lupus Furyo wrote:
Other things that comes to my mind,

1. # Forum service port
/edx/app/forum/forum_env
should have
export LISTEN_PORT="4567"

2. API_KEY in /edx/app/forum/cs_comments_service/config/application.yml and Elasticsearch port:
# Note: the api_key below needs to match the value you have for EDX_API_KEY in lms.auth.json

api_key: <%= ENV['API_KEY'] || 'PUT_YOUR_API_KEY_HERE' %>
elasticsearch_server: <%= ENV['SEARCH_SERVER'] || 'http://localhost:9200' %>

Are you using Comments Service and Notifier app as well?



On Wed, Jul 18, 2018 at 10:31 PM, Lupus Furyo <furyos...@gmail.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops...@googlegroups.com.

Lupus Furyo

unread,
Jul 19, 2018, 12:15:52 PM7/19/18
to opene...@googlegroups.com
2.a Please check the file
/edx/app/forum/cs_comments_service/config/application.yml

it should have the same API key
api_key: <%= ENV['API_KEY'] || 'PUT_YOUR_API_KEY_HERE' %>

also check the Eleasticsearch port:
elasticsearch_server: <%= ENV['SEARCH_SERVER'] || 'http://localhost:9200' %>

3. Since it's a new install, Notifier won't be configured (it is still running, though) but Comment Service. Leaving Notifier in peace, please check in your lms.env.json and cms.env.json
"COMMENTS_SERVICE_URL": "http://localhost:18080"

If you have instead have FQDN of your server, then you need to open/forward this port.


To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/fd7d131d-b3b7-460c-ac00-8e410baa5c16%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages