Issue spinning up JupyterHub after upgrade

I followed this page, created a new conda environment (anaconda3TEST), and (sudo) installed a new version of JupyterHub in Linux. I am an admin and the Hub needs to be accessed by multiple users.

Some configs and command results are as follow:

[MYNAME@rp000042849 ~]$ cat /proc/version
Linux version 4.18.0-513.11.1.el8_9.x86_64 (mockbuild@x86-64-02.build.eng.rdu2.redhat.com) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-20) (GCC)) #1 SMP Thu Dec 7 03:06:13 EST 2023

[MYNAME@rp000042849 ~]$ hostname -I
10.28.213.1

[MYNAME@rp000042849 ~]$ /app/jupyterlab/anaconda3TEST/bin/python --version
Python 3.11.7

[MYNAME@rp000042849 ~]$ /app/jupyterlab/anaconda3TEST/bin/jupyterhub --version
4.1.5

[MYNAME@rp000042849 ~]$ /app/jupyterlab/anaconda3TEST/bin/configurable-http-proxy --version
4.6.1

[MYNAME@rp000042849 ~]$ /app/jupyterlab/anaconda3TEST/bin/jupyter --version
Selected Jupyter core packages…
IPython : 8.20.0
ipykernel : 6.28.0
ipywidgets : 7.6.5
jupyter_client : 8.6.0
jupyter_core : 5.5.0
jupyter_server : 2.10.0
jupyterlab : 4.0.11
nbclient : 0.8.0
nbconvert : 7.10.0
nbformat : 5.9.2
notebook : 7.0.8
qtconsole : 5.4.2
traitlets : 5.7.1

Then I generated a brand new config file

[MYNAME@rp000042849 ~]$ sudo /app/jupyterlab/anaconda3TEST/bin/jupyterhub --generate-config

and modified these 3 lines (last line gets commented out because the lib has been depreciated I think). I am not 100% confident that these are helping or hurting.

c.Authenticator.delete_invalid_users = True
c.ConfigurableHTTPProxy.command = ‘/app/jupyterlab/anaconda3TEST/bin/configurable-http-proxy’
#c.Spawner.cmd = [‘jupyter-labhub’]

After this, I ran (as sudo)

[MYNAME@rp000042849 ~]$ sudo /app/jupyterlab/anaconda3TEST/bin/jupyterhub --ip=10.28.213.1 --port=8000 -f=/app/jupyterlab/jupyterhub_config.py > /app/jupyterlab/jupyterhub.log 2>&1 &

Then I went to the same location I used to go to login to Hub, but the URL seems out of reach

Note1: Here is list of working-dir files

[MYNAME@rp000042849 ~]$ ls -alt /app/jupyterlab/
total 1021620
-rw-rw-r–. 1 root hpsasfin 665 Apr 7 15:28 jupyterhub.log
drwxrwsr-x. 6 erunfic1 hpsasfin 268 Apr 7 15:28 .
drwxrwsr-x. 2 erunfic1 hpsasfin 86 Apr 7 15:28 bak
-rwxrwxrwx. 1 root hpsasfin 57337 Apr 7 14:42 jupyterhub_config.py
-rwsrwsrwt. 1 root hpsasfin 192512 Apr 7 14:01 jupyterhub.sqlite.2024-04-07-140139
-rw-------. 1 root hpsasfin 65 Apr 7 12:22 jupyterhub_cookie_secret
drwxr-s—. 27 root hpsasfin 4096 Apr 7 11:14 anaconda3TEST
drwxrwsr-x. 17 xxxxxx hpsasfin 283 Apr 7 10:36 …
drwxr-s—. 31 root hpsasfin 4096 Apr 6 20:14 anaconda3
-rw-r-----. 1 root hpsasfin 1045673900 Apr 6 18:57 Anaconda3-2024.02-1-Linux-x86_64.sh
-rwsrwsrwt. 1 root hpsasfin 192512 Apr 6 13:59 jupyterhub.sqlite
drwxrwsr-x. 28 erunfic1 hpsasfin 4096 Feb 4 2022 anaconda3BAK

Note2: content of log file is as follow

[MYNAME@rp000042849 ~]$ cat /app/jupyterlab/jupyterhub.log
[I 2024-04-07 15:28:01.062 JupyterHub app:2885] Running JupyterHub version 4.1.5
[I 2024-04-07 15:28:01.062 JupyterHub app:2915] Using Authenticator: jupyterhub.auth.PAMAuthenticator-4.1.5
[I 2024-04-07 15:28:01.062 JupyterHub app:2915] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-4.1.5
[I 2024-04-07 15:28:01.062 JupyterHub app:2915] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-4.1.5
[I 2024-04-07 15:28:01.069 JupyterHub app:1683] Loading cookie_secret from /app/jupyterlab/jupyterhub_cookie_secret
Found database schema version 4dc2d5a8c53c != 0eee8c825d24. Backup your database and run jupyterhub upgrade-db to upgrade to the latest schema.

Appreciate any help/tips anyone can offer!

It says here what exactly you need to do. Run jupyterhub upgrade-db.

2 Likes

Hey @ianalis thanks for replying, did that already, still getting the same error.

Can you share the command and output of the upgrade-db? Make sure it’s run in the same directory / with the same config as the real jupyterhub launch

I had to run jupyterhub upgrade-db with sudo, that took care of the issue. Thanks for the help.