Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 page not found #7

Open
Hanuth opened this issue Jul 15, 2019 · 4 comments
Open

404 page not found #7

Hanuth opened this issue Jul 15, 2019 · 4 comments

Comments

@Hanuth
Copy link

Hanuth commented Jul 15, 2019

I have tried to implement this setup.
But when I start the environment, I always get "404 page not found" when I try to reach jupyterhub. Both containers, trafik and jupyterhub are running though. It seems like traefik is not recognizing the jupyterhub container.

Do you have any suggestions?

@defeo
Copy link
Owner

defeo commented Jul 15, 2019

Did you mount the docker socket properly, here:

- /var/run/docker.sock:/var/run/docker.sock

The path may be dependent on your local docker installation.

@defeo
Copy link
Owner

defeo commented Jul 15, 2019

If you go to the traefik dashboard, you want to see something like this in the "Backends":

Screenshot_2019-07-15 Traefik

which shows that Traefik has detected the Jupyterhub container. If the lables are set properly, something like this should show up in the "Frontends":

Screenshot_2019-07-15 Traefik(1)

@dccannon
Copy link

I was able to solve this issue on my localhost by setting HOST (in .env) to 127.0.0.1, and then navigating in my browser to http://127.0.0.1. When visiting http://localhost, I see this 404 message again, but it works fine if I visit http://127.0.0.1.

Unfortunately, however, when I deployed this up to an EC2 instance, I'm now encountering this issue again, and I cannot seem to find anyway around it. I've set HOST to my domain name, and also tried setting it to the IP of the server, to localhost, to 127.0.0.1 -- nothing seems to work.

I also can't, for the life of me, access the traefik dashboard on the EC2 instance. On my localhost, I just visit http://127.0.0.1:8080 in a browser. However, on the EC2 instance -- by which I mean, even if I ssh into the server and run wget 127.0.0.1:8080 -- I just get a read error / connection reset by peer. I even tried tunneling that port onto my localhost just to be sure, and same issue.

Any thoughts on possible debugging steps?

@dccannon
Copy link

I got to the bottom of it! When running docker-compose on a remote host (with docker-compose -H "user@host"), it was unable to find the traefik config. Solved by copying the config onto the remote host at /etc/traefik and then updating docker-compose.yml:

-      - ./reverse-proxy/traefik.toml:/etc/traefik/traefik.toml
+      - /etc/traefik/traefik.toml:/etc/traefik/traefik.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants