Omicron Llama

Coding all day, every day.

HTTP 503 & App Pools That Just Won’t Stay Up (IIS7, Win2k8 x64, IPv6)

Recently came across an odd problem on a dev machine where any and all application pools for every website on IIS would stop as soon as any website using them was launched.

I was setting up a basic WebSite in IIS7 to host a web service, and created an Application Pool for that website (using a dedicated Identity, this webservice started a process that had to run under the account of that identity), and everytime I tried to launch the site I would get the HTTP 503 error message.

The strangest thing was (and the thing that led me down the wrong path for ages) was that the Application Pool kept stopping every time I tried to access the web application. I would start it back up, recycle IIS, navigate to the site again to be presented again with a dead application pool.

What was worse, than any and all SharePoint web applications on the VM would just show “Cannot display this page” error messages in IE (with no HTTP error codes), unless I launched them via the “Browse” link via IIS Manager, where I would get the 503 error.

The Event Logs showed this error message:
A listener channel for protocol ‘http’ in worker process ‘5764’ serving application pool ‘DefaultAppPool’ reported a listener channel failure.  The data field contains the error number.

Which sounds as helpful as ever from IIS. With help from my colleague Mark Macrae and this blog post http://blogs.msdn.com/b/jmacleod/archive/2008/06/25/iis7-sharepoint-2007-fails-with-503-service-unavailable-errors.aspx I discovered that deleting the HOSTS file solved this.

This blog post is targeted specifically at SharePoint but I discovered this issue accessing ANY web site on the system, not just SharePoint, but the workaround solved the issue.

To diagnose this intially, everything loaded perfectly fine when I access the web applications by navigating to “localhost” instead of the machine’s hostname.

In summary, if you can access the web apps using localhost but not the hostname, delete the HOSTS file, and recycle IIS (with iisreset).

The environment I was using looked like this:

Windows Server 2008 R2 64Bit
Microsoft Office SharePoint Server 2007 64bit
IPv6 configured on the network adapters

Leave a Reply

Your email address will not be published. Required fields are marked *