502 Bad Gateway nginx google app engine

6,641 views
Skip to first unread message

Oluwatobi Omotayo

unread,
Nov 1, 2017, 10:49:56 AM11/1/17
to Google App Engine
Hello, I'm just trying app engine for the first time. I followed through the Hello world application and I was able to deploy it successfully. However, I went on to deploy my own app from my computer, everything was working perfectly, but when I deployed using gcloud, a new version was created and the previous one was stopped. After deployment was complete I navigated to the URL of my app and I'm getting 502 Bad Gateway nginx. I've checked the logs nothing seems to be wrong. Please help resolve this quickly

Oluwatobi Omotayo

unread,
Nov 1, 2017, 12:26:28 PM11/1/17
to Google App Engine
I can notice that the app crashes at the app.get() method of my code from the logs, and I noticed server is listening at port 3000 instead of the server port what could possibly be wrong?

Kenworth (Google Cloud Platform)

unread,
Nov 1, 2017, 3:12:16 PM11/1/17
to Google App Engine
The Nginx process will often serve a 502 if the application raises an exception, an internal API call raises an exception or if the request simply takes too long.  As such, the status code by itself does not tell us much.

Without knowing your logs and your code, it is hard to tell why you are not using the server ports. Please note that port 3000 is used all the time and it is usually safe for development usage. I do not think this is the underlying issue.

I suggest checking the routing handlers of your app. Try calling the crashing endpoints and trace it to the dispatchers all the way to the actual function.

Oluwatobi Omotayo

unread,
Nov 3, 2017, 4:08:59 AM11/3/17
to Google App Engine
I've discovered the problem. Thanks for the support


On Wednesday, November 1, 2017 at 3:49:56 PM UTC+1, Oluwatobi Omotayo wrote:

Jose Nasiff

unread,
Nov 10, 2017, 10:32:01 AM11/10/17
to Google App Engine
hi oluwatobi ! can u share me ur solution cause ive the same error trying to deploy my angular4 project.

thanks!

Kenworth (Google Cloud Platform)

unread,
Nov 14, 2017, 12:12:11 PM11/14/17
to Google App Engine
@Jose As previously mentioned, 502 error code does not really tell us much of the root-cause of the issue. A thread like this is off-topic for Google Groups, and should be posted to StackOverflow. While I'd like to help you, this isn't the place to do it. This forum isn't meant for specific 1-on-1 technical issues, but for general discussion of the platform and its services. With StackOverflow, which we also closely monitor, you'll be in touch with a much larger user-base of people who are going to help you, and in a format which is designed for that purpose. Check out our community support page for the list of tags we monitor.
Reply all
Reply to author
Forward
0 new messages