Hello,
I am reaching out to you because we are setting up a new infrastructure and the migration of JupyterHub from version 1 to version 4.1.0 is not working at all. We have a Slurm cluster that runs Singularity containers in which we have added Jupyterhub & batchspawner.
Today, even without the Singularity part, hub not working.
jupyterhub_config.py :
import os
import importlib.machinery
c = get_config()
c.JupyterHub.ip = 'r9jupyter.domain.fr'
c.JupyterHub.hub_ip = 'r9jupyter.domain.fr'
c.JupyterHub.reset_db = True
c.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner'
import batchspawner
c.BatchSpawnerBase.req_host = 'r9jupyter.domain.fr'
c.BatchSpawnerBase.req_queue = 'r9jupyter'
c.BatchSpawnerBase.req_runtime = '12:00:00'
bscript = '''#!/bin/bash
#SBATCH --time={runtime}
#SBATCH --output={homedir}/jupyterlab-%j.output
#SBATCH --error={homedir}/jupyterlab-%j.error
#SBATCH --job-name=jupyterlab
#SBATCH --export={keepvars}
#SBATCH --mail-user=william.vincent@domain.fr
#SBATCH --ntasks=1
#SBATCH --partition={partition}
#SBATCH --chdir={homedir}
#SBATCH --get-user-env=L
set -x
#set -euo pipefail
trap 'echo SIGTERM received' TERM
{prologue}
#echo "# With Singularity "
export SINGULARITYENV_JUPYTERHUB_API_TOKEN=$JUPYTERHUB_API_TOKEN
export SINGULARITYENV_XDG_RUNTIME_DIR=$HOME/.singularity-jupyter-run
export SINGULARITYENV_CONTAINER_PATH=/apps/containerCollections/CUDA12/pytorch2-will.sif
#srun singularity exec --env JUPYTER_PORT=0 --bind $PWD:/run/user $SINGULARITYENV_CONTAINER_PATH {cmd} > jupyter.debug 2>&1
#echo "# Without Singularity "
module load Python/3.12.2
{cmd} > jupyter.debug 2>&1
echo "jupyterhub-singleuser ended gracefully"
{epilogue}
echo "# end"
'''
c.ProfilesSpawner.profiles = [
('24CPUNodes', '24CPUNodes', 'batchspawner.SlurmSpawner',dict(req_partition='24CPUNodes',batch_script=bscript)),
('GPUNodes1080-dev', 'GPUNodes1080-dev', 'batchspawner.SlurmSpawner',dict(req_partition='GPUNodes1080-dev',batch_script=bscript)),
]
# c.ProfilesSpawner.ip = '$HOSTNAME'
#c.Spawner.args = ["--debug" ]
c.Spawner.default_url = '/lab'
c.Spawner.notebook_dir = '~'
# c.Spawner.ip = '$HOSTNAME'
# c.Spawner.port = 0
# c.Spawner.hub_connect_url = "https://r9jupyter.domain.fr" # that not work
c.Spawner.start_timeout = 300
c.Spawner.http_timeout = 300
#c.Spawner.debug = True
First issue : without singularity
If I run it like this, here is the log:
jupyterhub -f /etc/jupyterhub/jupyterhub_config.py --debug
[D 2024-03-20 16:06:16.593 JupyterHub application:908] Looking for /etc/jupyterhub/jupyterhub_config in /etc/jupyterhub
[D 2024-03-20 16:06:16.602 JupyterHub application:929] Loaded config file: /etc/jupyterhub/jupyterhub_config.py
[I 2024-03-20 16:06:16.612 JupyterHub app:2885] Running JupyterHub version 4.1.0
[I 2024-03-20 16:06:16.612 JupyterHub app:2915] Using Authenticator: jupyterhub.auth.PAMAuthenticator-4.1.0
[I 2024-03-20 16:06:16.613 JupyterHub app:2915] Using Spawner: wrapspawner.wrapspawner.ProfilesSpawner
[I 2024-03-20 16:06:16.613 JupyterHub app:2915] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-4.1.0
[D 2024-03-20 16:06:16.617 JupyterHub app:2842] Could not load pycurl: No module named 'pycurl'
pycurl is recommended if you have a large number of users.
[I 2024-03-20 16:06:16.618 JupyterHub app:1683] Loading cookie_secret from /etc/jupyterhub/jupyterhub_cookie_secret
[D 2024-03-20 16:06:16.618 JupyterHub app:1852] Connecting to db: sqlite:///jupyterhub.sqlite
[D 2024-03-20 16:06:16.771 JupyterHub orm:997] Stamping empty database with alembic revision 0eee8c825d24
[I 2024-03-20 16:06:16.773 alembic.runtime.migration migration:216] Context impl SQLiteImpl.
[I 2024-03-20 16:06:16.774 alembic.runtime.migration migration:219] Will assume non-transactional DDL.
[I 2024-03-20 16:06:17.193 JupyterHub proxy:557] Generating new CONFIGPROXY_AUTH_TOKEN
[D 2024-03-20 16:06:17.193 JupyterHub app:2125] Loading roles into database
[I 2024-03-20 16:06:17.467 JupyterHub app:2005] Not using allowed_users. Any authenticated user will be allowed.
[D 2024-03-20 16:06:17.472 JupyterHub app:2364] Purging expired APITokens
[D 2024-03-20 16:06:17.477 JupyterHub app:2364] Purging expired OAuthCodes
[D 2024-03-20 16:06:17.479 JupyterHub app:2200] Loading role assignments from config
[D 2024-03-20 16:06:17.486 JupyterHub app:2523] Initializing spawners
[D 2024-03-20 16:06:17.487 JupyterHub app:2658] Loaded users:
[I 2024-03-20 16:06:17.488 JupyterHub app:2954] Initialized 0 spawners in 0.002 seconds
[I 2024-03-20 16:06:17.492 JupyterHub metrics:279] Found 0 active users in the last ActiveUserPeriods.twenty_four_hours
[I 2024-03-20 16:06:17.492 JupyterHub metrics:279] Found 0 active users in the last ActiveUserPeriods.seven_days
[I 2024-03-20 16:06:17.493 JupyterHub metrics:279] Found 0 active users in the last ActiveUserPeriods.thirty_days
[W 2024-03-20 16:06:17.493 JupyterHub proxy:747] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
[I 2024-03-20 16:06:17.493 JupyterHub proxy:751] Starting proxy @ http://r9jupyter.domain.fr:8000/
[D 2024-03-20 16:06:17.493 JupyterHub proxy:752] Proxy cmd: ['configurable-http-proxy', '--ip', 'r9jupyter.domain.fr', '--port', '8000', '--api-ip', '127.0.0.1', '--api-port', '8001', '--error-target', 'http://r9jupyter.domain.fr:8081/hub/error', '--log-level', 'info']
[D 2024-03-20 16:06:17.498 JupyterHub proxy:671] Writing proxy pid file: jupyterhub-proxy.pid
[D 2024-03-20 16:06:17.499 JupyterHub utils:264] Waiting 10s for server at r9jupyter.domain.fr:8000
[D 2024-03-20 16:06:17.501 JupyterHub utils:111] Server at r9jupyter.domain.fr:8000 not ready: [Errno 111] Connection refused
[D 2024-03-20 16:06:17.501 JupyterHub utils:264] Waiting 10s for server at 127.0.0.1:8001
[D 2024-03-20 16:06:17.501 JupyterHub utils:111] Server at 127.0.0.1:8001 not ready: [Errno 111] Connection refused
[D 2024-03-20 16:06:17.521 JupyterHub utils:111] Server at r9jupyter.domain.fr:8000 not ready: [Errno 111] Connection refused
[D 2024-03-20 16:06:17.523 JupyterHub utils:111] Server at 127.0.0.1:8001 not ready: [Errno 111] Connection refused
[D 2024-03-20 16:06:17.552 JupyterHub utils:111] Server at 127.0.0.1:8001 not ready: [Errno 111] Connection refused
16:06:17.725 [ConfigProxy] info: Proxying http://r9jupyter.domain.fr:8000 to (no default)
16:06:17.727 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
[D 2024-03-20 16:06:17.918 JupyterHub utils:274] Server at r9jupyter.domain.fr:8000 responded in 0.42s
[D 2024-03-20 16:06:17.944 JupyterHub utils:274] Server at 127.0.0.1:8001 responded in 0.44s
[D 2024-03-20 16:06:17.944 JupyterHub proxy:831] Proxy started and appears to be up
[D 2024-03-20 16:06:17.948 JupyterHub proxy:924] Proxy: Fetching GET http://127.0.0.1:8001/api/routes
16:06:17.965 [ConfigProxy] info: 200 GET /api/routes
[I 2024-03-20 16:06:17.965 JupyterHub app:3204] Hub API listening on http://r9jupyter.domain.fr:8081/hub/
[D 2024-03-20 16:06:17.965 JupyterHub proxy:390] Fetching routes to check
[D 2024-03-20 16:06:17.965 JupyterHub proxy:924] Proxy: Fetching GET http://127.0.0.1:8001/api/routes
16:06:17.967 [ConfigProxy] info: 200 GET /api/routes
[D 2024-03-20 16:06:17.967 JupyterHub proxy:393] Checking routes
[I 2024-03-20 16:06:17.967 JupyterHub proxy:478] Adding route for Hub: / => http://r9jupyter.domain.fr:8081
[D 2024-03-20 16:06:17.968 JupyterHub proxy:924] Proxy: Fetching POST http://127.0.0.1:8001/api/routes/
16:06:17.970 [ConfigProxy] info: Adding route / -> http://r9jupyter.domain.fr:8081
16:06:17.971 [ConfigProxy] info: Route added / -> http://r9jupyter.domain.fr:8081
16:06:17.971 [ConfigProxy] info: 201 POST /api/routes/
[I 2024-03-20 16:06:17.971 JupyterHub app:3271] JupyterHub is now running at http://r9jupyter.domain.fr:8000/
[D 2024-03-20 16:06:17.972 JupyterHub app:2878] It took 1.382 seconds for the Hub to start
[I 2024-03-20 16:06:22.387 JupyterHub log:192] 302 GET / -> /hub/ (@xxx.xxx.4.106) 2.09ms
[W 2024-03-20 16:06:22.467 JupyterHub base:480] Invalid cookie token
[I 2024-03-20 16:06:22.469 JupyterHub log:192] 302 GET /hub/ -> /hub/login?next=%2Fhub%2F (@xxx.xxx.4.106) 9.17ms
[W 2024-03-20 16:06:22.516 JupyterHub base:480] Invalid cookie token
[D 2024-03-20 16:06:22.517 JupyterHub _xsrf_utils:137] xsrf id mismatch b'd7d8defe6da747e897e18966ea64dac6:1b87285ca9b349d1a8093e334af56e3c' != b'd7d8defe6da747e897e18966ea64dac6:ibeGjLpkpp9LNy9w5jDbRC1kfnNkIdAghLSQt2OZvPY='
[I 2024-03-20 16:06:22.517 JupyterHub _xsrf_utils:159] Setting new xsrf cookie for b'd7d8defe6da747e897e18966ea64dac6:ibeGjLpkpp9LNy9w5jDbRC1kfnNkIdAghLSQt2OZvPY=' {'path': '/hub/', 'max_age': 3600}
[I 2024-03-20 16:06:22.544 JupyterHub log:192] 200 GET /hub/login?next=%2Fhub%2F (@xxx.xxx.4.106) 31.54ms
[D 2024-03-20 16:06:22.965 JupyterHub log:192] 200 GET /hub/static/favicon.ico?v=fde5757cd3892b979919d3b1faa88a410f28829feb5ba22b6cf069f2c6c98675fceef90f932e49b510e74d65c681d5846b943e7f7cc1b41867422f0481085c1f (@xxx.xxx.4.106) 9.43ms
[W 2024-03-20 16:06:31.481 JupyterHub base:480] Invalid cookie token
[D 2024-03-20 16:06:31.599 JupyterHub roles:282] Assigning default role to User wvincent
[I 2024-03-20 16:06:31.606 JupyterHub roles:239] Adding role user for User: wvincent
[D 2024-03-20 16:06:31.670 JupyterHub roles:282] Assigning default role to User wvincent
[W 2024-03-20 16:06:31.681 JupyterHub base:480] Invalid cookie token
[D 2024-03-20 16:06:31.681 JupyterHub base:667] Setting cookie for wvincent: jupyterhub-hub-login
[D 2024-03-20 16:06:31.681 JupyterHub base:663] Setting cookie jupyterhub-hub-login: {'httponly': True, 'path': '/hub/'}
[I 2024-03-20 16:06:31.682 JupyterHub base:925] User logged in: wvincent
[I 2024-03-20 16:06:31.682 JupyterHub log:192] 302 POST /hub/login?next=%2Fhub%2F -> /hub/ (wvincent@xxx.xxx.4.106) 204.91ms
[D 2024-03-20 16:06:31.765 JupyterHub base:357] Recording first activity for <User(wvincent 0/1 running)>
[D 2024-03-20 16:06:31.779 JupyterHub user:431] Creating <class 'wrapspawner.wrapspawner.ProfilesSpawner'> for wvincent:
[W 2024-03-20 16:06:31.781 JupyterHub spawner:172]
The shared database session at Spawner.db is deprecated, and will be removed.
Please manage your own database and connections.
Contact JupyterHub at https://github.com/jupyterhub/jupyterhub/issues/3700
if you have questions or ideas about direct database needs for your Spawner.
[I 2024-03-20 16:06:31.784 JupyterHub log:192] 302 GET /hub/ -> /hub/spawn (wvincent@xxx.xxx.4.106) 21.28ms
[D 2024-03-20 16:06:31.850 JupyterHub scopes:884] Checking access to /hub/spawn via scope servers
[D 2024-03-20 16:06:31.850 JupyterHub scopes:697] Argument-based access to /hub/spawn via servers
[D 2024-03-20 16:06:31.851 JupyterHub pages:210] Serving options form for wvincent
[D 2024-03-20 16:06:31.851 JupyterHub _xsrf_utils:137] xsrf id mismatch b'd7d8defe6da747e897e18966ea64dac6:ibeGjLpkpp9LNy9w5jDbRC1kfnNkIdAghLSQt2OZvPY=' != b'd7d8defe6da747e897e18966ea64dac6:d7aa9d8e0be3471ca0e3c3533feb1b74'
[I 2024-03-20 16:06:31.852 JupyterHub _xsrf_utils:159] Setting new xsrf cookie for b'd7d8defe6da747e897e18966ea64dac6:d7aa9d8e0be3471ca0e3c3533feb1b74' {'path': '/hub/'}
[I 2024-03-20 16:06:31.861 JupyterHub log:192] 200 GET /hub/spawn (wvincent@xxx.xxx.4.106) 14.35ms
[D 2024-03-20 16:06:32.087 JupyterHub log:192] 200 GET /hub/static/favicon.ico?v=fde5757cd3892b979919d3b1faa88a410f28829feb5ba22b6cf069f2c6c98675fceef90f932e49b510e74d65c681d5846b943e7f7cc1b41867422f0481085c1f (@xxx.xxx.4.106) 1.71ms
[D 2024-03-20 16:06:39.246 JupyterHub scopes:884] Checking access to /hub/spawn via scope servers
[D 2024-03-20 16:06:39.246 JupyterHub scopes:697] Argument-based access to /hub/spawn via servers
[D 2024-03-20 16:06:39.247 JupyterHub pages:258] Triggering spawn with supplied form options for wvincent
[D 2024-03-20 16:06:39.248 JupyterHub base:1049] Initiating spawn for wvincent
[D 2024-03-20 16:06:39.248 JupyterHub base:1053] 0/100 concurrent spawns
[D 2024-03-20 16:06:39.248 JupyterHub base:1058] 0 active servers
[I 2024-03-20 16:06:39.476 JupyterHub provider:660] Creating oauth client jupyterhub-user-wvincent
[D 2024-03-20 16:06:39.621 JupyterHub user:797] Calling Spawner.start for wvincent
[I 2024-03-20 16:06:39.628 JupyterHub batchspawner:281] Spawner script options: {'account': '', 'cluster': '', 'epilogue': '', 'gres': '', 'homedir': '/home/wvincent', 'host': 'r9jupyter.domain.fr', 'keepvars': 'PATH,LANG,JUPYTERHUB_API_TOKEN,JPY_API_TOKEN,JUPYTERHUB_CLIENT_ID,JUPYTERHUB_COOKIE_HOST_PREFIX_ENABLED,JUPYTERHUB_HOST,JUPYTERHUB_OAUTH_CALLBACK_URL,JUPYTERHUB_OAUTH_SCOPES,JUPYTERHUB_OAUTH_ACCESS_SCOPES,JUPYTERHUB_OAUTH_CLIENT_ALLOWED_SCOPES,JUPYTERHUB_USER,JUPYTERHUB_SERVER_NAME,JUPYTERHUB_API_URL,JUPYTERHUB_ACTIVITY_URL,JUPYTERHUB_BASE_URL,JUPYTERHUB_SERVICE_PREFIX,JUPYTERHUB_SERVICE_URL,JUPYTERHUB_ROOT_DIR,JUPYTERHUB_DEFAULT_URL,USER,HOME,SHELL', 'keepvars_extra': '', 'memory': '', 'ngpus': '', 'nprocs': '2', 'options': '', 'partition': '24CPUNodes', 'prologue': '', 'qos': '', 'queue': 'r9jupyter', 'reservation': '', 'runtime': '12:00:00', 'srun': 'srun', 'username': 'wvincent', 'cmd': 'batchspawner-singleuser jupyterhub-singleuser', 'profile': '24CPUNodes'}
[I 2024-03-20 16:06:39.628 JupyterHub batchspawner:282] Spawner submitting command: sudo -E -u wvincent sbatch --parsable
[D 2024-03-20 16:06:39.628 JupyterHub batchspawner:283] Spawner submitting script:
#!/bin/bash
#SBATCH --time=12:00:00
#SBATCH --output=/home/wvincent/jupyterlab-%j.output
#SBATCH --error=/home/wvincent/jupyterlab-%j.error
#SBATCH --job-name=jupyterlab
#SBATCH --export=PATH,LANG,JUPYTERHUB_API_TOKEN,JPY_API_TOKEN,JUPYTERHUB_CLIENT_ID,JUPYTERHUB_COOKIE_HOST_PREFIX_ENABLED,JUPYTERHUB_HOST,JUPYTERHUB_OAUTH_CALLBACK_URL,JUPYTERHUB_OAUTH_SCOPES,JUPYTERHUB_OAUTH_ACCESS_SCOPES,JUPYTERHUB_OAUTH_CLIENT_ALLOWED_SCOPES,JUPYTERHUB_USER,JUPYTERHUB_SERVER_NAME,JUPYTERHUB_API_URL,JUPYTERHUB_ACTIVITY_URL,JUPYTERHUB_BASE_URL,JUPYTERHUB_SERVICE_PREFIX,JUPYTERHUB_SERVICE_URL,JUPYTERHUB_ROOT_DIR,JUPYTERHUB_DEFAULT_URL,USER,HOME,SHELL
#SBATCH --mail-user=william.vincent@domain.fr
#SBATCH --ntasks=1
#SBATCH --partition=24CPUNodes
#SBATCH --chdir=/home/wvincent
#SBATCH --get-user-env=L
set -x
#set -euo pipefail
trap 'echo SIGTERM received' TERM
#echo "# With Singularity
#export SINGULARITYENV_JUPYTERHUB_API_TOKEN=$JUPYTERHUB_API_TOKEN
#export SINGULARITYENV_XDG_RUNTIME_DIR=$HOME/.singularity-jupyter-run
#export SINGULARITYENV_CONTAINER_PATH=/apps/containerCollections/CUDA12/pytorch2-will.sif
#singularity exec --env JUPYTER_PORT=0 --bind $PWD:/run/user $SINGULARITYENV_CONTAINER_PATH batchspawner-singleuser jupyterhub-singleuser > jupyter.debugsing 2>&1
echo "# Without Singularity "
module load Python/3.12.2
batchspawner-singleuser jupyterhub-singleuser > jupyter.debug 2>&1
echo "jupyterhub-singleuser ended gracefully"
echo "# fin"
[D 2024-03-20 16:06:39.629 JupyterHub batchspawner:284] Spawner submitting environment: {'PATH': '/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin', 'LANG': 'en_US.UTF-8', 'JUPYTERHUB_API_TOKEN': 'd11931814c9e47fc8bc824d0698980cb', 'JPY_API_TOKEN': 'd11931814c9e47fc8bc824d0698980cb', 'JUPYTERHUB_CLIENT_ID': 'jupyterhub-user-wvincent', 'JUPYTERHUB_COOKIE_HOST_PREFIX_ENABLED': '0', 'JUPYTERHUB_HOST': '', 'JUPYTERHUB_OAUTH_CALLBACK_URL': '/user/wvincent/oauth_callback', 'JUPYTERHUB_OAUTH_SCOPES': '["access:servers!server=wvincent/", "access:servers!user=wvincent"]', 'JUPYTERHUB_OAUTH_ACCESS_SCOPES': '["access:servers!server=wvincent/", "access:servers!user=wvincent"]', 'JUPYTERHUB_OAUTH_CLIENT_ALLOWED_SCOPES': '[]', 'JUPYTERHUB_USER': 'wvincent', 'JUPYTERHUB_SERVER_NAME': '', 'JUPYTERHUB_API_URL': 'http://r9jupyter.domain.fr:8081/hub/api', 'JUPYTERHUB_ACTIVITY_URL': 'http://r9jupyter.domain.fr:8081/hub/api/users/wvincent/activity', 'JUPYTERHUB_BASE_URL': '/', 'JUPYTERHUB_SERVICE_PREFIX': '/user/wvincent/', 'JUPYTERHUB_SERVICE_URL': 'http://0.0.0.0:0/user/wvincent/', 'JUPYTERHUB_ROOT_DIR': '~', 'JUPYTERHUB_DEFAULT_URL': '/lab', 'USER': 'wvincent', 'HOME': '/home/wvincent', 'SHELL': '/bin/bash'}
[I 2024-03-20 16:06:39.744 JupyterHub batchspawner:287] Job submitted. output: 163
[D 2024-03-20 16:06:39.745 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:06:39.805 JupyterHub batchspawner:428] Job 163 still pending
[W 2024-03-20 16:06:40.249 JupyterHub base:192] Rolling back dirty objects IdentitySet([<Server(:0)>])
[I 2024-03-20 16:06:40.259 JupyterHub log:192] 302 POST /hub/spawn?_xsrf=[secret] -> /hub/spawn-pending/wvincent?_xsrf=[secret] (wvincent@xxx.xxx.4.106) 1012.19ms
[D 2024-03-20 16:06:40.306 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:06:40.399 JupyterHub scopes:884] Checking access to /hub/spawn-pending/wvincent via scope servers
[D 2024-03-20 16:06:40.400 JupyterHub scopes:697] Argument-based access to /hub/spawn-pending/wvincent via servers
[I 2024-03-20 16:06:40.402 JupyterHub pages:399] wvincent is pending spawn
[I 2024-03-20 16:06:40.406 JupyterHub log:192] 200 GET /hub/spawn-pending/wvincent?_xsrf=[secret] (wvincent@xxx.xxx.4.106) 16.70ms
[D 2024-03-20 16:06:40.578 JupyterHub scopes:884] Checking access to /hub/api/users/wvincent/server/progress via scope read:servers
[D 2024-03-20 16:06:40.578 JupyterHub scopes:697] Argument-based access to /hub/api/users/wvincent/server/progress via read:servers
[D 2024-03-20 16:06:40.877 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:06:41.456 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:06:41.505 JupyterHub base:357] Recording first activity for <APIToken('d119...', user='wvincent', client_id='jupyterhub')>
[I 2024-03-20 16:06:41.574 JupyterHub log:192] 200 POST /hub/api/batchspawner (wvincent@xxx.xxx.102.71) 77.97ms
[I 2024-03-20 16:06:41.576 JupyterHub batchspawner:462] Notebook server job 163 started at r9nc-24-1:50313
[D 2024-03-20 16:06:41.687 JupyterHub spawner:1388] Polling subprocess every 30s
[D 2024-03-20 16:06:41.732 JupyterHub utils:286] Waiting 300s for server at http://r9jupyter:0/user/wvincent/
[I 2024-03-20 16:06:42.953 JupyterHub log:192] 200 GET /hub/api (@xxx.xxx.102.71) 1.57ms
[D 2024-03-20 16:06:43.014 JupyterHub scopes:884] Checking access to /hub/api/users/wvincent/activity via scope users:activity
[D 2024-03-20 16:06:43.015 JupyterHub scopes:697] Argument-based access to /hub/api/users/wvincent/activity via users:activity
[D 2024-03-20 16:06:43.019 JupyterHub users:882] Activity for user wvincent: 2024-03-20T15:06:42.916014Z
[D 2024-03-20 16:06:43.019 JupyterHub users:900] Activity on server wvincent/: 2024-03-20T15:06:42.916014Z
[I 2024-03-20 16:06:43.095 JupyterHub log:192] 200 POST /hub/api/users/wvincent/activity (wvincent@xxx.xxx.102.71) 84.58ms
[D 2024-03-20 16:06:49.249 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[W 2024-03-20 16:06:49.346 JupyterHub base:1210] User wvincent is slow to become responsive (timeout=10)
[D 2024-03-20 16:06:49.346 JupyterHub base:1215] Expecting server for wvincent at: http://r9jupyter:0/user/wvincent/
[D 2024-03-20 16:07:11.690 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:07:41.688 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:08:11.690 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:08:41.690 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:09:11.691 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:09:41.688 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:10:11.689 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
[D 2024-03-20 16:10:41.688 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 163 -o '%T %B'
jupyter.debug
[I 2024-03-20 16:06:42.434 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-03-20 16:06:42.438 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-03-20 16:06:42.438 JupyterHubSingleUser] Starting jupyterhub single-user server extension version 4.1.0
[I 2024-03-20 16:06:42.438 JupyterHubSingleUser] Using default url from environment $JUPYTERHUB_DEFAULT_URL: /lab
[I 2024-03-20 16:06:42.441 ServerApp] jupyterhub | extension was successfully linked.
[W 2024-03-20 16:06:42.443 LabApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[I 2024-03-20 16:06:42.446 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-03-20 16:06:42.909 ServerApp] notebook_shim | extension was successfully linked.
/apps/Python/Python-3.12.2/lib/python3.12/site-packages/jupyter_server/serverapp.py:2235: JupyterServerAuthWarning: Core endpoints without @allow_unauthenticated, @ws_authenticated, nor @web.authenticated:
- GET of JupyterHubLogoutHandler registered for /user/wvincent/logout
- GET of JupyterHubOAuthCallbackHandler registered for /user/wvincent/oauth_callback
self.web_app = ServerWebApplication(
[I 2024-03-20 16:06:42.941 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-03-20 16:06:42.943 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-03-20 16:06:42.944 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-03-20 16:06:42.954 JupyterHubSingleUser] Updating Hub with activity every 300 seconds
[I 2024-03-20 16:06:42.954 ServerApp] jupyterhub | extension was successfully loaded.
[I 2024-03-20 16:06:42.958 LabApp] JupyterLab extension loaded from /apps/Python/Python-3.12.2/lib/python3.12/site-packages/jupyterlab
[I 2024-03-20 16:06:42.958 LabApp] JupyterLab application directory is /apps/Python/Python-3.12.2/share/jupyter/lab
[I 2024-03-20 16:06:42.959 LabApp] Extension Manager is 'pypi'.
[I 2024-03-20 16:06:42.998 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-03-20 16:06:42.998 ServerApp] Serving notebooks from local directory: /home/wvincent
[I 2024-03-20 16:06:42.998 ServerApp] Jupyter Server 2.13.0 is running at:
[I 2024-03-20 16:06:42.998 ServerApp] http://r9nc-24-1:50313/user/wvincent/lab?token=...
[I 2024-03-20 16:06:42.998 ServerApp] http://127.0.0.1:50313/user/wvincent/lab?token=...
[I 2024-03-20 16:06:42.998 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 2024-03-20 16:06:43.007 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
My ~/jupyterlab-xxx.output is always empty
As you can see, once everything is launched, I get âExpecting server for wvincent at: http://r9jupyter:0/user/wvincent/â. I think the problem comes from there, it does not give the correct URL, and nothing happens.
Second issue : with singularity
When I run it through Singularity, the ports are not in agreement between the Jupyter server and the Slurm node. For example, if I look at the server log, I get
[I 2024-03-20 09:06:34.651 JupyterHub batchspawner:462] Notebook server job 144 started at r9nc-24-1:35303
[D 2024-03-20 09:06:34.658 JupyterHub spawner:1384] Polling subprocess every 30s
[I 2024-03-20 09:06:37.850 JupyterHub log:191] 200 GET /hub/api (@xxx.xxx.102.71) 1.88ms
[D 2024-03-20 09:06:37.863 JupyterHub scopes:877] Checking access to /hub/api/users/wvincent/activity via scope users:activity
[D 2024-03-20 09:06:37.863 JupyterHub scopes:690] Argument-based access to /hub/api/users/wvincent/activity via users:activity
[D 2024-03-20 09:06:37.866 JupyterHub users:874] Activity for user wvincent: 2024-03-20T08:06:35.457853Z
[D 2024-03-20 09:06:37.866 JupyterHub users:892] Activity on server wvincent/: 2024-03-20T08:06:35.457853Z
[I 2024-03-20 09:06:37.908 JupyterHub log:191] 200 POST /hub/api/users/wvincent/activity (wvincent@xxx.xxx.102.71) 48.00ms
[D 2024-03-20 09:06:41.716 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[W 2024-03-20 09:06:41.812 JupyterHub base:1122] User wvincent is slow to become responsive (timeout=10)
[D 2024-03-20 09:06:41.813 JupyterHub base:1127] Expecting server for wvincent at: http://r9jupyter:0/user/wvincent/
[D 2024-03-20 09:07:04.661 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:07:34.662 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:08:04.661 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:08:34.662 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:09:04.660 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:09:34.661 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:10:04.661 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:10:34.661 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:11:04.661 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[D 2024-03-20 09:11:13.529 JupyterHub proxy:880] Proxy: Fetching GET http://127.0.0.1:8001/api/routes
09:11:13.533 [ConfigProxy] info: 200 GET /api/routes
[D 2024-03-20 09:11:13.535 JupyterHub proxy:392] Checking routes
[D 2024-03-20 09:11:31.489 JupyterHub base:344] Refreshing auth for wvincent
[D 2024-03-20 09:11:31.490 JupyterHub scopes:877] Checking access to /hub/api/users/wvincent/activity via scope users:activity
[D 2024-03-20 09:11:31.491 JupyterHub scopes:690] Argument-based access to /hub/api/users/wvincent/activity via users:activity
[D 2024-03-20 09:11:31.495 JupyterHub users:879] Not updating activity for <User(wvincent 1/1 running)>: 2024-03-20T08:06:35.457853Z < 2024-03-20T08:06:35.457853Z
[D 2024-03-20 09:11:31.495 JupyterHub users:900] Not updating server activity on wvincent/: 2024-03-20T08:06:35.457853Z < 2024-03-20T08:06:35.457853Z
[I 2024-03-20 09:11:31.496 JupyterHub log:191] 200 POST /hub/api/users/wvincent/activity (wvincent@xxx.xxx.102.71) 21.91ms
[D 2024-03-20 09:11:34.661 JupyterHub batchspawner:314] Spawner querying job: sudo -E -u wvincent squeue -h -j 144 -o '%T %B'
[W 2024-03-20 09:11:37.259 JupyterHub user:933] wvincent's server never showed up at http://r9jupyter:0/user/wvincent/ after 300 seconds. Giving up.
In job log node :
[I 2024-03-20 09:06:37.850 SingleUserNotebookApp notebookapp:2329] Serving notebooks from local directory: /home/wvincent
[I 2024-03-20 09:06:37.850 SingleUserNotebookApp notebookapp:2329] Jupyter Notebook 6.4.10 is running at:
[I 2024-03-20 09:06:37.850 SingleUserNotebookApp notebookapp:2329] http://hostname:0/
And if I look at the open ports node , I have this:
ss -ltpn
LISTEN 0 128 0.0.0.0:36447 0.0.0.0:* users:(("batchspawner-si",pid=9940,fd=10))
Ports are never same.
And i have same error with âhttp://r9jupyter:0/user/wvincent/â url
Install
On node slurm and jupyterhub server, I install latest version batchspawner & jupyterhub with
/usr/local/bin/pip3 install jupyterhub
/usr/local/bin/pip3 install https://github.com/jupyterhub/batchspawner/archive/main.zip
Modules list
pip list -v
batchspawner 1.3.1.dev0 /usr/local/lib/python3.9/site-packages pip
jupyter_client 8.6.0 /usr/local/lib/python3.9/site-packages pip
jupyter_core 5.7.1 /usr/local/lib/python3.9/site-packages pip
jupyter-events 0.9.0 /usr/local/lib/python3.9/site-packages pip
jupyter-lsp 2.2.3 /usr/local/lib/python3.9/site-packages pip
jupyter_server 2.13.0 /usr/local/lib/python3.9/site-packages pip
jupyter_server_terminals 0.5.2 /usr/local/lib/python3.9/site-packages pip
jupyter-telemetry 0.1.0 /usr/local/lib/python3.9/site-packages pip
jupyterhub 4.1.0 /usr/local/lib/python3.9/site-packages pip
jupyterlab 4.1.3 /usr/local/lib/python3.9/site-packages pip
jupyterlab_pygments 0.3.0 /usr/local/lib/python3.9/site-packages pip
jupyterlab_server 2.25.3 /usr/local/lib/python3.9/site-packages pip
jupyterlab_widgets 3.0.10 /usr/local/lib/python3.9/site-packages pip
wrapspawner 1.0.2.dev0 /usr/local/lib/python3.9/site-packages pip
Thank you in advance for your help.