Can't reach Jupyter Notebooks on Azure Deep Learning Virtual Machine

牧云@^-^@ 提交于 2019-12-08 08:05:51

问题


I followed the instructions here.

I am on the Ubuntu VM via SSH. I tried to access IP:8000 but Chrome says the Site can't be reached. Port 8000 is indeed open by default as mentioned in the docs.

Instructions don't mention if I have to start jupyterhub so I tried that and got this error -

username@fastai:~ $ jupyterhub
[I 2018-04-02 00:25:41.018 JupyterHub app:871] Writing cookie_secret to /home/username/jupyterhub_cookie_secret
[I 2018-04-02 00:25:41.036 alembic.runtime.migration migration:117] Context impl SQLiteImpl.
[I 2018-04-02 00:25:41.037 alembic.runtime.migration migration:122] Will assume non-transactional DDL.
[I 2018-04-02 00:25:41.067 alembic.runtime.migration migration:327] Running stamp_revision  -> 3ec6993fe20c
[W 2018-04-02 00:25:41.388 JupyterHub app:955] No admin users, admin interface will be unavailable.
[W 2018-04-02 00:25:41.389 JupyterHub app:956] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2018-04-02 00:25:41.389 JupyterHub app:983] Not using whitelist. Any authenticated user will be allowed.
[E 2018-04-02 00:25:41.414 JupyterHub app:1525] Failed to bind hub to http://127.0.0.1:8081/hub/
[E 2018-04-02 00:25:41.414 JupyterHub app:1623]
    Traceback (most recent call last):
      File "/anaconda/envs/py35/lib/python3.5/site-packages/jupyterhub/app.py", line 1621, in launch_instance_async
        yield self.start()
      File "/anaconda/envs/py35/lib/python3.5/site-packages/jupyterhub/app.py", line 1523, in start
        self.http_server.listen(self.hub_port, address=self.hub_ip)
      File "/anaconda/envs/py35/lib/python3.5/site-packages/tornado/tcpserver.py", line 142, in listen
        sockets = bind_sockets(port, address=address)
      File "/anaconda/envs/py35/lib/python3.5/site-packages/tornado/netutil.py", line 197, in bind_sockets
        sock.bind(sockaddr)
    OSError: [Errno 98] Address already in use

Before I read about jupyterhub in the docs, I tried starting jupyter notebook which gave me this error.

[C 04:00:12.963 NotebookApp] Bad config encountered during initialization:
[C 04:00:12.963 NotebookApp] No such notebook dir: ''/dsvm/Notebooks''

It seemed to run fine after generating a config file using jupyter notebook --generate-config and editing it but I still couldn't reach it via Chrome despite opening up all ports.

UPDATE
Today I installed an X2Go client and found the jupyter notebook icon on the desktop but starting that threw this error - Failed to run Jupyter.desktop Failed to parse the desktop file: Key file contains line '/anaconda/pkgs/notebook-5.4.0-py27_0/info/icon.png' which is not a key-value pair, group, or comment

Looks like that file calls jupyter notebook which throws the same error as before.


回答1:


JupyterHub should be running on port 8000 at startup. Can you double-check its status with systemctl status jupyterhub? And have you double-checked in the portal that port 8000 is open?

If JupyterHub reports that it's running and listening on port 8000, there may be a firewall blocking the connection. Some users have had success with forwarding port 8000 over SSH in this case, then connecting to localhost:8000.




回答2:


This was caused by a bug which has since been fixed on the later versions of the Deep learning VM.

See this Github issue for more details.



来源:https://stackoverflow.com/questions/49603966/cant-reach-jupyter-notebooks-on-azure-deep-learning-virtual-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!