Edx tutor login (apps) is unreacheable

Good Morning,
I try to install edx tutor with Docker on production server, So I used the following steps:

  • installing a server ubuntu 20
  • Update and upgrade the packets
  • install Docker 24.0.7 and Docker-compose 2.17.2
  • install PIP and Python3
  • install tutor via PIP
  • tutor local launch

and here comes after few minutes an error in the migration step:
//
Your models in app(s): ‘content_tagging’, ‘discussions’, ‘third_party_auth’ have changes that are not yet reflected in a migration, and so won’t be applied.

Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.
//
And the installation continue normally,

After that I add the DNS record for the LMS (edx.mydomaine) and the CMS(studio.edx.mydomain) and the apps (apps.edx.mydomain),

Finally when I launch the site in the browser I got the preview of the edx and the studio but when I try to log in, the apps.edx.mydomain/authn/login is unreacheable and can not access to my account that I created to manage my site.

I need your help to fix this issue, Thanks a lot

Check if you have MFE plugin installed and enabled by running:

tutor plugins list

It’s already installed and enabled :

tutor plugins list

:warning: Failed to enable plugin ‘indigo’: plugin ‘indigo’ is not installed.
NAME STATUS VERSION
android installed 17.0.0
discovery installed 17.0.0
ecommerce installed 17.0.2
forum installed 17.0.0
mfe :white_check_mark: enabled 17.0.1
minio installed 17.0.0
notes installed 17.0.0
webui installed 17.0.0
xqueue installed 17.0.0

I notify also that the tutor-local-permission is exited, when I check the status with:

sudo tutor local status

it gives this:

:warning: Failed to enable plugin ‘indigo’: plugin ‘indigo’ is not installed.
:warning: You are running Tutor as root. This is strongly not recommended. If you are doing this in order to access the Docker daemon, you should instead add your user to the ‘docker’ group. (see https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user)

docker compose -f /root/.local/share/tutor/env/local/docker-compose.yml -f /root/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local ps

NAME COMMAND SERVICE STATUS
tutor_local-caddy-1 “caddy run --config …” caddy running
tutor_local-cms-1 “/bin/sh -c 'uwsgi u…” cms running
tutor_local-cms-worker-1 “celery --app=cms.ce…” cms-worker running
tutor_local-elasticsearch-1 “/bin/tini – /usr/l…” elasticsearch running
tutor_local-lms-1 “/bin/sh -c 'uwsgi u…” lms running
tutor_local-lms-worker-1 “celery --app=lms.ce…” lms-worker running
tutor_local-mfe-1 “caddy run --config …” mfe running tutor_local-mongodb-1 “docker-entrypoint.s…” mongodb running
tutor_local-mysql-1 “docker-entrypoint.s…” mysql running
tutor_local-permissions-1 “sh /usr/local/bin/s…” permissions exited (0)
tutor_local-redis-1 “docker-entrypoint.s…” redis running
tutor_local-smtp-1 “/sbin/tini – exim …” smtp running

is it part of the problem

Have you ping apps.edx.mydomain to verify that it pointed to your server IP?
What HTTP status code when you access apps.edx.mydomain/authn/login, 4xx or 5xx?

You should not be running as sudo, and ideally you should not be logged in as root either, this is probably causing you to use your system’s Python environment instead of the Python virtual environment you should have created for Tutor. Thus you might have fragmentation in your installation with bits and pieces all over the place…

If you want a detailed read about venv, how it works and how to use it, then check this out: Python Virtual Environments: A Primer – Real Python

Between the steps “install pip/python” and “install tutor”, you should create a Python venv and activate it before you start installing all the requirements via PIP.

If you want this venv to be automatically activated every time you SSH into your server then you can add the path to your venv in your .bashrc file like this example:
export PATH=~/venv/bin:$PATH

in my case my venv is in /home/tutor/venv you can see in below screenshot i have .local folder containing the Tutor files, venv for Python and my .bashrc file containing (among other things) the path to my Python venv, so when I connect with ssh tutor@myserver then my venv is already loaded
image

PS just a side note, I’m not sure if you were just using your URL for illustrative purposes or you actually have “edx” (edx.mydomain) in your URL, but you shouldn’t use edx in your URL for trademark reasons: Trademark / Licensing Details - Open edX