Discussion forum is not working


I have been struggling whit my openedx forum it dose not seem to be working at all, just gives an error, in the lms logs I can see this:

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
  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
  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
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/utils.py", line 122, in perform_request
CommentClientError: u'Invalid JSON response for request 548750f5-5e5c-4a01-9b14-1a381f2d6a42; 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\''

But I cannot seem to get any ideas why, any suggestions?


you need to investigate forum service log and status.

/edx/bin/supervisorctl status
less /edx/var/log/supervisor/forum-stderr.log

weirdly today that problem is gone, but I still have one problem, in the forum section when I click see all discussions, it gives me an error to try again later, and in the browser console it givse me this:

Mixed Content: The page at 'https://domain/courses/coursename/discussion/forum/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://domain/courses/coursename/discussion/forum/?ajax=1&page=1&sort_key=activity&sort_order=desc'. This request has been blocked; the content must be served over HTTPS.

There are no errors in lms, forum or nginx logs.

Check forum json settings, or settings in general, somewhere it’ll be setting the lms url base with http.

If you further face any issue I suggest you open a new topic.

1 Like

Where is the forum json settings file stored? I am aware of lms.env.json and cms.env.json config files, are there more?