Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7.0 gives 503 error and stops the application pool

When I start the application pool, and request a page in an application in that pool, I get a "HTTP Error 503. The service is unavailable."

If I look at the application pools in IIS, I can see that it has now stopped. Going to the event viewer I find this error message:

'The identity of application pool Badge.Web 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.'

I'm very sure the credentials I'm using is correct. Something else is causing the app pool to stop.

like image 838
Ram Avatar asked Mar 06 '13 18:03

Ram


People also ask

How do I fix 503 Service Unavailable in IIS?

In IIS, go to the Application Pools under the Server, then find the correct Application Pool for your web site, and click on it. On the Advanced Settings menu to the right, select Identity and change it and enter new user and password. Click on your Application Pool again, and select Recycle to restart it.

Why does IIS application pool stops automatically?

This issue occurs when the IIS application pool Identity Parameter is not set to NetworkService. To resolve this issue, change the Identity parameter to NetworkService in the IIS Manager for Windows Server: Select the Advanced Settings for the DefaultAppPool.

How do I enable 32 bit application pool in IIS 7?

Go to Websites & Domains > Dedicated IIS Application Pool for Website. Select the “Enable 32-bit applications” checkbox and then click OK.


3 Answers

I had similar problem today when an application pool using Windows user identity X stopped working after password change for that user.

Apparently, some information linked to old credentials was stored in the system, and I solved the problem by:

  • switching app pool identity to NetworkService
  • switching it back to X using the new password

So far it's working fine.

like image 134
GreenhouseVeg Avatar answered Oct 07 '22 16:10

GreenhouseVeg


I found an article saying

The fix is to ensure that the Service/AppPool accounts have the ‘Log on as a batch job’ and ‘Log on as a service’ user rights on the server. This right can be found in Local Security Policy > Computer Configuration > Windows Settings > Local Policies > User Rights Assignment. Either remove the conflicting Group Policy and fix the Local Policy or add the rights to the Group Policy.

http://waveformation.com/2009/06/08/event-5021-the-identity-of-application-pool-lsgroupexpapppool-is-invalid/

like image 29
Waqar Ullah Khan Avatar answered Oct 07 '22 18:10

Waqar Ullah Khan


While there may be several reasons why this may occur, in this specific case, the 503 error was occurring because the Application pool failed to start. This was because the password was changed recently for the Identity under which the application pool was trying to run. Fix was to go to the IIS Manager-> Application Pool -> Advanced Settings -> Process Model -> Identity and set the password to the new one.

It would also help to check the Event Viewer Logs(Event Viewer (Local) -> Windows Logs -> Application to look for specific causes of failure before proceeding to troubleshoot any further.

like image 23
VamsiR Avatar answered Oct 07 '22 18:10

VamsiR