Looking for detailed guidance on how the LMS and Discovery systems in a tutor deployment should be configured so that the command
tutor local run lms ./manage.py lms cache_programs
will work.
I have the discovery plugin installed with tutor 3.8.
I have created a program type and program in the discovery admin view. I am trying to get that program visible on the lms site when I go to explore available courses.
When I refresh the metadata and reindex I see that it mentions the 1 program in the results after the refresh.
Originally I was getting the error ‘skipping, no site configuration’ until I added a site configuration to the LMS.
I originally put this in the JSON box for site configuration:
{
“COURSE_CATALOG_API_URL”:“http://discovery:8000”
}
I also tried it with the URL: ‘https://discovery:8000/api/v1’. Both gave the same type of error which is below.
2020-01-01 23:22:28,079 INFO 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:116 - Received 0 UUIDs for site modifiedSiteName.com
2020-01-01 23:22:28,080 INFO 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:143 - Requesting pathways for modifiedSiteName.com.
2020-01-01 23:22:28,085 ERROR 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:153 - Failed to retrieve pathways for site: modifiedSiteName.com.
Traceback (most recent call last):
File “/openedx/edx-platform/openedx/core/djangoapps/catalog/management/commands/cache_programs.py”, line 147, in get_pathways
new_pathways = client.pathways.get(exclude_utm=1, page=next_page)
File “/openedx/venv/local/lib/python2.7/site-packages/slumber/init.py”, line 155, in get
resp = self._request(“GET”, params=kwargs)
File “/openedx/venv/local/lib/python2.7/site-packages/slumber/init.py”, line 101, in _request
raise exception_class(“Client Error %s: %s” % (resp.status_code, url), response=resp, content=resp.content)
HttpClientError: Client Error 400: http://discovery:8000/api/v1/pathways/
2020-01-01 23:22:28,085 INFO 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:159 - Received 0 pathways for site modifiedSiteName.com
2020-01-01 23:22:28,086 INFO 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:72 - Caching UUIDs for 0 programs for site modifiedSiteName.com.
2020-01-01 23:22:28,086 INFO 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:79 - Caching ids for 0 pathways for site modifiedSiteName.com.
2020-01-01 23:22:28,087 INFO 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:85 - Caching details for 0 programs.
2020-01-01 23:22:28,087 INFO 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:90 - Caching details for 0 pathways.
I noticed its reporting an HTTP error with 400 which makes me think it is just a permission issue hitting that url. Therefore, I tried changing the URL config to ‘https’. When I make this change I get the following error when it tries to make the call:
2020-01-01 23:43:29,749 ERROR 1 [openedx.core.djangoapps.catalog.management.commands.cache_programs] cache_programs.py:153 - Failed to retrieve pathways for site: modifiedSiteName.com.
Traceback (most recent call last):
File “/openedx/edx-platform/openedx/core/djangoapps/catalog/management/commands/cache_programs.py”, line 147, in get_pathways
new_pathways = client.pathways.get(exclude_utm=1, page=next_page)
File “/openedx/venv/local/lib/python2.7/site-packages/slumber/init.py”, line 155, in get
resp = self._request(“GET”, params=kwargs)
File “/openedx/venv/local/lib/python2.7/site-packages/slumber/init.py”, line 97, in _request
resp = self._store[“session”].request(method, url, data=data, params=params, files=files, headers=headers)
File “/openedx/venv/local/lib/python2.7/site-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/openedx/venv/local/lib/python2.7/site-packages/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/openedx/venv/local/lib/python2.7/site-packages/requests/adapters.py”, line 514, in send
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host=‘discovery’, port=8000): Max retries exceeded with url: /pathways/?exclude_utm=1&page=1 (Caused by SSLError(SSLEOFError(8, u’EOF occurred in violation of protocol (_ssl.c:590)'),))
I saw this post and used some of it to make changes in attempt to get the catalog update working:
Hoping @regis or @cacciaresi can help shed some light on getting the discovery and lms communication working for programs.