Monday, 2 December 2013

HTTP Error 503. The service is unavailable.

Description:

     I have hosted my Web Application in IIS 7.5. It was worked well for the past one or two months. But today, when I try connect my Web Application thorough URL I got the HTTP error page with the message HTTP Error 503. The service is unavailable.

HTTP Error 503. The service is unavailable.

Cause of HTTP Error 503. The service is unavailable:

    After I have analyzed some time, found the reason. The HTTP Error 503. The service is unavailable occurs if the Application Pool of the corresponding Wep Application is Stopped or Disabled or Paused.
Check the following two Fix/Solutions to resolve this issue.


Steps to fix HTTP Error 503. The service is unavailable: Solution 1

1. Open the Internet Information Services (IIS) by running the command inetmgr 

2. Expand the Root node, expand Sites, and right-click on your Application, click Manage Web Site ->Advanced Settings


HTTP Error 503. The service is unavailable.


3. Note down the Application Pool name under General settings and close the window

HTTP Error 503. The service is unavailable.

4. Now go to Application Pools section, here you can see the corresponding Application Pool is in Stopped state. right-click on the Application Pool and Start it, also restart your Web Application.

HTTP Error 503. The service is unavailable. Start Application Pool


5. Now your problem would be solved, if not solved then check the below solution.

Fix HTTP Error 503. The service is unavailable: Solution 2

      Issue may be solved for some of them after completed the above steps. But in my case, I have started Application Pool, then I restarted my Web Application. Then when I connect my webpage, once again I got the same problem, then I went to further analyze from the event log. I found three System Events, Event ID 5021, Event 5057, Event 5059.

 Event ID 5012 Source:
Source:        Microsoft-Windows-WAS
Event ID:      5021
Level:         Warning
Description:
The identity of application pool AuditAppPoolV4 is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request.  If batch logon rights are causing the problem, the identity in the IIS configuration store must be changed after rights have been granted before Windows Process Activation Service (WAS) can retry the logon. If the identity remains invalid after the first request for the application pool is processed, the application pool will be disabled. The data field contains the error number. 
Event 5017 Source:
 
Source:        Microsoft-Windows-WAS
Event ID:      5057
Level:         Warning
Description:
Application pool AuditAppPoolV4 has been disabled. Windows Process Activation Service (WAS) did not create a worker process to serve the application pool because the application pool identity is invalid.
Event 5019 Source:
Source:        Microsoft-Windows-WAS
Event ID:      5059
Level:         Error
Description:
Application pool AuditAppPoolV4 has been disabled. Windows Process Activation Service (WAS) encountered a failure when it started a worker process to serve the application pool.
 
From the above Event IDs, it clearly indicates the root cause of the problem is Identity of the Application Pool. The given user Identity may be invalid due to expired password or locked or some other reason. So now we need to change it to new user Identity

 1. Go to the Application Pools section, right-click on the Application Pool, click Advanced Settings.

HTTP Error 503. The service is unavailable. Set Identity

 2. You can see the Identity name under Process model section in the opened window. click Identity name to Edit.

HTTP Error 503. The service is unavailable. Set Identity

 3. Click the Set button, enter new user credentials, and click OK.

HTTP Error 503 The service is unavailable. Set Identity


 4. Now Restart the Application Pool and Restart your Web Application.

HTTP Error 503 The service is unavailable. Set Identity

Advertisements
Advertisements

25 comments:

  1. This explanation is one of the best.

    I solved my proble.

    Thank you very much

    ReplyDelete
  2. Manish Bhushan11 June 2014 at 12:11

    Can't tell you how thankful I am to you for sharing this. Thank you so much. Believe me, this is coming from the core of my heart.

    ReplyDelete
  3. We have been using web.com for many years. Then on Friday a "HTTP Error 503" occurred. The support at web.com was pathetic, but your website gave me the answer needed to get the site back up. Very helpful. Thank you for taking the time to write this article and illustrate the points.

    ReplyDelete
  4. Helpfull, solved my problem. Thanks

    ReplyDelete
  5. Thanks a lot, very helpfull

    ReplyDelete
  6. thanks a lot, good work

    ReplyDelete
  7. Thanks a lot! It solved my problem!

    ReplyDelete
  8. If you are trying to give the same Website during deployment of webservice ,which is already existing then also you will get this error Http: 503 error. So try to avoid giving the same website name which is already in use, during deployment of the webservice.

    ReplyDelete
    Replies
    1. Hi Maillika, thanks for your comment

      Delete
  9. Thank you. I have been working on this server IIS outage problem since mid night and its now 4 am in the morning. Your instructions were super easy to follow and worked perfectly the first time.

    ReplyDelete
  10. Solved my problem. Thank you very much!

    ReplyDelete
  11. Thank you for your immense help. Solved my problem perfectly.

    ReplyDelete
  12. Changing identity names and passwords solved my problem. Thanks you so much...

    ReplyDelete
  13. Nope... doesn't work. I tried both solutions above and each time I hit the application it shuts off the apppool for the app and I get the Service Unavailable error again.

    ReplyDelete
  14. Thank you very much!! It's helpful!!!

    ReplyDelete
  15. Thanks mate !

    ReplyDelete
  16. thank you very much

    ReplyDelete
  17. Still I am getting the same error(Service unavailable. Http Error 503) even though I tried two solutions what are mentioned. Is there any solutions??

    ReplyDelete
  18. I tried your solution and it didn't work for me. I'm using iis 10 and trying to run phpinfo() on my localhost that's when I get my 503 error.

    ReplyDelete
  19. Still I am getting the same error(Service unavailable. Http Error 503) even though I tried two solutions what are mentioned. Need other solutions??

    ReplyDelete
  20. Thanks a lot for your solution.

    ReplyDelete