Website giving 502 error for the past 6 hours - azure

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?)

Related

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.

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

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).

IIS binding migration azure

We are trying to migrate our ASP.NET web apps to an Azure VM. We have about 5 apps under our website, but we need to do these one by one. The problem is when we migrate one app to an Azure VM IIS, we need to maintain the URL and not disturb the 4 remaining web apps. Below is an image better explaining what I need to do:
See Image
Notice I need to maintain the original URL (https://www.site1.com/App1-1) when moved to the Azure VM. We had thought about doing a reverse proxy for that one app, but I think that would put too much extra traffic going back and forth.
I know this is probably not the best way of migrating things to Azure. Refactoring the app is slated for the future. This is a "lift and shift" interim solution. Any suggestions or tips would be greatly appreciated!
You can do something like:
Migrated the app to Azure VM and test it first to confirm it working
Configure the custom DNS entry to point to the app in Azure. You can read more here
https://learn.microsoft.com/en-in/azure/dns/dns-domain-delegation
Switch off the app from the local server once DNS entry in Azure is active.
Migrate other apps

Web API on Azure errors until App Pool is Recycled

I have a web role that hosts 4 MVC 4 sites. One of the sites (let's call it the API site from now on) uses both MVC and Web API. When I upgrade the web role, the Web API controllers from the API Site returns a 500 Internal Server Error to all requests. The MVC controllers work as expected and I know the request is getting at least as far as the Application_BeginRequest method of the global.asax. I'm not seeing anything logged in my Elmah log. The only hint I have of anything being wrong is the following in the event log:
The application '/' belonging to site '1' has an invalid AppPoolId 'DefaultAppPool' set. Therefore, the application will be ignored.
As web roles use App Pools with guids as identifiers I don't know where this is coming from.
What is most confusing is that once I recycle the app pool for the API site (which is a guid) everything starts working correctly.
I've tried recyling the app pools as part of a startup task on the role, but that doesn't seem to make any difference.
Any suggestions about what I can do to get Web API to start correctly?
I never did find what was causing this issue.
It got to a point where I could deploy from my machine and not get the problem, but my colleague could not.
We tried comparing the contents of the .cspkg files that were produced, but didn't find any differences.
We are now both able to deploy the project with no problems.
My suspicion is that this was resolved when we upgraded the Azure SDK and tools on our machines.

WCF RIA Services Domain Service not found when debugging with Windows Azure cloud project

I am trying to debug a Windows Azure Cloud project locally with Visual Studio 2012 running the Windows Azure SDK 1.7 on a Windows 8 PC with IIS 8 Express. The cloud project includes a Web Role running an ASP.NET MVC 3.0 web project that includes WCF RIA Services that in turn links to a Silverlight project hosted on that web site. When I run the web site directly and do not try to debug the Azure cloud project I am able to access the web site and the Silverlight application and the RIA Services are accessible with absolutely no issues. If however I debug the Azure Cloud project the emulators start up and the web site comes up. I am able to then access the Silverlight application but when it tries to make a request back to the WCF RIA Services Domain Service I receive an error from the IIS Server stating that the domain service is not available. I then try to go directly against the WCF RIA Service endpoint to see if it will come up outside the Silverlight application and again I receive a 404 Not Found response when going to the *.svc endpoint.
I have gone through various searches to try and resolve the issue and I have used Fiddler to ensure the network requests are not having any issues. I have not been able to identify any problems. I also tried turning on WCF tracing to see if any errors comes up, but the trace files are not even updated when I debug through the Azure Cloud project.
After repeatedly getting this behavior I have attempted a complete re-install of Visual Studio 2012 and the Azure 1.7 SDK, but I still get the same behavior. Does anyone have a suggestion of what the issue may be or how I might try and track down the issue, since the WCF tracing is not offering me any additional information?
Strange. Could you try this sample project, which is quickly created with VS2012 on W8 using IIS8 Express, .NET 4.0, MVC3 hosting Domain Service and Silverlight consuming that domain service. Everything works just fine.
If that project runs at your environment fine - then it might be some missconfiguration of your web.config/global.asax file. If that project also fails in your environment - then it might be something very messy with the environment.

Resources