Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running Apache Tomcat as my only HTTP server on Windows Server 2012.

Tomcat has been installed as a service and is bound to port 80. The server.xml file has had address="0.0.0.0" added to the connector, and the Windows Firewall is open for all Port 80 requests.

My application needs to send e-mail alerts to users. Direct delivery via a locally hosted SMTP service (Apache James) has been unreliable. To ensure delivery of these e-mails, I have chosen to relay my emails via our main e-mail service, Microsoft's online Office365 service. To relay via this service, TLS encryption and other security measures are necessary. As you might imagine, Microsoft's SMTP service plays well but I have had difficulties getting any other Windows or Java-based services to relay correctly. To enable e-mail delivery, I installed the built-in Windows Server SMTP service.

This configuration has been working nicely, until the latest round of Windows Updates were installed last night. Now, I can not access my Tomcat server, and all requests on Port 80 are unsuccessful. The Tomcat logs are showing:

SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730013] An attempt was made to access a socket in a way forbidden by its access permissions.
  at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:589)
  ...

My Googling has resulted in a number of links, suggesting the IIS Socket Pooling is to blame.

I have tried to reserve Port 80 for tomcat using netsh http add iplisten 192.168.1.8 and this allows Tomcat to start, and bind locally. I can now see my Tomcat site using http://localhost/ or http://127.0.0.1/ on the local machine. However, access via http://192.168.1.8/ or via any network connection still fails.

I cannot find any documentation on how to disable IIS socket pooling completely on Windows Server 2012 (all links refer to older versions and scripts that seem to have been removed/superseeded in the current server version.

UPDATE: It appears that installing the (no depreciated) Windows SMTP service, also installs and automatically runs IIS. The installation process only shows the management tools - but when you check the IIS management consoles, there's the default website, hogging Port 80 all for itself. And of course it takes control before any 3rd party web servers are started. Sigh. Changing the IIS site to a different port or stopping it altogether seems to allow Tomcat to work again.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.