Jupyterhub Failed to Bind Issue

3,683 views
Skip to first unread message

Ethan Suh

unread,
Aug 17, 2015, 11:17:09 AM8/17/15
to Project Jupyter
I am on a university virtual machine of Ubuntu 14.04 where I did a clean install of Jupyterhub. I am still working with 3.2.1, not 4.0. I am receiving this error message that I can't seem to understand:

[E 2015-08-17 10:08:12.623 JupyterHub app:1029] Failed to bind hub to http://localhost:8081/hub/

[E 2015-08-17 10:08:12.624 JupyterHub app:1097]

   Traceback (most recent call last):

     File "/opt/anaconda3/lib/python3.4/site-packages/jupyterhub/app.py", line 1095, in launch_instance_async

       yield self.start()

     File "/opt/anaconda3/lib/python3.4/site-packages/jupyterhub/app.py", line 1027, in start

       self.http_server.listen(self.hub_port, address=self.hub_ip)

     File "/opt/anaconda3/lib/python3.4/site-packages/tornado/tcpserver.py", line 126, in listen

       sockets = bind_sockets(port, address=address)

     File "/opt/anaconda3/lib/python3.4/site-packages/tornado/netutil.py", line 187, in bind_sockets

       sock.bind(sockaddr)

   OSError: [Errno 99] Cannot assign requested address



I initially thought it was a firewall issue, but that does not seem to be the case. Any ideas on what I should do?

Thanks for the help.

Matthias Bussonnier

unread,
Aug 18, 2015, 3:22:43 AM8/18/15
to jup...@googlegroups.com
On Aug 17, 2015, at 17:17, Ethan Suh <ds...@nd.edu> wrote:

I am on a university virtual machine of Ubuntu 14.04 where I did a clean install of Jupyterhub. I am still working with 3.2.1, not 4.0. I am receiving this error message that I can't seem to understand:

Can you find anything else to 8081 ?

eg: Python3 -m http.server 8081

-- 
M


[E 2015-08-17 10:08:12.623 JupyterHub app:1029] Failed to bind hub to http://localhost:8081/hub/
[E 2015-08-17 10:08:12.624 JupyterHub app:1097]
   Traceback (most recent call last):
     File "/opt/anaconda3/lib/python3.4/site-packages/jupyterhub/app.py", line 1095, in launch_instance_async
       yield self.start()
     File "/opt/anaconda3/lib/python3.4/site-packages/jupyterhub/app.py", line 1027, in start
       self.http_server.listen(self.hub_port, address=self.hub_ip)
     File "/opt/anaconda3/lib/python3.4/site-packages/tornado/tcpserver.py", line 126, in listen
       sockets = bind_sockets(port, address=address)
     File "/opt/anaconda3/lib/python3.4/site-packages/tornado/netutil.py", line 187, in bind_sockets
       sock.bind(sockaddr)
   OSError: [Errno 99] Cannot assign requested address


I initially thought it was a firewall issue, but that does not seem to be the case. Any ideas on what I should do?

Thanks for the help.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/10bc87ff-01f2-4113-958f-779371d34788%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ethan Suh

unread,
Aug 26, 2015, 2:28:55 PM8/26/15
to Project Jupyter
Yes, http.server does run on 8081.

Ognyan Moore

unread,
Aug 26, 2015, 9:52:53 PM8/26/15
to Project Jupyter
Just came across this post through a google search, I have the same issue running on a ubuntu server 15.04 VM.

Running:

$python3 -m http.service 8888

ogi@ubuntu:/usr/lib/systemd/system$ python3 -m http.server 8888
Serving HTTP on 0.0.0.0 port 8888 ...

Ethan Suh

unread,
Aug 28, 2015, 4:58:24 PM8/28/15
to Project Jupyter
I had been working on this issue with one of my administrators and he found that IPv6 was disabled on the machine I was on. We tried reinstalling everything after enabling IPv6 and that has fixed the issue for us. It's interesting jupyterhub itself doesn't seem to be using IPv6 but perhaps something during the install does. 

Hope that gets your issue fixed as well. 

MinRK

unread,
Aug 30, 2015, 3:20:20 PM8/30/15
to jup...@googlegroups.com

Can anyone experiencing this issue bind to localhost with a regular socket?

import socket
s = socket.socket()
s.bind(('localhost', 8888))

redward

unread,
Sep 29, 2015, 12:56:07 PM9/29/15
to Project Jupyter
I experienced this issue and was able to bind to a port using the code below.
Running Jupyter with: --ip="*" or --ip="127.0.0.0" solved the issue without installing ipv6

邱承

unread,
Nov 1, 2015, 10:35:29 PM11/1/15
to Project Jupyter
If you can bind to 127.0.0.1, the problem is in your hosts file.

Nicholaus Halecky

unread,
Feb 22, 2016, 12:42:13 PM2/22/16
to Project Jupyter
I'm joining this thread a little late, but am hitting the same error and am unable to resolve using the solutions mentioned here. Here the traceback:

```python
root@bombora-analytics-m:~# jupyterhub --port=8124 --ip="127.0.0.1"
[I 2016-02-22 17:08:21.790 JupyterHub app:523] Loading cookie_secret from /root/jupyterhub_cookie_secret
[W 2016-02-22 17:08:21.814 JupyterHub app:258]
    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.

[W 2016-02-22 17:08:21.823 JupyterHub app:642] No admin users, admin interface will be unavailable.
[W 2016-02-22 17:08:21.823 JupyterHub app:643] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2016-02-22 17:08:21.824 JupyterHub app:669] Not using whitelist. Any authenticated user will be allowed.
E 2016-02-22 17:37:17.279 JupyterHub app:1049] Failed to bind hub to http://localhost:8081/hub/
[E 2016-02-22 17:37:17.280 JupyterHub app:1117]
    Traceback (most recent call last):
      File "/usr/local/bin/miniconda/lib/python3.5/site-packages/jupyterhub/app.py", line 1115, in launch_instance_async
        yield self.start()
      File "/usr/local/bin/miniconda/lib/python3.5/site-packages/jupyterhub/app.py", line 1047, in start
        self.http_server.listen(self.hub_port, address=self.hub_ip)
      File "/usr/local/bin/miniconda/lib/python3.5/site-packages/tornado/tcpserver.py", line 126, in listen
        sockets = bind_sockets(port, address=address)
      File "/usr/local/bin/miniconda/lib/python3.5/site-packages/tornado/netutil.py", line 196, in bind_sockets
        sock.bind(sockaddr)
    OSError: [Errno 99] Cannot assign requested address
```

Any additional thoughts as to what next steps I can take? Thank you. :)

MinRK

unread,
Feb 23, 2016, 3:36:28 AM2/23/16
to jup...@googlegroups.com

What version of JupyterHub (jupyterhub --version)?

The cause for this seems to be a host configuration that tells your machine that localhost is an ipv6 address, but ipv6 is not actually available (i.e. an internally inconsistent configuration of the system). You can specify

c.JupyterHub.hub_ip = '127.0.0.1'

to tell the hub to listen on 127 instead. (--ip specifies the public IP of the whole application, not the internal IP of the Hub service)

-MinRK


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages