How to get more info about 502 error

35 views
Skip to first unread message

adrien...@gmail.com

unread,
Oct 11, 2017, 10:05:36 AM10/11/17
to Google App Engine
I deployed a NodeJs Express App on App Engine. My app is linked with a SQL instance. My deploy works fine I have no error. The problem is when I want to access my app with http GET I always get the response 502 Bad Gateway | Nginx. If I check the logs the only info I have with gcloud app logs tail -s default is 
2017-10-11 13:47:24 default[20171011t153940] "GET /" 502
I would like to have more info about the problem but I do not know how. Can anyone help?

My route is very simple 
router.get('/', function(req, res, next) {
 
return res.json({
   
result:"ok"
 
});
});

George (Cloud Platform Support)

unread,
Oct 11, 2017, 4:59:24 PM10/11/17
to Google App Engine
Hello Adrien, 

More information is needed, mostly about your CloudSQL setup. Can you authenticate and log in properly to CloudSQL? Does your app access the database instance? The likeliest cause for the 502 Bad Gateway error is generally a lack of response from the back-end, in this case your CloudSQL instance. 

A copy of significant entries from your logs in the developers' console could prove of great help. Any other piece of information you deem relevant is to be joined to your reply as well. 
Reply all
Reply to author
Forward
0 new messages