502 Exception - Azure Virtual Machine - node.js

I have azure virtual machine, hosted angular application which is having NodeJs as a backend.
Sometimes it is throwing 502 exception.
If we refresh the page and try to hit the api then we get response. But, sometimes it throws 502 and tells nothing other than this. We tried capturing IIS logs, there also no info about this exception.
Please help me to resolve this issue.

It is Server Side Problem. Kindly check the proxy or ip you're hitting. 502 Bad Gateway Error, which indicates that a server somewhere within the server stack — specifically, one which is acting as a gateway or proxy itself — received an invalid response from a different server.

Related

An Error occured while making HTTP Request from POSTMAN

This Error Occurs While I am trying to make any HTTP request to my REST API on Azure server from POSTMAN.
Why is this occurs ?
Might be your machine was started but you forgot to start the Azure server. I once faced the same problem, it occurs because my server was not properly started
This error occurs due to the tcp/ip request. This indicates whether you have not started your virtual machine or you your api needs a token to access

IBM Domino 502 Bad Gateway on redirect

In our application we have a REST integration with another service
It worked fine untill recently, however, sometimes we are returned with 502 Bad Gateway in the application
We send HTTP requests through curl and it seems that to be working but then we are presented with the error I described above
The client is believed to have a firewall installed
Whenever we face the problem, I usually ask the administrator to turn this thing off and it does the trick but I'm not sure whether it has something to do with the code?
My question is what causes such behaviour and how to avoid it in the future?

499 error code with nginx plesk for nodejs app

I have a nodejs app in a ubuntu server. i use plesk for server management.
I am using a url for catching requets from an external api. It sends a webhook to my url for catching information.
I see in my server log, 499 error when this url is requested.
I cannot find any nginx configuration for fixing this problem
Any ideas?
Kind regards
I had similar issues with NGINX recently.
The reason was server timeout - NGINX forwarded request to a backend service (Spring in my case), the backend service timed out.
In my case it was due to "out of memory" exc in Spring Boot app.
So, most probably it's an issue in your node service.

openode.io respones 502 Bad Gateway

My site in opennode.io http://ridezonebd.us.openode.io/ was running fine for 3 days. But today I am getting 502 Bad Gateway when trying to browse.
You can get a 502 HTTP code when your server is no more accessible (either if it has crashed or was stopped). In your case it is due to a lack of credit - in this case we shutdown the running instance.

Azure App Service 502 - Web server received an invalid response while acting as a gateway or proxy server

I have simple azure service app that talks to azure storage tables . This works just fine when I run it through visual studio and gives the below error when I run it after deployment .
Server error
502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
• This use to work just fine a few months before .
• I have no Azure application gateway or proxy , I believe its mandatory to have one right ?
• The problem is there in both http://myservice.azurewebsites.net/Add/Create and http://www.myservice.com/Add/Create
• There is some data base interaction that happens before the problem page comes. I also see that that data interaction on the problem page also completes fine , as I can see from backend that the data has been added.
• Using application insights , I see that all the said actions returned https error 200 , none have 502 .
I see from some web search , this is some front end error , what logs in azure will tell me the details ?
#BruceChen Thanks a lot , those are great links , Putting System.Diagnostics.Trace.TraceInformation("My Info") in my code , i was able to see in the real time trace logs ; that I had an exception in my code :( . Fixing the exception fixed the error .

Resources