在端口8761上的appengine上部署应用程序 [英] deploy app on appengine on port 8761
问题描述
我正在部署在端口8761上运行的Java应用程序,并且在本地主机上运行良好。
尽管当我推送到App Engine灵活环境时,出现HTTP 502服务器错误。
这是我的 app.yaml
:
运行时:java
env:flex
服务:eureka
runtime_config:
jdk:openjdk8
处理程序:
- url:/.*
脚本:忽略
安全:总是
manual_scaling:
实例:1
资源:
cpu:1
memory_gb:2
日志从gcloud很好,服务器正在运行,但我的请求似乎并没有击中应用程序。
我注意到,如果我在端口8080上运行,它可以工作。现在,这不是一个问题,将默认端口更改为8080,但我想了解为什么我无法在8761上运行它。
解决方案我认为您需要使用 app.yaml 配置文件中的
network:
forwarded_ports:
- 8761 / tcp
您可能还需要在Cloud Platform Console中设置防火墙规则 。
I'm deploying a Java app that runs on port 8761, and works fine on localhost.
Although when I push to App Engine flexible environment, I get a HTTP 502 server error.
Here is my app.yaml
:
runtime: java
env: flex
service: eureka
runtime_config:
jdk: openjdk8
handlers:
- url: /.*
script: ignore
secure: always
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 2
The log from gcloud is fine, server is running, but my request doesn't seems to hit the app at all.
I noticed that if I run on port 8080, it works. For now, it is not a problem change the default port to 8080, but I would like to understand why I'm not able to run it on 8761
I think you need to use the network settings section in the app.yaml
config file:
network:
forwarded_ports:
- 8761/tcp
You might also need to set firewall rules in the Cloud Platform Console.
这篇关于在端口8761上的appengine上部署应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!