level=error msg="failed to load x509 key pair: tls: failed to find PEM stat in certificate imputes"
kerwinkfs opened this issue · 12 comments
Hello Luca,
I"m using your example as is. I run docker-compose build and up. I'm not able to reach localhost after compose up is complete. Looking through the output I see the error: level-error msg=failed to load x509 key pair: tls: failed to find PEM stat in certificate imputes"
I tried replacing the authentication method to the GitLab example as well, but still the same error.
They cert files are there.
Any thoughts?
Thanks
Kerwin
This error seems to be related to TLS keys and certficates, which are not related to the present configuration. Maybe related to the way you have another web server (ngingx or apache, maybe) set up?
Thank you for your quick response. Ok, I got pass that point with the certs. Now when I go to localhost:8000 I Safari Can't Connect to Server.
Thoughts?
Kerwin
Sorry about my previous nonsense answer. I should have told you to look into /etc/certs
, but somehow forgot that traefik was managing the certs.
Re you newer question, I don't know why you're trying to connect on port 8000. The traefik proxy is set to listen on ports 80 (http) and 443 (https):
jupyterhub-docker/docker-compose.yml
Lines 30 to 33 in d2e20a3
If you haven't touched the configuration, then that's where you should point your browser.
No problem. But it's hard for me to help without seeing your docker-compose.yml at the very least.
So, given this file, the traefik dashboard should be listening on port 8080, and the jupyterhub server on port 80. If those ports are unresponsive, then check that trafik is running.
I don't understand what you are trying to achieve with this rule: "traefik.frontend.rule=Host:http://jupyterhub:8081"
. Presumably, because of this, traefik will fail to forward traffic from port 80 to the jupyterhub host. Please read about Traefik fronteds to understand what goes in this rule (and whether you need it at all).
The original will not work for you either. That's the name of the server where you're going to host the service. You do have a server with an assigned DNS name, right?
You should disregard the URLs that JupyterHub writes in the logs, such as http://localhost:8081
: those are local to the container, and not reachable from outside (e.g., from your browser).
Traefik is doing the job of proxying connections to the various containers. That Host:...
rule is telling Traefik to proxy all connections to jupyter.ens.uvsq.fr
to the jupyterhub container. You should replace jupyter.ens.uvsq.fr
with the name of your server everywhere. You will not be able to reach JupyterHub via localhost
, only via that name.
If you want to also access JupyterHub via localhost, then you can add more Traefik directives in the labels
section. Check out the Traefik docs.
If you're unsure whether traefik is running and/or properly detecting docker containers, go to the dashboard on http://localhost:8080/
.