【问题标题】:Jupyter not running from Google CloudJupyter 未从 Google Cloud 运行
【发布时间】:2020-08-11 10:43:34
【问题描述】:

大家好

我已经使用谷歌云设置了一个虚拟机来托管 Jupyter Hub 服务器。

我已允许 HTTP 和 HTTPS 流量。我已经设置了防火墙以允许 IP 范围为 0.0.0.0/0 的端口 8888。我已将外部 IP 地址设为静态(也尝试过临时)。

运行命令“jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser &”时,Jupyter notebook 成功启动,并显示以下内容:

[I 09:51:49.924 NotebookApp] Jupyter Notebook 6.1.1 is running at:
[I 09:51:49.924 NotebookApp] http://virtualpcname:8888/?token=xxxxx
[I 09:51:49.924 NotebookApp]  or http://localip:8888/?token=xxxxx
[I 09:51:49.924 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmatio
n).
[C 09:51:49.927 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///virtualmachinepath/.local/share/jupyter/runtime/nbserver-28710-open.html
    Or copy and paste one of these URLs:
        http://virtualpcname:8888/?token=xxxx
     or http://localip:8888/?token=xxxx

然后我对浏览器使用以下格式: http://STATIC_EXTERNAL_IP:8888/?token=xxxx

最后我无法连接到服务器并得到经典的“无法访问此站点。连接超时”

我还为端口 8888 直接添加到 Windows 防火墙的入站和出站连接的例外,关闭了防火墙,仍然没有运气

似乎访问受到限制或阻止。我将如何解决这个问题?我也试过两台不同的电脑

【问题讨论】:

    标签: google-cloud-platform jupyter-notebook jupyter


    【解决方案1】:

    我使用了带有 2 个 NVIDIA Tesla K80 GPU 的 n1-standard-8(8 个 vCPU,30 GB 内存)机器。该图像是来自 GCP 公共图像列表的 ubuntu-1604-xenial-v20200807。我在防火墙默认网络中允许源过滤器(IP 范围)0.0.0.0/0 的 5000 入口端口。我跟着public doc 在谷歌云平台上安装了 Jupyter Notebook。根据linked doc安装后我运行了以下命令:

    jupyter-notebook --no-browser --port=5000

    并像这样http://External_IP:5000/浏览了外部静态IP,我成功了。根据我的观察,我们需要仔细允许防火墙中的端口访问运行该服务的服务。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-12
      • 2021-04-23
      相关资源
      最近更新 更多