Azure web app is 503 Service Unavailable. How do I get it back running? - azure

Our website has been hosted on Azure for a few years. Tonight it is throwing 503 Service unavailable errors. I cannot even load a url to a .jpg file. I have restarted the app and still nothing loads from the website. I cannot buy Azure support because I have bought and cancelled Azure support in the past. We are a 3 person business and depend on our small website and it is down and I don't know what to do. None of the trace logs make any sense to me.

I think 503 could mean that you reached a quota and Azure now respond with a 503 for requests. So I would check the Quotas section within your App Service Plan.
Also check:
Troubleshoot HTTP errors of "502 bad gateway" and "503 service unavailable" in Azure App Service

There are several things you can do to help remedy the situation.
Restart the application (please indicate what it is that will help
us)
Restart the instance that the application is running on.
Restore from a previous working backup of the site.
You should also add more information to your post so we can help, like what application you are using e.g. Apache, Nginx ect.

I've also had a similar problem. I had two deployment slots and in the first slot (production) which I had the latest code and in the second slot, I've missed deploying the latest code and configured traffic as 60-40 which gave me hard time finding it.
Once I've set 100% to the production slot it started working.
Just thought to share this in case it could be useful if you come across the same stuff in the future.

For me it was "Path mappings" in "Configuration".
As soon as i added a new Azure Storage Mount, the application broke.
Setting my Storage account -> Networking, to "Enabled from all networks" fixed the issue.

For us it was a result of the remote debugger. Disabling remote debugger and restarting the app service fixed the 503 error. I think one dev was remote-debugging while another was deploying the app and that seems to have caused an issue under the hood of the app service that broke port binding (we were seeing a stack track in logs about failing to bind to port).

Related

Error while Deploy Azure App Service : ERROR_COULD_NOT_CONNECT_TO_REMOTESVC

