You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Deidra Powell <de...@interpath.net> on 2001/04/06 23:01:06 UTC

prob with shutdown script



I was trying to get tomcat going and I too am having trouble with the
stop script.  I looked in your archives, but see nothing on how to fix
it.  Well, except for one on ajp12 in front of connection name which is
not helping.

Can you help me?  What is missing or wrong?  Below is there sequence of
errors:

thanks!
==============================================================

Stop tomcat
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.socketConnect(Compiled Code)
        at java.net.PlainSocketImpl.doConnect(Compiled Code)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
        at java.net.Socket.<init>(Socket.java:269)
        at java.net.Socket.<init>(Socket.java:98)
        at org.apache.tomcat.startup.Tomcat.stopTomcat(Compiled Code)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:130)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
=============================================================

--
Deidrad


Re: prob with shutdown script

Posted by Deidra Powell <de...@interpath.net>.
Benoit,

Thank you.  That worked.  I appreciate the help!

D

Benoit Jacquemont wrote:

>  The reason why you can'a shutdown your tomcat is because you remove the
> ajp12 connector description in your server.xml file.
> Ajp12 is used to connect to tomcat and to shutdown it. Additionnaly, it also
> used to connect to Apache, but even if you don't use Apache you have to have
> an ajp12 connector. Try to add ths lines in your server.xml file just before
> the first connector:
>
>         <!-- Apache AJP12 support. This is also used to shut down tomcat.
>           -->
>         <Connector className="org.apache.tomcat.service.PoolTcpConnector">
>             <Parameter name="handler"
>        value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
>             <Parameter name="port" value="8007"/>
>         </Connector>
>
> You can change the port value if this one is already in use.
>
> Benoit

RE: prob with shutdown script

Posted by Benoit Jacquemont <be...@smile.fr>.
 The reason why you can'a shutdown your tomcat is because you remove the
ajp12 connector description in your server.xml file.
Ajp12 is used to connect to tomcat and to shutdown it. Additionnaly, it also
used to connect to Apache, but even if you don't use Apache you have to have
an ajp12 connector. Try to add ths lines in your server.xml file just before
the first connector:


        <!-- Apache AJP12 support. This is also used to shut down tomcat.
          -->
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
       value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="8007"/>
        </Connector>

You can change the port value if this one is already in use.

Benoit

