tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup StopTomcat.java
Date Tue, 26 Feb 2002 23:48:35 GMT
In your case, you should use:

shutdown.sh -ajpid /var/spool/tomcat3/ajp12.id

I suppose that it could be a bit more user-friendly when you forget.  Feel
free to add in another check that the file was actually found if you want.
----- Original Message -----
From: "GOMEZ Henri" <hgomez@slib.fr>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Tuesday, February 26, 2002 1:38 PM
Subject: RE: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup
StopTomcat.java


There is a problem with that patch :

    void stopTomcat() throws Exception {
        // if a parameter isn't set, try to read it from a file
        if( port < 0 || host == null || secret == null ) {
            String tchome=getTomcatHome();

            String defAjp12File=tchome + "/conf/ajp12.id";
            String defAjp13File=tchome + "/conf/ajp13.id";
            String ajpFile=secretFile;

            int portSave=port;
            String hostSave=host;
            String secretSave=secret;

            boolean pickAjp=(!isAjp13 && !isAjp12);

What happen if you put ajp12.id or ajp13.id, in another location
using :

        <Ajp12Connector address="127.0.0.1" port="8007"
AjpidFile="/var/spool/tomcat3/ajp12.id" />
        <Ajp13Connector port="8009" AjpidFile="/var/spool/tomcat3/ajp13.id"
/>

===>

Using classpath: /var/tomcat3/lib/tomcat.jar
Using JAVA_HOME: /opt/IBMJava2-13
Using TOMCAT_HOME: /etc/tomcat3
Stopping Tomcat.
Stopping tomcat on null:-1 null
address=nullport=-1secret=null
Guessed home=/var/tomcat3
Exception: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException:
java.lang.IllegalArgumentException: port out range:-1
    at java.net.Socket.<init>(Socket.java:265)
    at java.net.Socket.<init>(Socket.java:139)
    at org.apache.tomcat.startup.StopTomcat.stopTomcat(StopTomcat.java:338)
    at org.apache.tomcat.startup.StopTomcat.stopTomcat(StopTomcat.java:307)
    at org.apache.tomcat.startup.StopTomcat.execute(StopTomcat.java:185)
    at java.lang.reflect.Method.invoke(Native Method)
    at
org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87
)
    at org.apache.tomcat.startup.Main.execute(Main.java:313)
    at org.apache.tomcat.startup.Main.main(Main.java:140)
Root Exception: java.lang.IllegalArgumentException: port out range:-1
java.lang.IllegalArgumentException: port out range:-1
    at java.net.Socket.<init>(Socket.java:265)
    at java.net.Socket.<init>(Socket.java:139)
    at org.apache.tomcat.startup.StopTomcat.stopTomcat(StopTomcat.java:338)
    at org.apache.tomcat.startup.StopTomcat.stopTomcat(StopTomcat.java:307)
    at org.apache.tomcat.startup.StopTomcat.execute(StopTomcat.java:185)
    at java.lang.reflect.Method.invoke(Native Method)
    at
org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87
)
    at org.apache.tomcat.startup.Main.execute(Main.java:313)
    at org.apache.tomcat.startup.Main.main(Main.java:140)

<===

Debug show that stopTomcat is called with portInt = -1


    /**
     *  This particular implementation will search for an AJP12
     * connector ( that have a special stop command ).
     */
    public void stopTomcat(InetAddress address, int portInt, String secret )
throws IOException


How could we solve this :

my ajp13.id :

#Automatically generated, don't edit
#Tue Feb 26 21:37:00 CET 2002
port=8009

my ajp12.id :
8007
127.0.0.1

???

-
Henri Gomez                 ___[_]____
EMAIL : hgomez@slib.fr        (. .)
PGP KEY : 697ECEDD    ...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6


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



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


Mime
View raw message