You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/01/10 22:42:49 UTC

DO NOT REPLY [Bug 5795] New: - Catalina Shutdown relies on localhost causing problems in a Clustered Solaris environment

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5795>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5795

Catalina Shutdown relies on localhost causing problems in a Clustered Solaris environment

           Summary: Catalina Shutdown relies on localhost causing problems
                    in a Clustered Solaris environment
           Product: Tomcat 4
           Version: 4.0.1 Final
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: clwatson@Celestica.com
                CC: clwatson@Celestica.com


I am using Tomcat in a clustered Sun E10000 (E10K). I run an Apache/Tomcat 
instance on each logical server with one or more logical servers running on a 
given node on the E10K. As a result, a node will be associated with a number of 
IP addresses, with a subset of those IPs associated with a logical server. I 
need to be able to bind the Tomcat Startup / Shutdown with a given IP or set of 
IPs. I was able to exploit an undocumented 'inet' parameter in the earlier 
Tomcat 3 code and hack org.apache.tomcat.task.StopTomcat.java to achieve this, 
but the structure is completely different for Catalina.

The modifications to Catalina for this enhancement would include:
---------------
1) Add an 'inet' (or equivalent) parameter to the Server tag in server.xml

<Server inet="myserver.com" port="8005" shutdown="SHUTDOWN" debug="0">

2) Change org.apache.catalina.core.StandardServer.java line 276-8

            serverSocket =
                new ServerSocket(port, 1,
                                 InetAddress.getByName("127.0.0.1"));

to incorporate the inet address defined in the Server tag from server.xml and 
use "127.0.0.1" as the default value if it is not defined.

3) Change org.apache.catalina.startup.Catalina.java line 826

          Socket socket = new Socket("127.0.0.1", server.getPort());

to incorporate the inet address define in the Server tag from server.xml and 
use "127.0.0.1" as the default value if it is not defined.

---------

Ideally, I would like to be able to bind a set of IPs to Tomcat 4, but the 
Socket I/O implementation in java lacks the accept() method available in C to 
do this. Since I use an Apache front end, all communication to Catalina is over 
one IP anyway.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>