• Register
0 votes
36 views

Problem :

I am very new to Azure. Currently I am trying to host my azure website and I have already tried to troubleshoot for the few days, but still I am facing the same error as below:

“502 Web server received an invalid response while acting as a gateway or proxy server.”

8 4 2
2,300 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I have gone through your question related to Azure and I know how to fix the issue.

These 502 errors are not visible in the IIS logs as they are always thrown by your front end server which are basically try to forward your requests to a worker who is hosting your site and you can find many reasons why your front end is returning 502 error.

I had setup with my web servers behind the azure application gateway out of them some servers were working properly but traffic to one of those server was having a 502 issue. So I just followed below approach:

I simply checked my Backend health on my application gateway and I found that one of the server couldn’t be reached.So I tried to open a backend server url on my cloud VM a root of my website can't be reached. But my App was running. It turned out a gateway was supposed to ping a port 80 of a target machine and then I just disabled a root website on a target server. So my gateway assumed my server is dead and just refused to do a redirect.

5 2 1
4,980 points

Related questions

0 votes
1 answer 395 views
395 views
Problem : I am trying to do the file upload & enter the data task into my MongoDB using a flask but I had below error when I filled my form & upload my image: “Bad Request The browser (or proxy) sent a request that this server could ... mypassword, 'email': myemail, 'img_name': file_name})         return render_template('index.html')     else:         return render_template('index.html')
asked Jan 22, 2020 jwilliam 3.9k points
0 votes
1 answer 219 views
219 views
Problem : I am beginner to Angular. I have recently started to use the ng serve but now I continuously get below error. “A bad http response code (404) was received when fetching the script.” I have already tried to do lot of research on it but still I don’t have any solution on it. Can somebody help me in resolving the errors ?
asked Mar 5, 2020 mphil 2.3k points
0 votes
2 answers 1.9K views
1.9K views
Problem : Currently I am using VueJS and Laravel for the project. Following issue started to show lately and it also comes up even in the old git branches. Unchecked runtime.lasterror: the message port closed before a response was received. This error only comes up in Chrome browser.
asked Dec 10, 2019 alecxe 7.5k points
0 votes
1 answer 25 views
25 views
Problem : I want to develop the alexa skill, which should communicate with my own webservice (tomcat). To set up my project I initially followed the amazon guides. However I am still unable to connect to my web service and I am only facing the below message : "The remote ... "text" }, "shouldEndSession": true } } How can I resolve my issue? Please Note : I have hosted my service on Amazon EC2.
asked Dec 23, 2019 alecxe 7.5k points
0 votes
1 answer 386 views
386 views
Problem : I want to set up the hello world example with AWS lambda and serving it through the api gateway. I clicked a "Create a Lambda Function", which set up a api gatway and selected a Blank Function option. I added a lambda function found on AWS ... response { "message": "Internal server error" }. And my logs say "Execution failed due to configuration error: Malformed Lambda proxy response".
asked Jan 22, 2020 jwilliam 3.9k points
0 votes
1 answer 187 views
187 views
Problem: I am new and learning, I need help, can anyone help by filling in the blanks? When CSS is coded in the body of the web page as an attribute of an HTML tag it is called _____?
asked Feb 21, 2020 maddi86 5.4k points
1 vote
1 answer 46 views
46 views
Problem : On Cloudflare DNS setting page it state that An A, AAAA, CNAME, or MX record is pointed to your origin server exposing your origin IP address. Any solution for above problem?
asked Nov 11, 2019 peterlaw 6.9k points
0 votes
1 answer 2.2K views
2.2K views
Problem : I am trying to run startx via PuTTY and Xming but it gives following error: putty x11 proxy: unable to connect to forwarded x server: network error: connection refused
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 534 views
534 views
Problem : Facing following ASP.Net error an asynchronous module or handler completed while an asynchronous operation was still pending.
asked Nov 14, 2019 peterlaw 6.9k points
0 votes
1 answer 306 views
306 views
Problem : I am trying to learn the pSQL. I recently moved my Laravel App from the MySQL to pSQL. But now I keep on getting below error. “The Response content must be a string or object implementing __toString(), "boolean" given.” I have the API that was returning my promotion before but now it only returns the above error. Can anyone suggest me solution on above error ?
asked Feb 13, 2020 mphil 2.3k points