Thanks very much for your help. I changed the jupyterhub_config.py
to this:
c.Spawner.args = ["--allow-root"]
And run the jupyterhub, and there is the terminal information:
I 2023-11-27 17:01:45.679 JupyterHub app:2859] Running JupyterHub version 4.0.2
[I 2023-11-27 17:01:45.679 JupyterHub app:2889] Using Authenticator: jupyterhub.auth.PAMAuthenticator-4.0.2
[I 2023-11-27 17:01:45.679 JupyterHub app:2889] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-4.0.2
[I 2023-11-27 17:01:45.679 JupyterHub app:2889] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-4.0.2
[I 2023-11-27 17:01:45.681 JupyterHub app:1664] Loading cookie_secret from /root/jupyterhub_cookie_secret
[I 2023-11-27 17:01:45.723 JupyterHub proxy:556] Generating new CONFIGPROXY_AUTH_TOKEN
[I 2023-11-27 17:01:45.727 JupyterHub app:1984] Not using allowed_users. Any authenticated user will be allowed.
[I 2023-11-27 17:01:45.737 JupyterHub app:2928] Initialized 0 spawners in 0.001 seconds
[I 2023-11-27 17:01:45.740 JupyterHub metrics:278] Found 1 active users in the last ActiveUserPeriods.twenty_four_hours
[I 2023-11-27 17:01:45.741 JupyterHub metrics:278] Found 1 active users in the last ActiveUserPeriods.seven_days
[I 2023-11-27 17:01:45.741 JupyterHub metrics:278] Found 1 active users in the last ActiveUserPeriods.thirty_days
[W 2023-11-27 17:01:45.741 JupyterHub proxy:746] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
[I 2023-11-27 17:01:45.742 JupyterHub proxy:750] Starting proxy @ http://:8000
17:01:45.829 [ConfigProxy] info: Proxying http://*:8000 to (no default)
17:01:45.830 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
17:01:45.900 [ConfigProxy] info: 200 GET /api/routes
[I 2023-11-27 17:01:45.900 JupyterHub app:3178] Hub API listening on http://127.0.0.1:8081/hub/
17:01:45.901 [ConfigProxy] info: 200 GET /api/routes
[I 2023-11-27 17:01:45.901 JupyterHub proxy:477] Adding route for Hub: / => http://127.0.0.1:8081
17:01:45.902 [ConfigProxy] info: Adding route / -> http://127.0.0.1:8081
17:01:45.903 [ConfigProxy] info: Route added / -> http://127.0.0.1:8081
17:01:45.903 [ConfigProxy] info: 201 POST /api/routes/
[I 2023-11-27 17:01:45.903 JupyterHub app:3245] JupyterHub is now running at http://:8000
And then I opened the url http://127.0.0.1:8081/hub/user/root/
. But I still get the same error as before:
[W 2023-11-27 17:08:23.043 JupyterHub _version:37] Single-user server has no version header, which means it is likely < 0.8. Expected 4.0.2
[I 2023-11-27 17:08:23.043 JupyterHub base:990] User root took 0.929 seconds to start
[I 2023-11-27 17:08:23.043 JupyterHub proxy:330] Adding user root to proxy /user/root/ => http://127.0.0.1:34779
17:08:23.045 [ConfigProxy] info: Adding route /user/root -> http://127.0.0.1:34779
17:08:23.045 [ConfigProxy] info: Route added /user/root -> http://127.0.0.1:34779
17:08:23.045 [ConfigProxy] info: 201 POST /api/routes/user/root
[I 2023-11-27 17:08:23.045 JupyterHub log:191] 302 GET /hub/spawn -> /hub/spawn-pending/root (root@127.0.0.1) 933.74ms
[I 2023-11-27 17:08:23.113 JupyterHub log:191] 302 GET /hub/spawn-pending/root -> /user/root/ (root@127.0.0.1) 1.75ms
[I 2023-11-27 17:08:23.182 JupyterHub log:191] 302 GET /user/root/ -> /hub/user/root/ (@127.0.0.1) 0.51ms
[I 2023-11-27 17:08:23.250 JupyterHub log:191] 302 GET /hub/user/root/ -> /user/root/?redirects=1 (root@127.0.0.1) 1.57ms
[I 2023-11-27 17:08:23.320 JupyterHub log:191] 302 GET /user/root/?redirects=1 -> /hub/user/root/?redirects=1 (@127.0.0.1) 0.53ms
[W 2023-11-27 17:08:23.433 JupyterHub base:1656] Redirect loop detected on /hub/user/root/?redirects=1
[I 2023-11-27 17:08:23.618 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
[I 2023-11-27 17:08:25.437 JupyterHub log:191] 302 GET /hub/user/root/?redirects=1 -> /user/root/?redirects=2 (root@127.0.0.1) 2004.91ms
[I 2023-11-27 17:08:25.507 JupyterHub log:191] 302 GET /user/root/?redirects=2 -> /hub/user/root/?redirects=2 (@127.0.0.1) 0.80ms
[W 2023-11-27 17:08:25.580 JupyterHub web:1869] 500 GET /hub/user/root/?redirects=2 (127.0.0.1): Redirect loop detected. Notebook has jupyterhub version unknown (likely < 0.8), but the Hub expects 4.0.2. Try installing jupyterhub==4.0.2 in the user environment if you continue to have problems.
[E 2023-11-27 17:08:25.592 JupyterHub log:183] {
"Host": "127.0.0.1:8081",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"Accept-Encoding": "gzip, deflate, br",
"Connection": "keep-alive",
"Cookie": "jupyterhub-hub-login=[secret]; vue_admin_template_token=[secret]; username-127-0-0-1-8888=[secret]; _xsrf=[secret]; jupyterhub-session-id=[secret]",
"Upgrade-Insecure-Requests": "1",
"Sec-Fetch-Dest": "document",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-Site": "none",
"Sec-Fetch-User": "?1"
}
[E 2023-11-27 17:08:25.592 JupyterHub log:191] 500 GET /hub/user/root/?redirects=2 (root@127.0.0.1) 14.04ms
I found that information W 2023-11-27 17:08:23.043 JupyterHub _version:37] Single-user server has no version header, which means it is likely < 0.8. Expected 4.0.2
. Is it related to the error?