You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thomas Manson <de...@gmail.com> on 2008/10/18 18:54:14 UTC

Timeout while stopping tomcat

 Hi,

  I've installed tomcat 6.0.18 on my ubuntu box (hardy heron server).
  I've set the CATALINA_BASE in another place that the tomcat install. I
didn't modify any configuration files.

  Tomcat starts correctly, but a timeout occurs when stopping (see logs at
the end of the mail).

I'm using the following command to start/stop tomcat

sudo service tomcat start;
sudo service tomcat stop;

the /etc/init.d script is

# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
JAVA_HOME=/usr/lib/jvm/java-6-sun;         export JAVA_HOME
JAVA_OPTS="-server -Xms100m -Xmx512m";     export JAVA_OPTS
CATALINA_HOME=/usr/local/tomcat;           export CATALINA_HOME
CATALINA_BASE=/home/special/tomcat;        export CATALINA_BASE

case $1 in
  start)
        sh $CATALINA_HOME/bin/startup.sh
        ;;
  stop)
        sh $CATALINA_HOME/bin/shutdown.sh
        ;;
  restart)
        sh $CATALINA_HOME/bin/shutdown.sh
        sh $CATALINA_HOME/bin/startup.sh
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart}"
        exit 1
esac
exit 0

thomas@home:/etc/init.d$ ll /home/special/tomcat
total 28
drwxr-xr-x 7 root   root   4096 2008-10-18 17:51 .
drwxr-xr-x 4 thomas thomas 4096 2008-10-18 17:50 ..
drwxr-xr-x 2 root   root   4096 2008-10-18 18:34 conf
drwxr-xr-x 2 root   root   4096 2008-10-18 18:34 logs
drwxr-xr-x 2 root   root   4096 2008-10-18 17:51 temp
drwxr-xr-x 2 root   root   4096 2008-10-18 17:56 webapps
drwxr-xr-x 2 root   root   4096 2008-10-18 17:51 work

thomas@home:/etc/init.d$ ll /usr/local/tomcat/
total 96
drwxr-xr-x  9 thomas thomas  4096 2008-07-22 02:01 .
drwxr-xr-x 11 root   root    4096 2008-10-18 15:29 ..
drwxr-xr-x  3 thomas thomas  4096 2008-10-18 18:31 bin
drwxr-xr-x  2 thomas thomas  4096 2008-10-18 18:25 conf
drwxr-xr-x  2 thomas thomas  4096 2008-07-22 02:01 lib
-rw-r--r--  1 thomas thomas 37950 2008-07-22 02:01 LICENSE
drwxr-xr-x  2 thomas thomas  4096 2008-10-18 18:28 logs
-rw-r--r--  1 thomas thomas   556 2008-07-22 02:01 NOTICE
-rw-r--r--  1 thomas thomas  7317 2008-07-22 02:01 RELEASE-NOTES
-rw-r--r--  1 thomas thomas  6587 2008-07-22 02:01 RUNNING.txt
drwxr-xr-x  2 thomas thomas  4096 2008-07-22 02:01 temp
drwxr-xr-x  7 thomas thomas  4096 2008-07-22 02:01 webapps
drwxr-xr-x  3 thomas thomas  4096 2008-10-18 18:25 work
Here is the log :

thomas@home:/home/special/tomcat/logs$ sudo service tomcat start; tail -f
catalina.out
Using CATALINA_BASE:   /home/special/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /home/special/tomcat/temp
Using JRE_HOME:       /usr/lib/jvm/java-6-sun
Oct 18, 2008 6:34:52 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/lib/jvm/java-6-sun-1.6.0.07/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.07/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.07/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib
Oct 18, 2008 6:34:52 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 18, 2008 6:34:52 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 699 ms
Oct 18, 2008 6:34:52 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 18, 2008 6:34:52 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Oct 18, 2008 6:34:52 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 18, 2008 6:34:52 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 18, 2008 6:34:52 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/53  config=null
Oct 18, 2008 6:34:52 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 168 ms
Oct 18, 2008 6:35:19 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Oct 18, 2008 6:38:28 PM org.apache.catalina.connector.Connector pause
SEVERE: Protocol handler pause failed
java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:209)
        at
