【发布时间】:2019-05-27 06:45:55
【问题描述】:
我在 GCP 中创建了计算引擎实例来部署我的网络应用程序。它在实例 (localhost:8080) 内运行良好。 但是,使用外部 IP 地址,即使防火墙规则允许所有实例使用 0.0.0.0/0,我也无法访问它。我添加了端口 tcp:8080 和 tcp:8444 但它不允许甚至连接“Telnet”。
Connecting To 35.185.98.244...Could not open connection to the host, on port 8444: Connect failed
Connecting To 35.185.98.244...Could not open connection to the host, on port 8080: Connect failed
谁能帮我解决这个问题?
我的 git 网址:https://github.com/ChkBuk/myexamples/tree/master/SyneBiz
【问题讨论】:
-
您是否为防火墙规则和您的实例使用了相同的标签?你运行的是什么软件?显示其绑定到 0.0.0.0/8080 和 0.0.0.0/8444 的配置
-
@JohnHanley 我将“网络中的所有实例”设置为目标,并且我已经部署了 spring-boot 应用程序。我使用 java -jar 我的应用程序在 cod 上运行。 jar' 命令
-
@JohnHanley 在某些教程中,它说我们需要为 8444 端口添加防火墙,因为它与客户端-服务器通信有关
-
我会假设你的防火墙是正确的。这意味着您的软件可能绑定到 localhost 而不是 0.0.0.0。由于我看不到您的代码,我只能猜测。
-
@JohnHanley 您可以使用以下 git 链接访问我的代码。 github.com/ChkBuk/myexamples/tree/master/SyneBiz我需要更改代码吗?
标签: security google-cloud-platform google-compute-engine