Access Jupyter hub with FQDN

Hello guys,

I have a strange situation about accessing the Jupyterhub website. And i dont know how to solve this problem.
I open the 443 port and added ssl cert and key in the jupyterhub_config.py

c = get_config() #noqa
c.JupyterHub.ssl_key = ‘/etc/letsencrypt/live//privkey.pem’
c.JupyterHub.ssl_cert = ‘/etc/letsencrypt/live//fullchain.pem’
c.JupyterHub.ip = ‘xxx.xxx.xx.xxx’
c.JupyterHub.port = 443

After running jupyterhub, the website is accessable. The users will be redirected to the login Website. But after one moment, it is not accessable again. You have to wait for a while, until it is automatically accessable again. I also checked the process running on port 443, it indicates port 443 is still listening. Can some one help me please.

Could you post your JupyterHub logs here? Without logs it is impossible to help you debug your problem.

No, we will need JupyterHub logs. How did you deploy JupyterHub service?

If you have deployed JupyterHub as a systemd service, you can get the logs from journalctl -u <name_of_the_service>. If you have used docker/podman, you can get logs from docker/podman logs -f <name_of_container>.

There is no log from syystemd

– Logs begin at Tue 2024-02-06 10:44:03 UTC, end at Wed 2024-02-07 14:24:59 UTC. –
– No entries –

But this seems to be helpful?

[I 2024-02-07 14:18:01.099 JupyterHub log:191] 200 GET /hub/home (gyq@xx.xx.xxx.x) 2.99ms
[I 2024-02-07 14:18:02.068 JupyterHub login:44] User logged out: gyq
[I 2024-02-07 14:18:02.070 JupyterHub log:191] 302 GET /hub/logout → /hub/login (@xx.xx.xxx.x) 3.53ms
[I 2024-02-07 14:18:02.080 JupyterHub log:191] 200 GET /hub/login (@xx.xx.xxx.x) 1.60ms
[I 2024-02-07 14:18:05.320 JupyterHub log:191] 200 GET /hub/login (@xx.xx.xxx.x) 1.76ms
Starting here the website is no more accessable
14:22:18.237 [ConfigProxy] info: 200 GET /api/routes

I can only login for 2 minutes, and the website is no longer accessable.
[/quote]

There is nothing strange in the logs you posted. So, there are no logs between 14:18:05.320 and 14:22:18.237? If it is the case, I guess the issue is somewhere outside of JupyterHub, mostly on your edge. Maybe there is some firewall that is blocking the server?

2 Likes

Thanks for your reply. I will try it on another edge device!

What responses do your clients receive?

Hello Guys,

i think the erro is from Traefik.
I used Certbot to generate SSL Certificat automatically in location /etc/letsencrypt/live/mydomain/fullchain.pem.
It works well for a while. And after one day, the Certificat is not available any more. See the logs of trafik:

Feb 28 17:56:01 gruppe-a systemd[1]: Stopping traefik.service…
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=info msg=“I have to go…”
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=info msg=“Stopping server gracefully”
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=error msg=“accept tcp [::]:443: use of closed network connection” entryPointName=https
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=error msg=“accept tcp 127.0.0.1:8099: use of closed network connection” entryPointName=auth_api
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=error msg=“accept tcp [::]:80: use of closed network connection” entryPointName=http
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=error msg=“Error while starting server: accept tcp [::]:80: use of closed network connection” entryPointName=http
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=error msg=“Error while starting server: accept tcp [::]:443: use of closed network connection” entryPointName=https
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=error msg=“close tcp 127.0.0.1:8099: use of closed network connection” entryPointName=auth_api
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=info msg=“Server stopped”
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=info msg=“Shutting down”
Feb 28 17:56:01 gruppe-a traefik[63046]: time=“2024-02-28T17:56:01Z” level=error msg="Error while creating certificate store: unable to find certificate for domains "xxxxx": falling back to t>
Feb 28 17:56:01 gruppe-a systemd[1]: traefik.service: Succeeded.
Feb 28 17:56:01 gruppe-a systemd[1]: Stopped traefik.service.

And This error logs for find TLS Certoficate:

Feb 28 17:43:10 gruppe-a traefik[62410]: time=“2024-02-28T17:43:10Z” level=info msg=“Testing certificate renew…” providerName=letsencrypt.acme ACME CA="https://acme-v02.api.letsenc>
Feb 28 17:43:10 gruppe-a traefik[62410]: time=“2024-02-28T17:43:10Z” level=error msg="Error while creating certificate store: unable to find certificate for domains "17871e1f-ce3e-4>
Feb 28 17:43:11 gruppe-a traefik[62410]: time=“2024-02-28T17:43:11Z” level=warning msg=“TLS store default already configured, skipping” providerName=file filename=rules.toml
Feb 28 17:43:11 gruppe-a traefik[62410]: time=“2024-02-28T17:43:11Z” level=warning msg=“TLS store default already configured, skipping” providerName=file filename=rules.toml
Feb 28 17:43:11 gruppe-a traefik[62410]: time=“2024-02-28T17:43:11Z” level=warning msg=“TLS store default already configured, skipping” providerName=file filename=rules.toml
Feb 28 17:43:11 gruppe-a traefik[62410]: time=“2024-02-28T17:43:11Z” level=warning msg=“TLS store default already configured, skipping” filename=rules.toml providerName=file
Feb 28 17:43:11 gruppe-a traefik[62410]: time=“2024-02-28T17:43:11Z” level=warning msg=“TLS store default already configured, skipping” providerName=file filename=rules.toml
Feb 28 17:43:11 gruppe-a traefik[62410]: time=“2024-02-28T17:43:11Z” level=warning msg=“TLS store default already configured, skipping” providerName=file filename=rules.toml
Feb 28 17:43:11 gruppe-a traefik[62410]: time=“2024-02-28T17:43:11Z” level=warning msg=“TLS store default already configured, skipping” providerName=file filename=rules.toml
Feb 28 17:43:11 gruppe-a traefik[62410]: time=“2024-02-28T17:43:11Z” level=warning msg=“TLS store default already configured, skipping” providerName=file filename=rules.toml