org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486)
        at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283)
        at org.apache.jk.server.JkMain.pause(JkMain.java:681)
        at
org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
        at
org.apache.catalina.connector.Connector.pause(Connector.java:1073)
        at
org.apache.catalina.core.StandardService.stop(StandardService.java:563)
        at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:603)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Oct 18, 2008 6:38:29 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 18, 2008 6:38:29 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080

Any idea of what's wrong ?

Thomas

RE: Timeout while stopping tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Thomas Manson [mailto:dev.mansonthomas@gmail.com]
> Subject: Re: Timeout while stopping tomcat
>
> I want a Apache 2 server to use PHP app's too with tomcat
> apps using port 80.
>
> I think that's the only way of doing, isn't it ?

Strictly speaking, it's not the only way, but it's certainly the most common.  There are mechanisms for running PHP directly, such as the one recently described here:
http://netwolfuk.wordpress.com/2008/09/03/php-and-mysql-in-tomcat-with-quercus/

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Timeout while stopping tomcat

Posted by Thomas Manson <de...@gmail.com>.
Thanks Charles,

I want a Apache 2 server to use PHP app's too with tomcat apps using port
80.

I think that's the only way of doing, isn't it ?

Thomas

On Sat, Oct 18, 2008 at 19:44, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Thomas Manson [mailto:dev.mansonthomas@gmail.com]
> > Subject: Re: Timeout while stopping tomcat
> >
> > If I want to build an link between my Apache2  and Tomcat 6,
> > will I need the AJP connector ?
>
> Yes.
>
> > Also, which [ModJK/JK/JK2 or else] project is the correct to
> > use with Tomcat 6 ?
>
> The mod_jk2 package has been deprecated for several years, so don't even
> think about that.  The mod_jk package is the current one; documentation is
> here:
> http://tomcat.apache.org/connectors-doc/
>
> Unless you have a real need for putting httpd in front of Tomcat (and
> serving static content doesn't qualify), you're better off without it from
> both performance and maintainability aspects.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Timeout while stopping tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Thomas Manson [mailto:dev.mansonthomas@gmail.com]
> Subject: Re: Timeout while stopping tomcat
>
> If I want to build an link between my Apache2  and Tomcat 6,
> will I need the AJP connector ?

Yes.

> Also, which [ModJK/JK/JK2 or else] project is the correct to
> use with Tomcat 6 ?

The mod_jk2 package has been deprecated for several years, so don't even think about that.  The mod_jk package is the current one; documentation is here:
http://tomcat.apache.org/connectors-doc/

Unless you have a real need for putting httpd in front of Tomcat (and serving static content doesn't qualify), you're better off without it from both performance and maintainability aspects.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Timeout while stopping tomcat

Posted by Thomas Manson <de...@gmail.com>.
Ok,

 If I want to build an link between my Apache2  and Tomcat 6, will I need
the AJP connector ?
 I don't know this part very well dispite I've use it some times.

 Also, which [ModJK/JK/JK2 or else] project is the correct to use with
Tomcat 6 ?

Thanks for your help,
Thomas.

On Sat, Oct 18, 2008 at 19:33, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Thomas Manson [mailto:dev.mansonthomas@gmail.com]
> > Subject: Timeout while stopping tomcat
> >
> > Tomcat starts correctly, but a timeout occurs when stopping
> > Any idea of what's wrong ?
>
> Nothing's really wrong, but you can get rid of the error message by
> commenting out the AJP connector that you're not using.  Turn off the
> <Connector> element for port 8009 in conf/server.xml.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Timeout while stopping tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Thomas Manson [mailto:dev.mansonthomas@gmail.com]
> Subject: Timeout while stopping tomcat
>
> Tomcat starts correctly, but a timeout occurs when stopping
> Any idea of what's wrong ?

Nothing's really wrong, but you can get rid of the error message by commenting out the AJP connector that you're not using.  Turn off the <Connector> element for port 8009 in conf/server.xml.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org