Error installing Tutor OpenEdX with proxy server

Hello,

I am trying to install Tutor behind a proxy server and I get the following error given the command sudo tutor local launch :

[+] up 9/9
! Image docker.io/overhangio/openedx:20.0.5-indigo Interrupted 0.2s
! Image docker.io/getmeili/meilisearch:v1.8.4 Interrupted 0.2s
! Image docker.io/devture/exim-relay:4.96-r1-0 Interrupted 0.2s
✘ Image docker.io/mysql:8.4.0 Error failed to resolve reference “Docker Hub Container Image Library | App Containerization failed to do request: Head “https://registry-1.docker.io/v2/library/mysql/manifests/8.4.0”: dial tcp 54.208.116.131:443: connect: connection refused0.2s io/overhangio/openedx-mfe:20.1.0-indigo Pulling 0.1s
! Image docker.io/caddy:2.7.4 Interrupted 0.2s
! Image docker.io/mongo:7.0.28 Interrupted 0.2s
! Image docker.io/overhangio/openedx-mfe:20.1.0-indigo Interrupted 0.2s
! Image docker.io/overhangio/openedx-permissions:20.0.5 Interrupted 0.2s
! Image docker.io/redis:7.4.5 Interrupted 0.2s
Error response from daemon: failed to resolve reference “Docker Hub Container Image Library | App Containerization failed to do request: Head “https://registry-1.docker.io/v2/library/mysql/manifests/8.4.0”: dial tcp 54.208.116.131:443: connect: connection refused
Error: Command failed with status 1: 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 up --remove-orphans -d

I have tried the workaround suggested on the Tutor tutorial/installation site with no success (I do not know how to deactivate/reverse now the configuration set with tutor config save --set ENABLE_WEB_PROXY=false --set CADDY_HTTP_PORT=127.0.0.1:81 any ideas?) with no success.

Is there a solution on installing tutor behind a proxy? Do I have to edit another config file to set the proxy server to that that has access to the internet and so for the installation to complete successfully? For example in order to install the tutor package with pip I had to manually export the proxy servers as export http_proxy=http://internet.mycompany.eu:8080 before running the pip command.

Thank you in advance

Michael

Hi @markman8
The ENABLE_WEB_PROXY variable you mentioned specifically relates to the Caddy container which is actually a reverse proxy that handles connection to all the backend services, basically it catches the URL you requested like lms.domain.tld and then fetches the data from the backend service.

It sounds to me like the issue that you’re having relates to the corporate proxy that controls how your devices connect to the internet access. In this case you probably need to configure the Docker Daemon to pass the traffic through your proxy, this documentation is probably most applicable to you:

Yes that is the issue. I thought that the workaround with Caddy would solve the problem…

I will look into it on what you sent and update this post.

By the way how do I return the Caddy container back to its original state?

Thank you for the response

tutor config save --set ENABLE_WEB_PROXY=true --set CADDY_HTTP_PORT=80
That should get you back to the default values :slight_smile:

1 Like

I have created a thread in Docker forum but I make it available also in this post in case someone has already tackled it.

I get the following error now:

[+] up 0/9
⠋ Image docker.io/overhangio/openedx:20.0.5-indigo Pulling 2.0s
⠋ Image docker.io/devture/exim-relay:4.96-r1-0 Pulling 2.0s
⠋ Image docker.io/caddy:2.7.4 Pulling 2.0s
⠋ Image docker.io/overhangio/openedx-permissions:20.0.5 Pulling 2.0s
⠋ Image docker.io/mysql:8.4.0 Pulling 2.0s
⠋ Image docker.io/overhangio/openedx-mfe:20.1.0-indigo Pulling 2.0s
⠋ Image docker.io/getmeili/meilisearch:v1.8.4 Pulling 2.0s
⠋ Image docker.io/mongo:7.0.28 Pulling 2.0s
⠋ Image docker.io/redis:7.4.5 Pulling 2.0s
failed to copy: httpReadSeeker: failed open: failed to do request: Get “https://docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com/registry-v2/docker/registry/v2/blobs/sha256/7a/7a7b2e234b158c1e01eab04f851fc4b1a33296dbaa68c57d11815ee38a3cafaf/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=f1baa2dd9b876aeb89efebbfc9e5d5f4%2F20260116%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20260116T090247Z&X-Amz-Expires=1200&X-Amz-SignedHeaders=host&X-Amz-Signature=1c4566f5ea8ae868bca63b8b98d614020c0aa1a1f6081dfed247fd4cde3541bb”: Forbidden
Error: Command failed with status 1: 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 up --remove-orphans -d

The tutor installation has been launched with sudo privileges. The proxy settings have been set for docker but it seems that the script cannot execute the 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 up --remove-orphans -d

Is it a privilege or again I have stood onto the proxy problem?

overall it sounds to me like a proxy/config issue.

Did you set BOTH the http_proxy and https_proxy? if not then I think this may be required.

it might also be worthwhile to get your network admin to monitor the proxy logs to see if anything stands out as being blocked at the proxy. does your proxy require authentication as well or is it transparent? auth might need you to change the http(s)_proxy value something more like http://user:pass@proxyhost:port

I see you’re running it as root, this is normally discouraged although it can work. Not that i suspect this is your problem, but it is best practice to avoid using the root user for anything other than initial setup of your base system and dependencies.

by the way, are you running this on a dedicated/headless linux server, or are you using docker desktop on your windows desktop/laptop? (just a matter of curiosity, not sure how/if it might relate to your issue)

well I deleted the initial tutor installation on root via pip uninstall and installed it in a venv in the normal user dir. Thank you for mentioning that

I did give privileges to that same user for docker and tried to run docker run hello-world only to get the following:

~$ docker run hello-world
Unable to find image ‘hello-world:latest’ locally
latest: Pulling from library/hello-world
docker: failed to copy: httpReadSeeker: failed open: failed to do request: Get “https://docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com/registry-v2/docker/registry/v2/blobs/sha256/1b/1b44b5a3e06a9aae883e7bf25e45c100be0bb81a0e01b32de604f3ac44711634/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=f1baa2dd9b876aeb89efebbfc9e5d5f4%2F20260116%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20260116T195839Z&X-Amz-Expires=1200&X-Amz-SignedHeaders=host&X-Amz-Signature=3eac19f95d40bbccd987b4f8296feefa2d61b2e05dffc0dd983e30127d1ebf5d”: Forbidden

Run ‘docker run --help’ for more information

which is interesting since it matches the previous o/p I posted. Yes I suppose I have an issue with the proxy. The process I followed for setting the docker with proxy is described here

I will look into it on Monday. Thanks for the support

Hello Joel,

The installation is taking part on an OpenStack VM in a company’s machines behind a proxy server.

Also note that since I have deleted the root privileges installation instance of Tutor, and installed another instance via venv, I can only access tutor commands through that virtual environment with local privileges… as it is not mentioned in the documentation I suppose that this is normal operation, right?

That does sound about right, there are post-installation requirements for Docker that affect it’s privileges but I’m going to make an assumption yours is configured properly if you’ve gotten this far.

In my opinion the issue likely relates to the proxy itself, possibly that its doing TLS/SSL inspection which might break the certificate chain, or perhaps its blocking/rewriting some URLs, sometimes proxies are known to break IPv6 resolution as well. There’s many things it could be, but unfortunately these fall outside the scope of Tutor/OpenEdX so our ability to assist here may be limited. If your corporate IT policies allow it then maybe your network admin can whitelist your host on the proxy server to allow a bypass (even if just temporary for troubleshooting).

1 Like