首页 > 解决方案 > 连接到远程 jupyter 笔记本失败

问题描述

我正在尝试连接到远程服务器上运行的 jupyter notebook。下面的代码几天来一直运行良好,可以将在我的 ubuntu 服务器上的端口上运行的 jupyter notebook 转发到我的 mac。今天停了。有谁知道问题可能是什么?还有谁知道我如何在我的 ubuntu 服务器上打开端口,这样我就不需要下面的代码了?

代码:

ssh -L 8000:localhost:8888 username@111.111.11.122

更新:

代码:

jupyter notebook --no-browser --port=8889

信息:

WARNING: The conda.compat module is deprecated and will be removed in a future release.
[I 14:11:23.334 NotebookApp] [nb_conda_kernels] enabled, 2 kernels found
[I 14:11:23.343 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret
[I 14:11:24.175 NotebookApp] Serving notebooks from local directory: /home/username
[I 14:11:24.175 NotebookApp] The Jupyter Notebook is running at:
[I 14:11:24.175 NotebookApp] http://localhost:8889/?token=d111b8540568567c80796a3be5cf53229fe38360b411a4dd
[I 14:11:24.175 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:11:24.178 NotebookApp] 

    To access the notebook, open this file in a browser:
        file:///run/user/1000/jupyter/nbserver-77790-open.html
    Or copy and paste one of these URLs:
        http://localhost:8889/?token=d111b8540568567c80796a3be5cf53229fe38360b411a4dd

更新:

代码:ssh -L 8888:localhost:8889 用户名@111.111.11.122

信息:

绑定:地址已在使用 channel_setup_fwd_listener_tcpip:无法监听端口:8888 无法请求本地转发。

标签: python-3.xjupyter-notebookubuntu-server

解决方案


这是因为您已经在本地计算机上使用端口 8888 打开了另一个 Jupyter 笔记本。所以解决方案只是选择一个不同的端口号,例如 8890 或者在你的情况下除了 8888。


推荐阅读