[IPython-dev] Internal port error from Jupyterhub

Clare Sloggett claresloggett at gmail.com
Thu Jun 25 10:36:12 EDT 2015


Thanks MinRK and Thomas! Sorry not to think of something so simple.

On 20 June 2015 at 03:54, MinRK <benjaminrk at gmail.com> wrote:

> On Thu, Jun 18, 2015 at 11:57 PM, Clare Sloggett <claresloggett at gmail.com>
> wrote:
>
> Hi all,
>>
>> Is this mailing list still the right place to ask about Jupyterhub?
>>
> This is fine, but we’re gently directing Jupyter stuff toward the jupyter
> mailing list <https://groups.google.com/forum/#!forum/jupyter>.
>
> I'm getting an error that seems strange to me, I'm hoping someone might
>> have insight. It's complaining about port availability, and it really looks
>> like that's the error, but the port looks available. So I'm mystified.
>>
>> Short version: when I run
>>    jupyterhub --port 9520 --JupyterHub.hub_port=8500
>> I get an error ("Failed to bind hub to http://localhost:8500/hub/" and
>> "Cannot assign requested address" - detailed error message is below).
>>
>> Yet, if I use the same port to run
>>   python -m SimpleHTTPServer 8500
>> the SimpleHTTPServer runs happily and is accessible, indicating that the
>> port is actually available.
>>
>> This occurs no matter what port I specify for JupyterHub.hub_port.
>>
>> Here are some more details:
>>
>> I'm trying to install on an Ubuntu 14.04 server. There are other services
>> running on this server, but none of them occupy port 8500 (or 9520) and
>> given that SimpleHTTPServer works I am assuming that the other services are
>> probably not the problem?
>>
> It’s possible that you can’t bind to localhost, not the port.
> SimpleHTTPServer binds to all interfaces by default. Try:
>
> import socket
> s = socket.socket()
> s.bind(('localhost', 8500))
>
> If that fails, you can try 127.0.0.1 instead of localhost. If 127 works,
> you can set this value in your jupyterhub_config.py file:
>
> c.JupyterHub.hub_ip = '127.0.0.1'
>
> -MinRK
>
>
>> To install Jupyterhub I am running
>>
>> git clone https://github.com/jupyter/jupyterhub
>>
>> cd jupyterhub/
>>
>> sudo npm install -g configurable-http-proxy
>>
>> sudo apt-get install python3-pip
>>
>> sudo apt-get install nodejs-legacy
>>
>> sudo pip3 install -r requirements.txt
>> sudo pip3 install .
>>
>> If I run Jupyterhub as root (or otherwise), the complete error I get is:
>>
>> $ sudo jupyterhub --port 9520 --JupyterHub.hub_port=8500
>> [I 2015-06-19 06:51:17.962 JupyterHub app:522] Loading cookie_secret from
>> /home/ubuntu/install_jupyterhub/jupyterhub/jupyterhub_cookie_secret
>> [W 2015-06-19 06:51:18.010 JupyterHub app:260]
>>     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 2015-06-19 06:51:18.020 JupyterHub app:623] Not using whitelist. Any
>> authenticated user will be allowed.
>> [E 2015-06-19 06:51:18.034 JupyterHub app:998] Failed to bind hub to
>> http://localhost:8500/hub/
>> [E 2015-06-19 06:51:18.034 JupyterHub app:1066]
>>     Traceback (most recent call last):
>>       File "/usr/local/lib/python3.4/dist-packages/jupyterhub/app.py",
>> line 1064, in launch_instance_async
>>         yield self.start()
>>       File "/usr/local/lib/python3.4/dist-packages/jupyterhub/app.py",
>> line 996, in start
>>         self.http_server.listen(self.hub_port, address=self.hub_ip)
>>       File "/usr/local/lib/python3.4/dist-packages/tornado/tcpserver.py",
>> line 126, in listen
>>         sockets = bind_sockets(port, address=address)
>>       File "/usr/local/lib/python3.4/dist-packages/tornado/netutil.py",
>> line 187, in bind_sockets
>>         sock.bind(sockaddr)
>>     OSError: [Errno 99] Cannot assign requested address
>>
>> Any help would be very much appreciated!
>>
>> Cheers,
>> Clare
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>>
>>>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150626/efc8c78c/attachment.html>


More information about the IPython-dev mailing list