0
votes

I have deployed a spring boot application in google cloud platform. When I try to call an endpoint, I get a 502 Bad Gateway on my browser.

I can see following error in the logs:

2019-03-31 11:14:12.000 MDT [error] 33#33: *613 connect() failed (111: Connection refused) while connecting to upstream, client: 2607:f8b0:400f:806::2014, server: , request: "GET / HTTP/1.1", upstream: "http://172.17.0.1:8080/", host: "cricket-scorer.appspot.com"

Following are the contents in the app.yaml file:

env: flex

handlers:
  - url: /.*
    script: this field is required, but ignored"
1

1 Answers

1
votes

The Connection Refused error means either that you have nothing listening in "http://172.17.0.1:8080/" or maybe the firewall is preventing the connection.

What you posted is the entire app.yaml? Should be something like this:

runtime: java
env: flex

handlers:
- url: /.*
  script: this field is required, but ignored

Check out to the active firewall rules too.