You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vincent Massol <vm...@octo.com> on 2001/08/05 22:24:52 UTC

[repost] Re: Limitations in using a different Ajp port than the standard ? (WAS Re: SAAAAAAAM! :))

Hi,
I would like to use different ports than the standard Tomcat ones. For the
HTTP listener, it works fine. However I am having trouble for the Ajp
listener which is used to stop tomcat. The issue is the following :
* When I start Tomcat I use my own server.xml file which is located in my
own directory (I start Tomcat using the -config switch). In server.xml I
also set the ContextManager home to be my own directory. So Tomcat generates
an ajp12.id file in _that_ directory (and not into Tomcat home directory,
which is normal and fine). The tomcat home directory is set to be the
directory where I have installed Tomcat.
* No, when I want to stop Tomcat, it seems Tomcat looks for an ajp12.id file
but in the ${tomcat.home}/conf and _not_ in the directory defined in the
ContextManager home or where my server.xml file is.

In other words, it seems it is not possible to start 2 instances of Tomcat
and only stop one running instance (the one with the different ajp port) by
using only one Tomcat installation ?

Is that a bug, a feature or have I forgotten something ?

Please note that it only fails on Tomcat 3.3 (I have tried it on 3.3-b1 and
on the nighlty build of 2/8/2001). It works fine on Tomcat 3.2.1 and on
Tomcat 4.0.

Find below my start, stop scripts and relevant portion of server.xml

Thanks a lot.
-Vincent

---- start script -------

    <target name="start_tomcat_33">

        <java classname="org.apache.tomcat.startup.Main" fork="yes">
            <jvmarg value="-Dtomcat.home=${tomcat.home.33}"/>
            <arg value="-config"/>
            <arg value="${out.tomcat33.full.dir}/conf/server.xml"/>
            <classpath>
                <pathelement location="${java.home}/../lib/tools.jar"/>
                <fileset dir="${tomcat.home.33}/lib">
                    <include name="tomcat.jar"/>
                </fileset>
            </classpath>
        </java>

    </target>

---- stop script -------

    <target name="stop_tomcat_33">

        <java classname="org.apache.tomcat.startup.Main" fork="yes">
            <jvmarg value="-Dtomcat.home=${tomcat.home.33}"/>
            <arg value="-stop"/>
            <arg value="-config"/>
            <arg value="${out.tomcat33.full.dir}/conf/server.xml"/>
            <classpath>
                <pathelement location="${java.home}/../lib/tools.jar"/>
                <fileset dir="${tomcat.home.33}/lib">
                    <include name="tomcat.jar"/>
                </fileset>
            </classpath>
        </java>

    </target>

---- server.xml --------

[...]
        <RequestInterceptor
         className="org.apache.tomcat.modules.server.Ajp12Interceptor"
         tomcatAuthentication="false"
         port="8777" />




----- Original Message -----
From: "Sam Ruby" <ru...@us.ibm.com>
To: "Pier P. Fumagalli" <pi...@betaversion.org>
Cc: "Vincent Massol" <vm...@octo.com>
Sent: Thursday, August 02, 2001 2:27 AM
Subject: Re: SAAAAAAAM! :)


> Vincent, can you take a look at changing the port numbers from 8080 to
> something unique?  Preferably, something controlable via a property?
>
> Pier - I was doing a test build of some changes to cactus...sorry.
>
> - Sam Ruby
>
>
> "Pier P. Fumagalli" <pi...@betaversion.org> on 08/01/2001 09:23:49 PM
>
> To:   Sam Ruby/Raleigh/IBM@IBMUS
> cc:
> Subject:  SAAAAAAAM! :)
>
>
>
> What's going on on Nagoya and Tomcat 4.0? Huh? :)
> You little brat binding to my network ports and giving me BindExceptions
:)
> Can you remove the config for the WARP connector from your TC4
> configuration?
> Cheers :)
>
>     Pier
>
>
>
>




Re: [repost] Re: Limitations in using a different Ajp port than the standard ? (WAS Re: SAAAAAAAM! :))

Posted by Vincent Massol <vm...@octo.com>.
ok, as no one is interested by the subject, I'll reply to my own question
....  :)
By looking at the source code, I have found a workaround to stop Tomcat 3.3
on a custom AJP12 port and with a ContextManager home different from
tomcat.home :

Instead of using "java -classpath tomcat.jar
org.apache.tomcat.....Main -stop ...."
use: "java -classpath stop-tomcat.jar org.apache.tomcat....StopTomcat -ajp12
<path to ajp file>"

I still find it strange that the behaviour changed as Tomcat 3.2.2 and
Tomcat 4.0 behave the same. Only 3.3 is different. I still don't know if it
is a bug or a feature ... :)

