Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

deploy app on appengine on port 8761

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

like image 391
Luiz E. Avatar asked Mar 11 '17 21:03

Luiz E.


People also ask

What port does App Engine use?

The App Engine front end will route incoming requests to the appropriate module on port 8080.

Which command is used to deploy application on App Engine?

Deploy your application to App Engine using the gcloud app deploy command. The deployment command automatically builds a container image by using the Cloud Build service and then deploys that image to the App Engine flexible environment.


1 Answers

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.

like image 89
BrettJ Avatar answered Oct 06 '22 10:10

BrettJ