title: Getting 502 Bad Gateway while calling an end point configured in spring boot application deployed in GCP
body: <p>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.</p>
  
  <p>I can see following error in the logs:</p>
  
  <p>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: "<a href="http://172.17.0.1:8080/" rel="nofollow noreferrer">http://172.17.0.1:8080/</a>", host: "cricket-scorer.appspot.com"</p>
  
  <p>Following are the contents in the app.yaml file:</p>
  
  <pre><code>env: flex
  
  handlers:
    - url: /.*
      script: this field is required, but ignored"
  </code></pre>