Thanks
-Vincent

----- Original Message -----
From: "Vincent Massol" <vm...@octo.com>
To: <to...@jakarta.apache.org>
Cc: "Pier P. Fumagalli" <pi...@betaversion.org>; <cr...@apache.org>; "Sam
Ruby" <ru...@us.ibm.com>
Sent: Sunday, August 05, 2001 9:24 PM
Subject: [repost] Re: Limitations in using a different Ajp port than the
standard ? (WAS Re: SAAAAAAAM! :))


> Hi,
> I would like to use different ports than the standard Tomcat ones. For the
> HTTP listener, it works fine. However I am having trouble for the Ajp
> listener which is used to stop tomcat. The issue is the following :
> * When I start Tomcat I use my own server.xml file which is located in my
> own directory (I start Tomcat using the -config switch). In server.xml I
> also set the ContextManager home to be my own directory. So Tomcat
generates
> an ajp12.id file in _that_ directory (and not into Tomcat home directory,
> which is normal and fine). The tomcat home directory is set to be the
> directory where I have installed Tomcat.
> * No, when I want to stop Tomcat, it seems Tomcat looks for an ajp12.id
file
> but in the ${tomcat.home}/conf and _not_ in the directory defined in the
> ContextManager home or where my server.xml file is.
>
> In other words, it seems it is not possible to start 2 instances of Tomcat
> and only stop one running instance (the one with the different ajp port)
by
> using only one Tomcat installation ?
>
> Is that a bug, a feature or have I forgotten something ?
>
> Please note that it only fails on Tomcat 3.3 (I have tried it on 3.3-b1
and
> on the nighlty build of 2/8/2001). It works fine on Tomcat 3.2.1 and on
> Tomcat 4.0.
>
> Find below my start, stop scripts and relevant portion of server.xml
>
> Thanks a lot.
> -Vincent
>
> ---- start script -------
>
>     <target name="start_tomcat_33">
>
>         <java classname="org.apache.tomcat.startup.Main" fork="yes">
>             <jvmarg value="-Dtomcat.home=${tomcat.home.33}"/>
>             <arg value="-config"/>
>             <arg value="${out.tomcat33.full.dir}/conf/server.xml"/>
>             <classpath>
>                 <pathelement location="${java.home}/../lib/tools.jar"/>
>                 <fileset dir="${tomcat.home.33}/lib">
>                     <include name="tomcat.jar"/>
>                 </fileset>
>             </classpath>
>         </java>
>
>     </target>
>
> ---- stop script -------
>
>     <target name="stop_tomcat_33">
>
>         <java classname="org.apache.tomcat.startup.Main" fork="yes">
>             <jvmarg value="-Dtomcat.home=${tomcat.home.33}"/>
>             <arg value="-stop"/>
>             <arg value="-config"/>
>             <arg value="${out.tomcat33.full.dir}/conf/server.xml"/>
>             <classpath>
>                 <pathelement location="${java.home}/../lib/tools.jar"/>
>                 <fileset dir="${tomcat.home.33}/lib">
>                     <include name="tomcat.jar"/>
>                 </fileset>
>             </classpath>
>         </java>
>
>     </target>
>
> ---- server.xml --------
>
> [...]
>         <RequestInterceptor
>          className="org.apache.tomcat.modules.server.Ajp12Interceptor"
>          tomcatAuthentication="false"
>          port="8777" />
>
>
>
>
> ----- Original Message -----
> From: "Sam Ruby" <ru...@us.ibm.com>
> To: "Pier P. Fumagalli" <pi...@betaversion.org>
> Cc: "Vincent Massol" <vm...@octo.com>
> Sent: Thursday, August 02, 2001 2:27 AM
> Subject: Re: SAAAAAAAM! :)
>
>
> > Vincent, can you take a look at changing the port numbers from 8080 to
> > something unique?  Preferably, something controlable via a property?
> >
> > Pier - I was doing a test build of some changes to cactus...sorry.
> >
> > - Sam Ruby
> >
> >
> > "Pier P. Fumagalli" <pi...@betaversion.org> on 08/01/2001 09:23:49 PM
> >
> > To:   Sam Ruby/Raleigh/IBM@IBMUS
> > cc:
> > Subject:  SAAAAAAAM! :)
> >
> >
> >
> > What's going on on Nagoya and Tomcat 4.0? Huh? :)
> > You little brat binding to my network ports and giving me BindExceptions
> :)
> > Can you remove the config for the WARP connector from your TC4
> > configuration?
> > Cheers :)
> >
> >     Pier
> >
> >
> >
> >
>
>
>
>