> I'm sure it is probably a newbie problem!  Your help is
> appreciated though!  I
> looked it up in the archive but didn't see a clear answer.
>
> thanks again - d
>
> beg file
> --------------------------------------------------------------
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <Server>
>     <!-- Debug low-level events in XmlMapper startup -->
>     <xmlmapper:debug level="0" />
>
>     <!-- This is quite flexible; we can either have a log file per
>          module in Tomcat (example: ContextManager) or we can have
>          one for Servlets and one for Jasper, or we can just have
>          one tomcat.log for both Servlet and Jasper.
>
>          If you omit "path" there, then stderr should be used.
>
>          verbosityLevel values can be:
>             FATAL
>             ERROR
>             WARNING
>             INFORMATION
>             DEBUG
>          -->
>
>     <Logger name="tc_log"
>             path="logs/tomcat.log"
>             customOutput="yes" />
>
>     <Logger name="servlet_log"
>             path="logs/servlet.log"
>             customOutput="yes" />
>
>     <Logger name="JASPER_LOG"
>             path="logs/jasper.log"
>             verbosityLevel = "INFORMATION" />
>
>     <!-- Add "home" attribute if you want tomcat to be based
> on a different
> directory
>          "home" is used to create work and to read webapps,
> but not for libs or
> CLASSPATH.
>          Note that TOMCAT_HOME is where tomcat is installed, while
> ContextManager home is the
>          base directory for contexts, webapps/ and work/
>       -->
>     <ContextManager debug="0" workDir="work" >
>         <!-- ContextInterceptor
> className="org.apache.tomcat.context.LogEvents"
> / -->
>         <ContextInterceptor
> className="org.apache.tomcat.context.AutoSetup" />
>         <ContextInterceptor
> className="org.apache.tomcat.context.DefaultCMSetter" />
>         <ContextInterceptor
> className="org.apache.tomcat.context.WorkDirInterceptor" />
>         <ContextInterceptor
> className="org.apache.tomcat.context.WebXmlReader"
> />
>         <ContextInterceptor
> className="org.apache.tomcat.context.LoadOnStartupInterceptor" />
>         <!-- Request processing -->
>         <RequestInterceptor
> className="org.apache.tomcat.request.SimpleMapper"
> debug="0" />
>         <RequestInterceptor
> className="org.apache.tomcat.request.SessionInterceptor" />
>         <RequestInterceptor
> className="org.apache.tomcat.request.SecurityCheck"
> />
>         <RequestInterceptor
> className="org.apache.tomcat.request.FixHeaders" />
>
>         <Connector
> className="org.apache.tomcat.service.SimpleTcpConnector">
>             <Parameter name="handler"
> value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
>             <Parameter name="port" value="15000"/>
>         </Connector>
>
>         <!-- entry for dev CDS installation -->
>         <Context path="/devJSP"
> docBase="/local/apps/tomcat,v3.1.1/jakarta-tomcat/webapps/devJ
> SP" debug="0"
> reloadabl
> e="true" >
>         </Context>
>
>         <!-- example - how to override AutoSetup actions -->
>         <Context path="/examples" docBase="webapps/examples" debug="0"
> reloadable="true" >
>         </Context>
>         <!-- example - how to override AutoSetup actions -->
>         <Context path="" docBase="webapps/ROOT" debug="0"
> reloadable="true" >
>         </Context>
>
>         <Context path="/test" docBase="webapps/test"
> debug="0" reloadable="true"
> >
>         </Context>
>
>     </ContextManager>
> </Server>
> end file
> --------------------------------------------------------------
> -----------------
>
> Benoit Jacquemont wrote:
>
> > Hi,
> >
> > Send us your server.xml file to check up. The more
> information you can give,
> > the sooner you're problem will be solved. For the moment,
> it looks like a
> > missing ajp12 listener.
> >
> > Benoit
> >
> > > I'm just starting with tomcat install and config.  I sent
> > > this on Friday.
> > > Would greatly appreciate any help for those that have gotten
> > > past this.
> > > I'm on Solaris 2.6, tomcat 3.1.1.
> > >
> > > thanks!
> > >
> > > Deidra Powell wrote:
> > >
> > > > I was trying to get tomcat going and I too am having
> > > trouble with the
> > > > stop script.  I looked in your archives, but see nothing on
> > > how to fix
> > > > it.  Well, except for one on ajp12 in front of connection
> > > name which is
> > > > not helping.
> > > >
> > > > Can you help me?  What is missing or wrong?  Below is there
> > > sequence of
> > > > errors:
> > > >
> > > > thanks!
> > > > ==============================================================
> > > >
> > > > Stop tomcat
> > > > java.net.ConnectException: Connection refused
> > > >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> > > >         at java.net.PlainSocketImpl.socketConnect(Compiled Code)
> > > >         at java.net.PlainSocketImpl.doConnect(Compiled Code)
> > > >         at
> > > >
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
> > > >         at
> > > java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
> > > >         at java.net.Socket.<init>(Socket.java:269)
> > > >         at java.net.Socket.<init>(Socket.java:98)
> > > >         at
> > > org.apache.tomcat.startup.Tomcat.stopTomcat(Compiled Code)
> > > >         at
> org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:130)
> > > >         at
> org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
> > > > =============================================================
> > > >
> > > > --
> > > > Deidra
> > >
> > >
> > >
> > >
>
>
>
>


Re: prob with shutdown script

Posted by Deidra Powell <de...@interpath.net>.
I'm sure it is probably a newbie problem!  Your help is appreciated though!  I
looked it up in the archive but didn't see a clear answer.

thanks again - d

beg file --------------------------------------------------------------

<?xml version="1.0" encoding="ISO-8859-1"?>

