python-3.x - 连接到远程 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 无法请求本地转发。
解决方案
这是因为您已经在本地计算机上使用端口 8888 打开了另一个 Jupyter 笔记本。所以解决方案只是选择一个不同的端口号,例如 8890 或者在你的情况下除了 8888。
推荐阅读
- pandas - Pandas:带有相邻条形的堆积条形图
- c++ - 未定义对 `vtable [CMakeLists.txt] 的引用(单元测试)
- java - Android 项目 NullPointerException 试图在位图图像上调用 Files.readAllBytes(Paths.get("Image Path")))
- c# - 需要检查 jwt 令牌在 asp.net 核心中是否有效/过期
- java - Scanner.findWithinHorizon() 在多行匹配时失败
- php - 禁用具有相同用户 ID PHP 的多个登录
- google-calendar-api - 如何跨多个 Google 日历同步可用性?
- excel - 使用 vba 选择查询两个不同的日期
- dart - 错误状态:StreamSink 已关闭
- matlab - 如何使用 Matlab 绘制信号的包络线