Reputation: 142
I configed the jupyterhub as the official site given,
c.JupyterHub.hub_ip = '0.0.0.0'
c.JupyterHub.hub_port = 8888
c.PAMAuthenticator.encoding = 'utf8'
c.LocalAuthenticator.create_system_users = True
c.Authenticator.admin_users = {'arvin'}
c.Spawner.cmd=['jupyterhub-singleuser']
c.JupyterHub.ssl_cert = '/mycert'
c.JupyterHub.ssl_key = '/mykey'
and when I entered the users' page(logged in) and I get this:
500 : Internal Server Error
Failed to reach your server. Please try again later. Contact admin if the issue persists.
You can try restarting your server from the home page.
Could anyone give me some solution? I've tried some but they're seems not woking.
These are my logs.
arvin@arvin-Linux-PC:/etc/jupyter$ sudo jupyterhub -f jupyterhub_config.py
[sudo] password for arvin:
[I 2017-12-02 15:43:53.892 JupyterHub app:834] Loading cookie_secret from /etc/jupyter/jupyterhub_cookie_secret
[I 2017-12-02 15:43:53.921 JupyterHub app:983] Not using whitelist. Any authenticated user will be allowed.
[I 2017-12-02 15:43:53.934 JupyterHub app:1528] Hub API listening on http://*:8080/hub/
[W 2017-12-02 15:43:53.935 JupyterHub proxy:415]
Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
[I 2017-12-02 15:43:53.935 JupyterHub proxy:458] Starting proxy @ https://0.0.0.0:8888/
15:43:54.044 - info: [ConfigProxy] Proxying https://0.0.0.0:8888 to (no default)
15:43:54.047 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes
15:43:54.052 - error: [ConfigProxy] Uncaught Exception Error: listen EADDRINUSE 0.0.0.0:8888
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at Server._listen2 (net.js:1237:14)
at listen (net.js:1273:10)
at net.js:1382:9
at nextTickCallbackWith3Args (node.js:452:9)
at process._tickCallback (node.js:358:17)
at Function.Module.runMain (module.js:444:11)
at startup (node.js:136:18)
at node.js:966:3
[W 2017-12-02 15:43:54.132 JupyterHub proxy:304] Adding missing default route
15:43:54.132 - info: [ConfigProxy] 200 GET /api/routes
[I 2017-12-02 15:43:54.132 JupyterHub proxy:370] Adding default route for Hub: / => http://*:8080
15:43:54.176 - info: [ConfigProxy] Adding route / -> http://*:8080
15:43:54.178 - info: [ConfigProxy] 201 POST /api/routes/
[I 2017-12-02 15:43:54.178 JupyterHub app:1581] JupyterHub is now running at https://0.0.0.0:8888/
[W 2017-12-02 15:44:05.453 JupyterHub base:202] Invalid or expired cookie token
[W 2017-12-02 15:44:05.455 JupyterHub base:202] Invalid or expired cookie token
[I 2017-12-02 15:44:05.455 JupyterHub log:122] 302 GET /hub/user/arvin/ → /hub/login?next=%2Fhub%2Fuser%2Farvin%2F (@192.168.1.106) 3.19ms
[I 2017-12-02 15:44:05.517 JupyterHub log:122] 200 GET /hub/login?next=%2Fhub%2Fuser%2Farvin%2F (@192.168.1.106) 33.93ms
[I 2017-12-02 15:44:11.466 JupyterHub base:346] User logged in: arvin
Last login: Sat Dec 2 15:42:25 CST 2017
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-101-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
12 packages can be updated.
9 updates are security updates.
[I 2017-12-02 15:44:11.766 JupyterHub spawner:978] Spawning jupyterhub-singleuser --port=41813 '--notebook-dir="~/"'
[W 2017-12-02 15:44:11.996 SingleUserNotebookApp configurable:168] Config option `open_browser` not recognized by `SingleUserNotebookApp`. Did you mean `browser`?
[I 2017-12-02 15:44:12.337 SingleUserNotebookApp singleuser:365] Starting jupyterhub-singleuser server version 0.8.1
[I 2017-12-02 15:44:12.340 JupyterHub log:122] 200 GET /hub/api (@::1) 0.74ms
[I 2017-12-02 15:44:12.341 SingleUserNotebookApp notebookapp:1445] Serving notebooks from local directory: /home/arvin
[I 2017-12-02 15:44:12.341 SingleUserNotebookApp notebookapp:1445] 0 active kernels
[I 2017-12-02 15:44:12.341 SingleUserNotebookApp notebookapp:1445] The Jupyter Notebook is running at:
[I 2017-12-02 15:44:12.341 SingleUserNotebookApp notebookapp:1445] https://[all ip addresses on your system]:41813/user/arvin/
[I 2017-12-02 15:44:12.341 SingleUserNotebookApp notebookapp:1446] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2017-12-02 15:44:12.444 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 52568): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:13.393 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 52636): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:14.074 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 52688): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:16.292 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 52838): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:16.326 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 52844): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:21.332 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 53182): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:21.829 JupyterHub base:500] User arvin is slow to become responsive (timeout=10)
[I 2017-12-02 15:44:21.830 JupyterHub log:122] 302 POST /hub/login?next=%2Fhub%2Fuser%2Farvin%2F → /hub/user/arvin/ (@192.168.1.106) 10378.18ms
[W 2017-12-02 15:44:26.336 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 53520): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:31.340 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 53862): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[I 2017-12-02 15:44:31.910 JupyterHub base:722] Pending spawn for arvin didn't finish in 10.0 seconds
[I 2017-12-02 15:44:31.910 JupyterHub base:727] arvin is pending spawn
[I 2017-12-02 15:44:31.914 JupyterHub log:122] 200 GET /hub/user/arvin/ ([email protected]) 10012.39ms
[W 2017-12-02 15:44:36.344 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 54196): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:41.352 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 54530): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:43.471 SingleUserNotebookApp iostream:1327] SSL Error on 8 ('127.0.0.1', 54670): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:645)
[W 2017-12-02 15:44:43.471 JupyterHub user:458] arvin's server never showed up at http://127.0.0.1:41813/user/arvin/ after 30 seconds. Giving up
[I 2017-12-02 15:44:43.472 SingleUserNotebookApp notebookapp:1382] Shutting down 0 kernels
[E 2017-12-02 15:44:43.901 JupyterHub gen:914] Exception in Future <tornado.concurrent.Future object at 0x7faef8a44908> after timeout
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tornado/gen.py", line 910, in error_callback
future.result()
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/handlers/base.py", line 445, in finish_user_spawn
yield spawn_future
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/user.py", line 476, in spawn
raise e
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/user.py", line 450, in spawn
resp = yield server.wait_up(http=True, timeout=spawner.http_timeout)
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/utils.py", line 180, in wait_for_http_server
timeout=timeout
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/utils.py", line 135, in exponential_backoff
raise TimeoutError(fail_message)
TimeoutError: Server at http://127.0.0.1:41813/user/arvin/ didn't respond in 30 seconds
[E 2017-12-02 15:44:43.902 JupyterHub gen:914] Exception in Future <tornado.concurrent.Future object at 0x7faef8a44908> after timeout
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tornado/gen.py", line 910, in error_callback
future.result()
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/handlers/base.py", line 445, in finish_user_spawn
yield spawn_future
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/user.py", line 476, in spawn
raise e
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/user.py", line 450, in spawn
resp = yield server.wait_up(http=True, timeout=spawner.http_timeout)
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/utils.py", line 180, in wait_for_http_server
timeout=timeout
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/utils.py", line 135, in exponential_backoff
raise TimeoutError(fail_message)
TimeoutError: Server at http://127.0.0.1:41813/user/arvin/ didn't respond in 30 seconds
[E 2017-12-02 15:44:43.903 JupyterHub web:1590] Uncaught exception GET /hub/user/arvin/ (192.168.1.106)
HTTPServerRequest(protocol='http', host='192.168.1.119:8080', method='GET', uri='/hub/user/arvin/', version='HTTP/1.1', remote_ip='192.168.1.106', headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36', 'If-None-Match': '"5fdb62c9031609084027381f99480f6927c4813f"', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Cache-Control': 'max-age=0', 'Dnt': '1', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Host': '192.168.1.119:8080', 'Referer': 'http://192.168.1.119:8080/hub/user/arvin/', 'Cookie': 'jupyter-hub-token="2|1:0|10:1512200651|17:jupyter-hub-token|44:ZTRmNGY0OGY0Y2RiNDYzZmJjNjc4YzlhZTA2NTFiYjI=|f6535cb1c54e41b6a43f4e438059b10feee0198ae1e77ec8d0fe90fe6a51c26d"', 'Connection': 'keep-alive', 'Upgrade-Insecure-Requests': '1'})
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tornado/web.py", line 1511, in _execute
result = yield result
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/handlers/base.py", line 720, in get
yield gen.with_timeout(timedelta(seconds=self.slow_spawn_timeout), spawner._spawn_future)
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/handlers/base.py", line 445, in finish_user_spawn
yield spawn_future
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/user.py", line 476, in spawn
raise e
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/user.py", line 450, in spawn
resp = yield server.wait_up(http=True, timeout=spawner.http_timeout)
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/utils.py", line 180, in wait_for_http_server
timeout=timeout
File "/usr/local/lib/python3.5/dist-packages/jupyterhub/utils.py", line 135, in exponential_backoff
raise TimeoutError(fail_message)
TimeoutError: Server at http://127.0.0.1:41813/user/arvin/ didn't respond in 30 seconds
[E 2017-12-02 15:44:43.912 JupyterHub log:114] {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36",
"If-None-Match": "\"5fdb62c9031609084027381f99480f6927c4813f\"",
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
"Accept-Encoding": "gzip, deflate",
"Cache-Control": "max-age=0",
"Dnt": "1",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Host": "192.168.1.119:8080",
"Referer": "http://192.168.1.119:8080/hub/user/arvin/",
"Cookie": "jupyter-hub-token=\"2|1:0|10:1512200651|17:jupyter-hub-token|44:ZTRmNGY0OGY0Y2RiNDYzZmJjNjc4YzlhZTA2NTFiYjI=|f6535cb1c54e41b6a43f4e438059b10feee0198ae1e77ec8d0fe90fe6a51c26d\"",
"Connection": "keep-alive",
"Upgrade-Insecure-Requests": "1"
}
[E 2017-12-02 15:44:43.912 JupyterHub log:122] 500 GET /hub/user/arvin/ ([email protected]) 6508.46ms
I've noticed that there are some problem that the spawner may not be reached but I have really no idea about what to do even I've read the official docs.
Upvotes: 0
Views: 5377
Reputation: 623
If you have a notebook in use before your hub installation and there exists a folder ~/.jupyter/. When you start the hub program and start the single-user notebook, it reads the configurations there and causes some problems so that the hub can never reach the single spawner till timesout.
I think this is a BUG which just conflicts with the notebook configuration ~/.jupyter.
As soon as you will move $HOME/.jupyter away, everything will work fine.
Upvotes: 3