<Server>
    <!-- Debug low-level events in XmlMapper startup -->
    <xmlmapper:debug level="0" />

    <!-- This is quite flexible; we can either have a log file per
         module in Tomcat (example: ContextManager) or we can have
         one for Servlets and one for Jasper, or we can just have
         one tomcat.log for both Servlet and Jasper.

         If you omit "path" there, then stderr should be used.

         verbosityLevel values can be:
            FATAL
            ERROR
            WARNING
            INFORMATION
            DEBUG
         -->

    <Logger name="tc_log"
            path="logs/tomcat.log"
            customOutput="yes" />

    <Logger name="servlet_log"
            path="logs/servlet.log"
            customOutput="yes" />

    <Logger name="JASPER_LOG"
            path="logs/jasper.log"
            verbosityLevel = "INFORMATION" />

    <!-- Add "home" attribute if you want tomcat to be based on a different
directory
         "home" is used to create work and to read webapps, but not for libs or
CLASSPATH.
         Note that TOMCAT_HOME is where tomcat is installed, while
ContextManager home is the
         base directory for contexts, webapps/ and work/
      -->
    <ContextManager debug="0" workDir="work" >
        <!-- ContextInterceptor className="org.apache.tomcat.context.LogEvents"
/ -->
        <ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />
        <ContextInterceptor
className="org.apache.tomcat.context.DefaultCMSetter" />
        <ContextInterceptor
className="org.apache.tomcat.context.WorkDirInterceptor" />
        <ContextInterceptor className="org.apache.tomcat.context.WebXmlReader"
/>
        <ContextInterceptor
className="org.apache.tomcat.context.LoadOnStartupInterceptor" />
        <!-- Request processing -->
        <RequestInterceptor className="org.apache.tomcat.request.SimpleMapper"
debug="0" />
        <RequestInterceptor
className="org.apache.tomcat.request.SessionInterceptor" />
        <RequestInterceptor className="org.apache.tomcat.request.SecurityCheck"
/>
        <RequestInterceptor className="org.apache.tomcat.request.FixHeaders" />

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler"
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
            <Parameter name="port" value="15000"/>
        </Connector>

        <!-- entry for dev CDS installation -->
        <Context path="/devJSP"
docBase="/local/apps/tomcat,v3.1.1/jakarta-tomcat/webapps/devJSP" debug="0"
reloadabl
e="true" >
        </Context>

        <!-- example - how to override AutoSetup actions -->
        <Context path="/examples" docBase="webapps/examples" debug="0"
reloadable="true" >
        </Context>
        <!-- example - how to override AutoSetup actions -->
        <Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" >
        </Context>

        <Context path="/test" docBase="webapps/test" debug="0" reloadable="true"
>
        </Context>

    </ContextManager>
</Server>
end file
-------------------------------------------------------------------------------

Benoit Jacquemont wrote:

> Hi,
>
> Send us your server.xml file to check up. The more information you can give,
> the sooner you're problem will be solved. For the moment, it looks like a
> missing ajp12 listener.
>
> Benoit
>
> > I'm just starting with tomcat install and config.  I sent
> > this on Friday.
> > Would greatly appreciate any help for those that have gotten
> > past this.
> > I'm on Solaris 2.6, tomcat 3.1.1.
> >
> > thanks!
> >
> > Deidra Powell wrote:
> >
> > > I was trying to get tomcat going and I too am having
> > trouble with the
> > > stop script.  I looked in your archives, but see nothing on
> > how to fix
> > > it.  Well, except for one on ajp12 in front of connection
> > name which is
> > > not helping.
> > >
> > > Can you help me?  What is missing or wrong?  Below is there
> > sequence of
> > > errors:
> > >
> > > thanks!
> > > ==============================================================
> > >
> > > Stop tomcat
> > > java.net.ConnectException: Connection refused
> > >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> > >         at java.net.PlainSocketImpl.socketConnect(Compiled Code)
> > >         at java.net.PlainSocketImpl.doConnect(Compiled Code)
> > >         at
> > > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
> > >         at
> > java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
> > >         at java.net.Socket.<init>(Socket.java:269)
> > >         at java.net.Socket.<init>(Socket.java:98)
> > >         at
> > org.apache.tomcat.startup.Tomcat.stopTomcat(Compiled Code)
> > >         at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:130)
> > >         at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
> > > =============================================================
> > >
> > > --
> > > Deidra
> >
> >
> >
> >



