Forum Moderators: phranque

Message Too Old, No Replies

Tomcat and IIS on multi-IP server

IIS grabbing both IPs

         

scldad

11:53 pm on Mar 2, 2006 (gmt 0)

10+ Year Member


I have installed IIS 6.0 and Tomcat 5.0.18 on a Windows 2003 server with two NICs and two IPs.

Tomcat is configured to listen on x.x.x.193:80 and IIS is configured to listen on x.x.x.192:80. Both have host names assigned as well as IP and port.

Both services start without error but any traffic to either address is grabbed by IIS.

If I shut down IIS, requests to x.x.x.193 go to Tomcat as expected and requests to x.x.x.192 fail. This plus the lack of any startup errors says to me that the Tomcat configuration is correct.

If I restart IIS, it again grabs all requests.

Any ideas?

Cheers and thanks,
Stephen Davies

txbakers

1:51 am on Mar 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AFAIK the default port for IIS is 80, regardless of IP.

Tomcat usually runs on 8080 or 8000. If you want to run Tomcat on 80 you need to disable IIS.

There is a way, however to run J2EE stuff on Port 80, but it involves messing with the registry. I used to run Tomcat through IIS, with multiple IPs, but it was a chore. I have the zip file with instructions and jar files somewhere if you want it.

LifeinAsia

4:45 pm on Mar 3, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Do you have the same host name assigned to both? Which IP address is DNS pointing to?

scldad

1:14 am on Mar 4, 2006 (gmt 0)

10+ Year Member



There are DNS entries for both IPs.

Tomcat runs perfectly well on any port. The only requirement is that there are no clashes.
The same applies to IIS.
I see no need to play with the registry. All IP and port specifications can be set as normal configuration options.

I want both to use port 80 because that removes the need for users to nominate a port.

My real issue is that IIS seems to be ignoring the IP specification and is still listening on all interfaces despite being told to only listen on one.

scldad

12:44 am on Mar 5, 2006 (gmt 0)

10+ Year Member



I finally found the answer to this problem.
Boils down to very poor MS documentation.
The real answers are in KB articles 238131 and 813368.

Cheers,
Stephen