HTTP 503 from lms during cms login

Hi,

I am receiving an error from studio when I try to login. When I click ‘sign in’ I am redirected to the lms login page, where I successfully login, before being redirected back to studio, where I receive an error message.

Looking at the tutor cms logs (https://pastebin.com/gQH9EtzP), the first error is:

requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://lms:8000/oauth2/access_token

with the final error:

social_core.exceptions.AuthUnreachableProvider: The authentication provider could not be reached

There are no errors in the lms logs. Lms login works fine.

I am running tutor 14.2.3 with an nginx reverse proxy, which is run behind a network proxy. Tutor is configured with , CADDY_HTTP_PORT=127.0.0.1:81 ENABLE_HTTPS=true ENABLE_WEB_PROXY=false and a tutor plugin:

from tutor import hooks

hooks.Filters.ENV_PATCHES.add_items([
  (
    "openedx-cms-common-settings",
    "SOCIAL_AUTH_REDIRECT_IS_HTTPS = True"
  ),
  (
    "openedx-common-settings",
    "SOCIAL_AUTH_PROXIES = {'https': 'http://proxy.site.com:3128'}"
  ),
])

Any help would be greatly appreciated.

Are you able to reach the lms container from the cms container?

Something like:

tutor local exec cms bash
curl http://lms:8000/oauth2/access_token

Thank you for your response. I am unable to reach the lms container from the cms container. I got the following status codes from curl

$ docker exec -it tutor_local-cms-1 /bin/bash

cms $ curl -I http://lms:8000/oauth2/access_token
HTTP/1.1 503 Service Unavailable

cms $ curl -I https://lms:8000/oauth2/access_token
HTTP/1.1 403 Forbidden

cms $ curl -I https://www.google.com
HTTP/1.1 200 Connection established

Could this be a proxy issue? I have experienced multiple proxy issues during setup e.g. I had to add proxy ENV settings manually to the top of each Dockerfile.

ENV http_proxy http://proxy.site.com:3128
ENV https_proxy http://proxy.site.com:3128