RE: prob with shutdown script

Posted by Benoit Jacquemont <be...@smile.fr>.
Hi,

Send us your server.xml file to check up. The more information you can give,
the sooner you're problem will be solved. For the moment, it looks like a
missing ajp12 listener.

Benoit

> I'm just starting with tomcat install and config.  I sent
> this on Friday.
> Would greatly appreciate any help for those that have gotten
> past this.
> I'm on Solaris 2.6, tomcat 3.1.1.
>
> thanks!
>
> Deidra Powell wrote:
>
> > I was trying to get tomcat going and I too am having
> trouble with the
> > stop script.  I looked in your archives, but see nothing on
> how to fix
> > it.  Well, except for one on ajp12 in front of connection
> name which is
> > not helping.
> >
> > Can you help me?  What is missing or wrong?  Below is there
> sequence of
> > errors:
> >
> > thanks!
> > ==============================================================
> >
> > Stop tomcat
> > java.net.ConnectException: Connection refused
> >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> >         at java.net.PlainSocketImpl.socketConnect(Compiled Code)
> >         at java.net.PlainSocketImpl.doConnect(Compiled Code)
> >         at
> > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
> >         at
> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
> >         at java.net.Socket.<init>(Socket.java:269)
> >         at java.net.Socket.<init>(Socket.java:98)
> >         at
> org.apache.tomcat.startup.Tomcat.stopTomcat(Compiled Code)
> >         at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:130)
> >         at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
> > =============================================================
> >
> > --
> > Deidra
>
>
>
>


Re: prob with shutdown script

Posted by Deidra Powell <de...@interpath.net>.
I'm just starting with tomcat install and config.  I sent this on Friday.
Would greatly appreciate any help for those that have gotten past this.
I'm on Solaris 2.6, tomcat 3.1.1.

thanks!

Deidra Powell wrote:

> I was trying to get tomcat going and I too am having trouble with the
> stop script.  I looked in your archives, but see nothing on how to fix
> it.  Well, except for one on ajp12 in front of connection name which is
> not helping.
>
> Can you help me?  What is missing or wrong?  Below is there sequence of
> errors:
>
> thanks!
> ==============================================================
>
> Stop tomcat
> java.net.ConnectException: Connection refused
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.socketConnect(Compiled Code)
>         at java.net.PlainSocketImpl.doConnect(Compiled Code)
>         at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
>         at java.net.Socket.<init>(Socket.java:269)
>         at java.net.Socket.<init>(Socket.java:98)
>         at org.apache.tomcat.startup.Tomcat.stopTomcat(Compiled Code)
>         at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:130)
>         at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
> =============================================================
>
> --
> Deidra



Re: Problem with mod_jk build

Posted by Scott Tatum <sc...@wcom.com>.
Do you have these lines, either in mod_jk.conf or httpd.conf

LoadModule jk_module          libexec/mod_jk.so
AddModule mod_jk.c

You shouldn't be able to start Apache without them. You should get unknown
directive errors. Make sure those are in there somewhere (I recommend putting
them in httpd.conf along with all the other module loads).

Also I recommend copying mod_jk.conf-auto to mod_jk.conf, and including that
file from httpd.conf.

What kind of errors are you getting on Apache startup?

-Scott
--
Scott Tatum | scott.tatum@wcom.com
Senior Applications Developer, Special Projects
WorldCom | http://www.wcom.com/

Brandon Cruz wrote:

> Quick question...
> If I have a binary version of mod_jk.so, do I have to build it?  It said it
> is already built for Linux, but I can't get apache to start when I put that
> into apache's libexec directory and include the mod_jk.conf-auto.  What am I
> doing wrong?  I have tried to build mod_jk, but get all kinds of errors
> telling me that files do not exist.
>
> Brandon Cruz


Re: Problem with mod_jk build

