anaconda - 运行 jupyter notebook 后连接被拒绝(503 错误)
问题描述
我已经在 redhat 服务器系统中安装了 conda 和 anaconda。当我使用 root 用户运行 jupyter 时:
jupyter notebook --port 8889 --allow-root --no-browser
一切似乎都很好,并且 jupyter 正在成功运行。
[I 10:25:44.091 NotebookApp] JupyterLab extension loaded from
/anaconda3/lib/python3.7/site-packages/jupyterlab
[I 10:25:44.091 NotebookApp] JupyterLab application directory is /anaconda3/share/jupyter/lab
[I 10:25:44.094 NotebookApp] Serving notebooks from local directory: /anaconda3/share
[I 10:25:44.094 NotebookApp] The Jupyter Notebook is running at:
[I 10:25:44.094 NotebookApp] http://localhost:8889/?token=47727d960f404202b179027ea871fd5fda8cfed87307cad4
[I 10:25:44.094 NotebookApp] Use Control-C to stop this server and shut
down all kernels (twice to skip confirmation).
[C 10:25:44.098 NotebookApp]
To access the notebook, open this file in a browser:
file:///root/.local/share/jupyter/runtime/nbserver-12424-open.html
Or copy and paste one of these URLs:
http://localhost:8889/?token=47727d960f404202b179027ea871fd5fda8cfed87307cad4
但是,当我尝试访问在我的浏览器(在 Windows 中)中提供给我的 URL 时,我收到 503 错误。我使用给定的 URL,只是通过服务器主机名更改 localhost。任何帮助!谢谢
解决方案
如果您从另一台设备(不是本地主机)连接到 Jupyter 服务器,则需要允许外部 IP 地址。您可以通过指定:
--ip=0.0.0.0 or --ip=*
如果您希望仅访问 IP 白名单,也可以在此处指定(或在 jupyter_notebook_config.py 文件中)
尝试:
jupyter notebook --port 8889 --allow-root --no-browser --ip=0.0.0.0
推荐阅读
- kaldi - 在 timit/s5 配方中运行“run.sh”时加载共享库时出错
- swift - 在数组中查找单词
- ios - 获取嵌入在 NSAttributedString 中的图像(通过 NSTextAttachment)被视为单个字符,这样它就不会断行?
- r - 根据类别和日期出现减少/过滤数据
- javascript - 在不同的网页上生成相同的操作
- kentico - Kentico 12 MVC - 自定义 BizForm 响应
- python - 使用套接字编程通过网络将图像从客户端发送到服务器在服务器端损坏
- php - 声明刻度并注册刻度函数给出无限循环
- sql - 根据数据在选择列表中显示的限值
- javascript - 根据 DOM 值和状态比较切换类名