Google Cloud Platform:无法从外部访问外部IP地址

时间:2018-11-09 21:29:53

标签: tomcat google-cloud-platform jupyter-notebook google-compute-engine vpc

我最近开始使用“ Google Cloud Platform”。我基本上想将其用于我的数据科学项目。我已经成功设置了项目,虚拟机实例,防火墙规则等。

enter image description here

我已经安装了在端口8888上运行的Jupyter Notebook,并且已经安装了Apache tomcat服务器。现在,我想通过虚拟机的静态外部IP地址访问这些文件,但是当我提到静态外部IP地址时,这些文件将无法访问。

我已验证了外部路径,已启用项目HTTP流量,添加了Apache tomcat和Jupyter Notebook的防火墙规则,并且对该外部IP地址执行Ping操作也正常。在下图中,可以看到jupyter notebook和tomcat的所有防火墙规则:

enter image description here

我尝试通过以下方式访问:

  • https:// {static-external-ip} /
  • https:// {static-external-ip}:8080 /
  • https:// {static-external-ip}:888 /

在这方面的任何帮助将是一个很大的帮助。学习愉快!

更新:2018年11月10日 我可以使用以下URL访问服务器:

首先,这些不能公开(从外部)访问,其次,仍然可以访问具有静态外部IP的服务器。

1 个答案:

答案 0 :(得分:0)

您似乎已经完成了将服务公开给外部的所有步骤,但我猜不到一件事-Jupyter是否正在监听回送接口?每个Jupyter's documentation-

By default, a notebook server runs locally at 127.0.0.1:8888 and is accessible only from localhost. You may access the notebook server from the browser using http://127.0.0.1:8888.

该文档提供有关如何制作accessible to the outside world的信息。简而言之,要访问该服务,必须在所有接口(ips)上进行绑定。