Reputation: 123
I had followed JupyterHub's QuickStart to successfully install JupyterHub on Linux machine, and start the service by typing
jupyterhub
and the output suggest that now the server is listening on port 8000:
$ jupyterhub
[I 2018-07-02 02:32:25.756 JupyterHub app:1656] Using Authenticator: jupyterhub.auth.PAMAuthenticator-0.9.0
[I 2018-07-02 02:32:25.756 JupyterHub app:1656] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-0.9.0
[I 2018-07-02 02:32:25.759 JupyterHub app:1014] Loading cookie_secret from /home/ec2-user/jupyterhub_cookie_secret
[I 2018-07-02 02:32:25.775 JupyterHub proxy:429] Generating new CONFIGPROXY_AUTH_TOKEN
[W 2018-07-02 02:32:25.776 JupyterHub app:1160] No admin users, admin interface will be unavailable.
[W 2018-07-02 02:32:25.776 JupyterHub app:1161] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2018-07-02 02:32:25.776 JupyterHub app:1188] Not using whitelist. Any authenticated user will be allowed.
[I 2018-07-02 02:32:25.810 JupyterHub app:1838] Hub API listening on http://127.0.0.1:8081/hub/
[W 2018-07-02 02:32:25.811 JupyterHub proxy:481] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
[I 2018-07-02 02:32:25.811 JupyterHub proxy:483] Starting proxy @ http://:8000
02:32:26.221 - info: [ConfigProxy] Proxying http://*:8000 to (no default)
02:32:26.223 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes
02:32:26.735 - info: [ConfigProxy] 200 GET /api/routes
[I 2018-07-02 02:32:26.735 JupyterHub proxy:299] Checking routes
[I 2018-07-02 02:32:26.736 JupyterHub proxy:368] Adding default route for Hub: / => http://127.0.0.1:8081
02:32:26.737 - info: [ConfigProxy] Adding route / -> http://127.0.0.1:8081
02:32:26.738 - info: [ConfigProxy] 201 POST /api/routes/
[I 2018-07-02 02:32:26.739 JupyterHub app:1895] JupyterHub is now running at http://:8000
But when I try to access to the server by curl
, it just showed that it's not available.
$ curl localhost:8000
curl: (7) Failed to connect to localhost port 8000: Connection refused
Did anyone encounter the same problem? Any advice is highly appreciated!
Upvotes: 0
Views: 1686
Reputation: 123
After I made some modification to jupyterhub_config.py
, it became accessible. And the following is my config:
c = get_config()
c.JupyterHub.bind_url = 'http://localhost:8000'
c.JupyterHub.hub_ip='localhost'
In order to generate jupyterhub_config.py
when you first try to config JupyterHub, you can type:
jupyterhub --generate-config -f /etc/jupyterhub/jupyterhub_config.py
And to start jupyterHub with the file jupyterhub_config.py
:
sudo jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
Upvotes: 2