jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.01k stars 341 forks source link

TLJH not working after upgrading from Ubuntu 18.04 to 22.04 #957

Open vsisl opened 7 months ago

vsisl commented 7 months ago

Bug description

After upgrading from Ubuntu 18.04 to 22.04, my TLJH installation stopped working.

When going to http://localhost:80, I get "Bad Gateway".

Systemctl says that jupyterhub.service failed to start.

$ sudo systemctl status jupyterhub.service
× jupyterhub.service
     Loaded: loaded (/etc/systemd/system/jupyterhub.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-12-12 11:59:16 CET; 12min ago
    Process: 6346 ExecStart=/opt/tljh/hub/bin/python3 -m jupyterhub.app -f /opt/tljh/hub/lib/python3.6/site-packages/tljh/jupyterhub_config.py --upgrade-db (code=exited, status=1/FAILURE)
   Main PID: 6346 (code=exited, status=1/FAILURE)
        CPU: 74ms

Dez 12 11:59:16 Persephone systemd[1]: jupyterhub.service: Scheduled restart job, restart counter is at 5.
Dez 12 11:59:16 Persephone systemd[1]: Stopped jupyterhub.service.
Dez 12 11:59:16 Persephone systemd[1]: jupyterhub.service: Start request repeated too quickly.
Dez 12 11:59:16 Persephone systemd[1]: jupyterhub.service: Failed with result 'exit-code'.
Dez 12 11:59:16 Persephone systemd[1]: Failed to start jupyterhub.service.

tljh-config reload hub throws an error.

$ sudo tljh-config reload hub
Traceback (most recent call last):
  File "/usr/bin/tljh-config", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'

Edit: Here's output of journalctl -u jupyterhub

$ journalctl -u jupyterhub
Dez 12 11:59:16 Persephone systemd[1]: Started jupyterhub.service.
Dez 12 11:59:16 Persephone python3[6346]: /opt/tljh/hub/bin/python3: Error while finding module specification for 'jupyterhub.app' (ModuleNotFoundError: No module named 'jupyterhub')
Dez 12 11:59:16 Persephone systemd[1]: jupyterhub.service: Main process exited, code=exited, status=1/FAILURE
Dez 12 11:59:16 Persephone systemd[1]: jupyterhub.service: Failed with result 'exit-code'.
Dez 12 11:59:16 Persephone systemd[1]: jupyterhub.service: Scheduled restart job, restart counter is at 5.
Dez 12 11:59:16 Persephone systemd[1]: Stopped jupyterhub.service.
Dez 12 11:59:16 Persephone systemd[1]: jupyterhub.service: Start request repeated too quickly.
Dez 12 11:59:16 Persephone systemd[1]: jupyterhub.service: Failed with result 'exit-code'.
Dez 12 11:59:16 Persephone systemd[1]: Failed to start jupyterhub.service.

How to reproduce

  1. Installed TLJH on Ubuntu 18.04 following documentation. (This was done a few years ago already.) In particular, I used Xubuntu 18.04.
  2. Upgraded to Xubuntu 22.04 using desktop environment.
  3. TLJH not working anymore.

Any help would be highly appreciated! Please let me know if I should supply additional information.

welcome[bot] commented 7 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada: