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:You might also need to set firewall rules in the Cloud Platform Console.