Let me explain it first.
We are currently on the nutmeg version. Then, we experienced an issue in tutor image build openedx
.
The solution to this problem was explained here:
Please update your git URLs for edx-platform and several other repos - Announcements - Open edX discussions
However, we are taking too much time in performing this fix, so we considered upgrading instead.
Upon upgrading from nutmeg to olive and olive to palm, we experienced an error on running the tutor local launch
command.
Traceback (most recent call last):
File "/openedx/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py", line 37, in execute_loader
run_loader()
File "/openedx/venv/lib/python3.8/site-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/openedx/discovery/course_discovery/apps/course_metadata/management/commands/refresh_course_metadata.py", line 34, in run_loader
return loader_class(*loader_args).ingest()
File "/openedx/discovery/course_discovery/apps/course_metadata/data_loaders/init.py", line 36, in init
self.username = self.get_username_from_client(self.api_client)
File "/openedx/discovery/course_discovery/apps/course_metadata/data_loaders/init.py", line 46, in get_username_from_client
token = client.get_jwt_access_token()
File "/openedx/venv/lib/python3.8/site-packages/edx_rest_api_client/client.py", line 270, in get_jwt_access_token
self._ensure_authentication()
File "/openedx/venv/lib/python3.8/site-packages/edx_rest_api_client/client.py", line 249, in _ensure_authentication
oauth_access_token_response = get_and_cache_oauth_access_token(
File "/openedx/venv/lib/python3.8/site-packages/edx_rest_api_client/client.py", line 164, in get_and_cache_oauth_access_token
oauth_access_token_response = get_oauth_access_token(
File "/openedx/venv/lib/python3.8/site-packages/edx_rest_api_client/client.py", line 115, in get_oauth_access_token
response.raise_for_status() # Raise an exception for bad status codes.
File "/openedx/venv/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://lms:8000/oauth2/access_token
It occurred at the point
CommandError: One or more of the data loaders above failed.
Error: Command failed with status 1: docker compose -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.prod.yml -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.override.yml --project-name tutor_local -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm discovery-job sh -e -c make migrate
# Development partners
./manage.py create_or_update_partner \
--site-id 1 \
--site-domain discovery.tmtg-clone.click:8381 \
--code dev \
--name "Open edX - development" \
--lms-url="http://lms:8000" \
--studio-url="http://cms:8000" \
--courses-api-url "http://tmtg-clone.click:8000/api/courses/v1/" \
--organizations-api-url "http://tmtg-clone.click:8000/api/organizations/v1/"
# Production partner
./manage.py create_or_update_partner \
--site-id 2 \
--site-domain discovery.tmtg-clone.click \
--code openedx \
--name "Open edX" \
--lms-url="http://lms:8000" \
--studio-url="http://cms:8000" \
--courses-api-url "https://tmtg-clone.click/api/courses/v1/" \
--organizations-api-url "https://tmtg-clone.click/api/organizations/v1/"
./manage.py refresh_course_metadata --partner_code=$DEFAULT_PARTNER_CODE
./manage.py update_index --disable-change-limit