amazon-web-services - Jupyter notebook 停止在 AWS 服务器上运行
问题描述
我曾经运行这个 Jupyter 笔记本没有任何问题(使用 8889 端口),但从昨天开始我一直无法访问它。当我通过 ssh 连接到 AWS 上的服务器时会发生这种情况(如下)。当我在 Safari 中复制/粘贴此 URL 时,我收到以下消息:“Safari 无法打开页面,因为服务器意外断开了连接”。SSH 工作正常。由于我是 AWS 新手,因此我会感谢这个社区的帮助。
ssh [xxx]
ubuntu@ip-xxx:~$ cd mydir
ubuntu@ip-xxx:~/mydir$ source myenv/bin/activate
(myenv) ubuntu@ip-xxx:~/mydir$ jupyter notebook
[I xxx NotebookApp] The port 8888 is already in use, trying another port.
[I xxx NotebookApp] Serving notebooks from local directory: /home/ubuntu/mydir
[I xxx NotebookApp] The Jupyter Notebook is running at:
[I xxx NotebookApp] http://localhost:8889/?token=XXX
[I xxx NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W xxx NotebookApp] No web browser found: could not locate runnable browser.
[C xxx NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8889/?token=XXX
解决方案
运行它以查看哪个进程正在使用该端口
sudo netstat -tupln | grep 8888
然后终止该进程并尝试再次启动笔记本。
sudo kill -9 PID
推荐阅读
- android - 修复水平 recyclerview XML + 卡住水平滚动
- json - 带有 dart 的多个 REST API
- pygame - 碰撞后如何让我的角色停止
- objective-c - 为什么通过 setAttributes:ofItemAtPath:error: 在 Mac 上设置创建日期在网络驱动器上失败
- visual-studio-code - VS Code - 键绑定 - *type* 命令的光标位置
- c++ - 没有可发布的内容,八叉树为空
- swift - iOS 13 UITableView 选择/取消选择问题
- javascript - 如何在非异步函数中调用异步函数
- html - CSS垂直导航菜单下拉在IE11中不起作用
- android - 相机动作意图中没有图库按钮