我按照指示 here 进行操作.
我通过 SSH 在 Ubuntu VM 上。 我尝试访问 IP:8000,但 Chrome 表示无法访问该网站。正如文档中所述,端口 8000 确实默认打开。
说明没有提及我是否必须启动 jupyterhub
,因此我尝试了该操作并收到此错误 -
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
在我阅读文档中的 jupyterhub 之前,我尝试启动 jupyter notebook
,这给了我这个错误。
[C 04:00:12.963 NotebookApp] Bad config encountered during initialization:
[C 04:00:12.963 NotebookApp] No such notebook dir: ''/dsvm/Notebooks''
使用 jupyter Notebook --generate-config
生成配置文件并编辑它后,它似乎运行良好,但尽管打开了所有端口,我仍然无法通过 Chrome 访问它。
更新
今天我安装了X2Go客户端,发现jupyter notebook icon在桌面上,但启动时引发了此错误 -
无法运行 Jupyter.desktop
无法解析桌面文件: key 文件包含行“/anaconda/pkgs/notebook-5.4.0-py27_0/info/icon.png”,它不是键值对、组或注释
看起来该文件调用了 jupyter notebook,它抛出了与之前相同的错误。
最佳答案
JupyterHub 在启动时应在端口 8000 上运行。您可以使用 systemctl status jupyterhub 仔细检查其状态吗?您是否在门户中仔细检查了端口 8000 是否已打开?
如果 JupyterHub 报告它正在端口 8000 上运行并监听,则可能有防火墙阻止该连接。在这种情况下,一些用户成功地通过 SSH 转发端口 8000,然后连接到 localhost:8000。
关于python - 无法访问 Azure 深度学习虚拟机上的 Jupyter Notebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49603966/