tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "W. Egan" <khayman1...@hotmail.com>
Subject Re: Tomcat 4.1.12 taking IPs or Ports not assigned to it?
Date Sun, 27 Oct 2002 17:13:36 GMT
Its a Microsoft design problem.  I guess.  If IIS listens on port 80 on ANY
address on a given machine, it binds 0.0.0.0:80.  It's called socket
pooling.  Nothing else will be able to bind 80 once IIS is started.  And if
something else starts first and binds 80, IIS wont be able to.  I ran into
the same problem.  See this remedy:

"Socket Pooling (Binding IIS to 0.0.0.0:80)
Socket pooling causes Internet Information Services (IIS) 5.0 to listen to
all IP addresses, which can present a possible security risk for secure
domains with multiple networks. Also, bandwidth throttling and performance
adjustments will apply to all Web sites configured for the same port (for
example port 80). If bandwidth throttling or performance tuning is being
done on a per-site basis, socket pooling will need to be disabled.
To disable socket pooling, perform the following steps:
cscript adsutil.vbs set w3svc/disablesocketpooling true
The command replies as follows:
disablesocketpooling : (BOOLEAN) True
Stop and start the IISAdmin service.
Restart the WWW service."

Once you do this, you can have both IIS and Apache/Tomcat listening on port
80 on different IPs on the same machine.  No need for multiple nic's and
multiple network segments either.

hope this helps,
began

----- Original Message -----
From: "Robert L Sowders" <rsowders@usgs.gov>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Saturday, October 26, 2002 5:24 AM
Subject: Re: Tomcat 4.1.12 taking IPs or Ports not assigned to it?


> It's by design.
>
> Try using two nic's on different subnets.  Say 1.2.3.4 and 1.2.4.4.
>
> rls
>
>
>
>
>
> Nathan Phelps <nphelps@solarc.com>
> 10/25/2002 12:20 PM
> Please respond to "Tomcat Users List"
>
>
>         To:     "'tomcat-user@jakarta.apache.org'"
<tomcat-user@jakarta.apache.org>
>         cc:
>         Subject:        Tomcat 4.1.12 taking IPs or Ports not assigned to
it?
>
>
> EXECUTIVE SUMMARY:
>   - Single Windows 2000 (SP3) Server with JDK 1.4.1_01
>   - Running IIS 5.0 and Tomcat 4.1.12
>   - Two IP addresses assigned to a single NIC (1.2.3.4, and 1.2.3.5 for
>     example)
>   - IIS has one website (all other websites have been stopped) assigned to
>     1.2.3.4:80
>   - Tomcat has one website assigned to 1.2.3.5:80
>   - If Tomcat is started after IIS, Tomcat reports
> "java.net.BindException:
>     Address already in use: JVM_Bind:80"
>   - If Tomcat is started before IIS, IIS reports "Address already in use"
>   - Tomcat server.xml file is included at bottom.
>
> MORE DETAILS:
> I have a Windows 2000 Server (SP3) with IIS 5.0 and Tomcat 4.1.12
> installed
> using JDK 1.4.1_01.  The machine has two static IPs assigned to it (I'll
> use
> 1.2.3.4, and 1.2.3.5 for examples) and the IIS website is configured to
> use
> one of these address at port 80 (1.2.3.4).  The default Tomcat HTTP1.1
> connector has been updated and the configuration file has been modified by
> adding the "address" attribute and assigning the other IP (1.2.3.5) to it.
> The "port" attribute has been modified to port 80.
>
> When I try and start Tomcat, it reports that the address is already in
> use.
> However, I have verified that it is indeed NOT in use.  I have verified
> this
> assumption by creating an additional IIS website and assigning it to the
> IP
> I had assigned to the Tomcat connector (1.2.3.5) as well as to port 80.  I
> can start both IIS websites (1.2.3.4:80 and 1.2.3.5:80) and access them
> both
> with the correct IPs.
>
> An additional test I conducted was to stop all IIS websites, and then
> start
> Tomcat on its previously assigned IP (1.2.3.5) on port 80.  It started
> successfully and could be accessed.  Then, however, I tried to start the
> original IIS website (on 1.2.3.4), and it failed to start reporting the
> address was in use.  The ONLY way I could get them both running was to
> assign them different port numbers (which sort of eliminates the whole
> purpose of having two different IPs in the first place).  How can I fix
> this
> issue?
>
> TOMCAT CONFIGURATION FILE:
> My configuration file (with the sample IP and comments removed) looks like
> this:
>
> <Server port="8005" shutdown="SHUTDOWN" debug="0">
>   <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
>                 debug="0" port="-1" login="admin" password="admin"/>
>
>   <Service name="Tomcat-Standalone">
>
>     <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>                port="80" minProcessors="5" maxProcessors="75"
>                enableLookups="true" redirectPort="8443"
>                acceptCount="10" debug="0" connectionTimeout="60000"
> address="1.2.3.5"/>
>
>     <Engine name="Standalone" defaultHost="localhost" debug="0">
>
>       <Logger className="org.apache.catalina.logger.FileLogger"
>               prefix="catalina_log." suffix=".txt"
>               timestamp="true"/>
>
>       <Realm className="org.apache.catalina.realm.MemoryRealm" />
>
>       <Host name="localhost" debug="0" appBase="webapps"
>        unpackWARs="true" autoDeploy="true">
>
>         <Valve className="org.apache.catalina.valves.AccessLogValve"
>                  directory="logs"  prefix="localhost_access_log."
> suffix=".txt"
>                  pattern="common"/>
>
>         <Logger className="org.apache.catalina.logger.FileLogger"
>                  directory="logs"  prefix="localhost_log." suffix=".txt"
>                          timestamp="true"/>
>       </Host>
>
>     </Engine>
>
>   </Service>
>
> </Server>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message