Jupyter Notebook停止在AWS服务器上运行

时间:2018-11-16 18:49:19

标签: amazon-web-services ssh jupyter-notebook

我以前运行这款Jupyter笔记本电脑都没有问题(使用8889端口),但是从昨天开始,我一直在使用它时遇到麻烦。这是当我在AWS上SSH到服务器时发生的情况(如下)。当我在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

1 个答案:

答案 0 :(得分:0)

运行此命令以查看正在使用该端口的进程

sudo netstat -tupln | grep 8888

然后终止该过程,然后尝试重新启动笔记本。

sudo kill -9 PID