首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Jupyter notebook无法为远程访问提供服务

Jupyter notebook无法为远程访问提供服务
EN

Stack Overflow用户
提问于 2019-03-23 18:49:59
回答 1查看 184关注 0票数 0

我正在linux服务器(Red Hat 4.8.5)上配置jupyter notebook,.I想使用远程客户端访问jupyter notebook。

首先,我生成了一个配置文件:

代码语言:javascript
复制
jupyter notebook --generate-config

然后我修改了配置文件/root/.jupyter/jupyter_notebook_config.py

代码语言:javascript
复制
c.NotebookApp.ip="0.0.0.0"
c.NotebookApp.allow_origin='*'
c.NotebookApp.open_browser=False
c.NotebookApp.password=u"sha1:16715d2ac300:ee938c81001cfd0841f8bf1441bd02038b62965e"
c.NotebookApp.port=9999
c.NotebookApp.notebook_dir='/home/jupyter_notebook'

最后,我运行jupyter笔记本:

代码语言:javascript
复制
jupyter notebook --config /root/.jupyter/jupyter_notebook_config.py --allow-root

但是,jupyter只是在localhost上运行服务器:

代码语言:javascript
复制
[root@localhost home]# jupyter notebook --allow-root --config /root/.jupyter/jupyter_notebook_config.py 
[I 18:22:45.287 NotebookApp] Serving notebooks from local directory: /home/jupyter_notebook
[I 18:22:45.287 NotebookApp] The Jupyter Notebook is running at:
[I 18:22:45.287 NotebookApp] http://(localhost or 127.0.0.1):9999/
[I 18:22:45.287 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

当我使用相同的配置文件在我的阿里云服务器(Ubuntu 16)上运行jupyter notebook时,它工作了:

代码语言:javascript
复制
[I 17:48:59.388 NotebookApp] Serving notebooks from local directory: /home/jupyter_notebook
[I 17:48:59.388 NotebookApp] The Jupyter Notebook is running at:
[I 17:48:59.389 NotebookApp] http://(iZbp14dhkm7uc5lnu5j510Z or 127.0.0.1):8888/
[I 17:48:59.389 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

我不知道问题出在哪里。我找了很多,但就是找不到解决方案。

欢迎任何建议。

EN

回答 1

Stack Overflow用户

发布于 2019-03-25 17:59:37

我已经解决了这个问题。这是因为我的服务器的9999端口没有连接到互联网。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55312922

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档