I am getting below error while deploying app service via Azure DevOps. I tried to search for this issue but could not found root cause of this.
Error :
2021-03-15T06:01:27.7479723Z ##[error]Error: Error Code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
More Information: Could not connect to the remote computer ("web-app.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.
Error: The remote server returned an error: (403) Forbidden.
Error count: 1.
'''
I tried everything until I spotted (after reading this) that my (dev) shared App Service service plan was out of storage space! When I upgraded it to a bigger one I could deploy again!
According to this document, the error is caused by that Web Deploy cannot connect to the remote service. Please refer to the follow points to troubleshoot your problem:
Please make sure Azure app service works fine. You can ping the remote machine.
That the msdepsvc(“Microsoft Web Deployment Agent Service”) or wmsvc(“Web Management Service”) service is started on the remote server.
Your firewall is not blocking incoming connections of your ports on the destination. If you used the default installation, then it would be 80 for msdepsvc and 8172 for wmsvc.
In addition, you could try to add -retryInterval:6000 -retryAttempts:10 to Additional Arguments in Azure App Service Deploy task as this thread stated.
BTW, if this issue still exists in Azure pipeline, please check if this issue exists locally. You could refer to this thread: Got 403 Error when doing Web Deployment and Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC for more guidance.
Thank you Edward for insightful explanation for possible root cause. Issue is resolved now.
Root cause was the agent pool selected did not have rights for deployment(IP are not whitelisted for production App service) since
We are not using agent provided by DevOps directly for production environment.
An instance that'd worked great for years starting giving me this error yesterday during Web Deploy. No changes from our side. No amount of poking around non-invasively solved it, but simply hitting the Restart button on the Azure app service Overview page put it to bed quite easily.
In short: Double-check your publish profile (each element).
Bit longer: In my case, my publish profile contained a ResourceGroup element which pointed to the wrong resource group. (I'm using WebPublishMethod: MSDeploy) I went over all elements and made sure they point to the correct resource, credentials and whatnot.
That seemed to solve the issue.
In my case, I had modified machine.config to captur traffic in Fiddler
<system.net>
<defaultProxy
enabled = "true"
useDefaultCredentials = "true">
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
</defaultProxy>
</system.net>
and this was interfering with the VS deployment to Azure

How to fix issue with Azure Web App Services return Error 503

We have deployed in Azure Portal some app services under a free plan. The apps seem to be healthy and were working without problems until today. Suddenly all of them are returning an Error 503 "The service is unavailable.".
Under one of the services in Diagnose and fix problems in azure portal I checked CPU, Memory, Port usage and everything looks healthy.
Any ideas on how to fix the issue?
Could that be Microsoft maintenance and after some hours the sites are working normally again?
After 5 hours the services were up again. Probably it was a maintenance issue. So after no indication that my services have a problem, waiting some hours was the solution. Maybe this site that displays the azure status could be helpful for those that run into this problem.

"An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail."

I have hosted an MVC application in Azure App Service. The application is not creating any problem when i am testing it in local host. I can easily connect to the Dynamics-365 through the SDK and can do easily CRUD operation.
But when i am trying to login which is hosted in Azure it is giving that error though am not getting this error if i restart the app service. If i restart the app service in every morning then i am not getting this error. But i don't want to restart the app service daily.
Here the same question also has been asked but there is not any solution which has been marked as Solved. Time zone difference between client and server has been discussed here but the part which confused me when i am restarting the app service it is working.
How to solve this issue? I am thinking about app service Auto Healing. Should this work?
Any solution would be appreciated.
Thanks in advance.
From your description of Question it looks like connection pool issue. You probably are not closing connection after your transaction is completed. Try force closing connection (threads) that might solve your issue.
OR
The clock on the Server hosting client application was out of sync with the server having the service.
This is almost always because of a server time skew. The remote server
and the client's system time must be within (typically) 10 minutes of
each other. If they are not, security validation will fail.
I'd check azure service bus and find out what their server time is, and
compare that to your server time.
WCF gives an unsecured or incorrectly secured fault error
https://social.msdn.microsoft.com/Forums/vstudio/en-US/ae4172dd-e215-4a72-b927-d164ce4cc318/an-unsecured-or-incorrectly-secured-fault-was-received-from-the-other-party?forum=wcf

Website giving 502 error for the past 6 hours

Seeing 502 error for the past 6 hours.
Tried restarting the server but it didn't do anything.
It is hosted on a VM (instead of being an Azure Web App).
Azure region: North Europe.
App Insights resource didn't report of any problem.
Website is written in mvc core.
What do I do to fix this?
If you have already tried the link suggested by DonNetMatt, then, here is what I would do.
You said you are hosting it in a VM. could you try redeploying the site to another server (web app or VM), and if possible another region. This should tell you if the issue is really with your web app or the server.
In all likelihood, the redeploy should load the site just fine, in which case contacting Azure support is the best way to solve this issue.
I doubt if the issue is on your code. With the error you are getting, its likely a server issue on Microsoft Azure side.
(Note : I am assuming when you say 'Website is writting in mvc core' you mean, website is written in mvc core. Or, is your website designed to write code as part of some automation thing, and generating MVC code?)

503 Service Unavailable on Azure Cloud App

I have the strange problem, that began near one week ago. I have the site, hosted as a cloud app (a webrole with at least 2 instances running, auto scaling up to 4 max) in Azure. And from time to time when I open it I get 503 Service Unavailable error. But if I will refresh the page, site will open without any errors. QA site at the same time works without any problems. May you know why it's going on? Thanks!
503s in Azure App Services are one of these three:
You've reached the quota for the underlying app service plan (obviously doesn't apply to a premium plan)
You're using deployment slots and hitting a slot that is missing code (if the slots are 50%/50% or something like that it would explain why the 503 is intermittent)
Remote Debugger is preventing port binding of the application. Try disabling Remote Debugging and restarting the app service.

Resources