Posted by Jeff Kilbride <je...@kilbride.com>.
Hi Brandon,

First of all, did you download the *source* distribution for Jakarta? In
order to compile your own mod_jk.so, you need the source distribution --
jakarta-tomcat-3.2.1-src.tar.gz.

When you have the source untarred, cd into the source directory and then to:

src/native/apache1.3/

In there you will find Makefiles for different systems. Rename the correct
one for your system from Makefile.system to just Makefile. Then run the
command 'make' in that directory. If everything is ok, mod-jk.so will be
made for you in that directory. Copy it to your apache/libexec and update
your httpd.conf (or include mod_jk.conf into your httpd.conf...)

It's pretty easy and it worked for me the first time.

Thanks,
--jeff

----- Original Message -----
From: "Brandon Cruz" <bc...@norvax.com>
To: <to...@jakarta.apache.org>
Sent: Friday, April 06, 2001 5:11 PM
Subject: RE: Problem with mod_jk build


>
> I really need some help quick!!!  When it is telling me to use this
command
> to build mod_jk...
>
> apxs -o
>
mod_jk.so -I../jk -I/usr/local/jdk/include -I/usr/local/jdk/include/linux -c
> *.c ../jk/*.c
>
> Does that mean that I need to substitute something in for the *.c?  It
keeps
> telling me that  gcc: *.c no such file or directory
>
> If anyone knows what is going on, please help, I am very frustrated with
> this, have been working on it for 2 days.
>
> Thank you!
>
> Brandon Cruz
>
> -----Original Message-----
> From: Brandon Cruz [mailto:bcruz@norvax.com]
> Sent: Friday, April 06, 2001 4:39 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Problem with mod_jk build
>
>
>
>
>
> Quick question...
> If I have a binary version of mod_jk.so, do I have to build it?  It said
it
> is already built for Linux, but I can't get apache to start when I put
that
> into apache's libexec directory and include the mod_jk.conf-auto.  What am
I
> doing wrong?  I have tried to build mod_jk, but get all kinds of errors
> telling me that files do not exist.
>
> Brandon Cruz
>
>
>


RE: Problem with mod_jk build

Posted by Brandon Cruz <bc...@norvax.com>.
I really need some help quick!!!  When it is telling me to use this command
to build mod_jk...

apxs -o
mod_jk.so -I../jk -I/usr/local/jdk/include -I/usr/local/jdk/include/linux -c
*.c ../jk/*.c

Does that mean that I need to substitute something in for the *.c?  It keeps
telling me that  gcc: *.c no such file or directory

If anyone knows what is going on, please help, I am very frustrated with
this, have been working on it for 2 days.

Thank you!

Brandon Cruz

-----Original Message-----
From: Brandon Cruz [mailto:bcruz@norvax.com]
Sent: Friday, April 06, 2001 4:39 PM
To: tomcat-user@jakarta.apache.org
Subject: Problem with mod_jk build





Quick question...
If I have a binary version of mod_jk.so, do I have to build it?  It said it
is already built for Linux, but I can't get apache to start when I put that
into apache's libexec directory and include the mod_jk.conf-auto.  What am I
doing wrong?  I have tried to build mod_jk, but get all kinds of errors
telling me that files do not exist.

Brandon Cruz




Problem with mod_jk build

Posted by Brandon Cruz <bc...@norvax.com>.


Quick question...
If I have a binary version of mod_jk.so, do I have to build it?  It said it
is already built for Linux, but I can't get apache to start when I put that
into apache's libexec directory and include the mod_jk.conf-auto.  What am I
doing wrong?  I have tried to build mod_jk, but get all kinds of errors
telling me that files do not exist.

Brandon Cruz



RE: prob with shutdown script

Posted by Brandon Cruz <bc...@norvax.com>.
Quick question...
If I have a binary version of mod_jk.so, do I have to build it?  It said it
is already built for Linux, but I can't get apache to start when I put that
into apache's libexec directory and include the mod_jk.conf-auto.  What am I
doing wrong?  I have tried to build mod_jk, but get all kinds of errors
telling me that files do not exist.

Brandon Cruz