tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Ong" <tk...@bass.com.my>
Subject Re: Problem in shutting down TOMCAT 4.0
Date Mon, 28 Jan 2002 01:36:30 GMT
thanks jeffrey, your solution works perfectly!!!!!!


----- Original Message -----
From: "PELOQUIN,JEFFREY (Non-HP-Boise,ex1)" <jeffrey_peloquin@non.hp.com>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
Sent: Friday, January 25, 2002 8:14 PM
Subject: RE: Problem in shutting down TOMCAT 4.0


> Jeff
>
> add these lines to the catalina.sh script as appropriate
>
>
> if [ -z "$CATALINA_OPTS" ] ; then
>   CATALINA_OPTS="-XdoCloseWithReadPending"
> fi
>
>
> the problem is the httpconnector running on 8080.  If you watch the
> catalina.log file (i think this is the right one) you will that when you
> start tomcat it creates a parent thread for the http connector and then a
> number of child threads. When you shut down tomcat the childs threads die
> but the parent thread never does.
>
> The -XdoCloseWithReadPending option to the HP-UX JVM will close a socket
> even while a read is pending and thus allow the parent http thread to die.
> I am guessing that the parent thread has a good hold on the socket.
>
>
> Also, something else to keep in mind the JVM will not exit until all
threads
> die.  We have one application whose that can take up to 3 mins to release
it
> database connection pool.  Even with the XdoCloseWithReadPending option we
> have to wait three mins between restarts.
>
> Hope this helps
>
> Jeffrey Peloquin
>
>
> -----Original Message-----
> From: Jeff Ong [mailto:tkong@bass.com.my]
> Sent: Thursday, January 24, 2002 8:42 PM
> To: Tomcat Users List
> Subject: Problem in shutting down TOMCAT 4.0
>
>
> Hi all,
>
> I have installed Apache 1.3.3 and TOMCAT 4.0.1 in HPUX 11, with following
> JDK version ...
> Java(TM) 2 Runtime Environment, Standard Edition (build
> 1.3.1.02-011206-02:17)
> Java HotSpot(TM) Server VM (build 1.3.1 1.3.1.02-JPSE_1.3.1.02_20011206
> PA1.1, mixed mode)
>
> ************** Initially when i start TOMCAT, it start without any problem
> and i can access it from http://localhost:8080. Below is the start up
> message shown **************
> # startup.sh
> Guessing CATALINA_HOME from catalina.sh to /appl1/j2ee/catalina/bin/..
> Setting CATALINA_HOME to /appl1/j2ee/catalina/bin/..
> Using CLASSPATH:
> /appl1/j2ee/catalina/bin/../bin/bootstrap.jar:/opt/java1.3/lib/tools.jar
> Using CATALINA_BASE: /appl1/j2ee/catalina/bin/..
> Using CATALINA_HOME: /appl1/j2ee/catalina/bin/..
> Using JAVA_HOME:     /opt/java1.3
>
> ************** So now i try to shut it down ************************
> # shutdown.sh
> Guessing CATALINA_HOME from catalina.sh to /appl1/j2ee/catalina/bin/..
> Setting CATALINA_HOME to /appl1/j2ee/catalina/bin/..
> Using CLASSPATH:
> /appl1/j2ee/catalina/bin/../bin/bootstrap.jar:/opt/java1.3/lib/tools.jar
> Using CATALINA_BASE: /appl1/j2ee/catalina/bin/..
> Using CATALINA_HOME: /appl1/j2ee/catalina/bin/..
> Using JAVA_HOME:     /opt/java1.3
>
> ************** Once again, i start the TOMCAT again ..... the result shown
> from command prompt is same as above ... no problem show . But when i
check
> the catalina.out ... i seen these message **************
>
> Catalina.start: LifecycleException:  Error creating server socket:
> java.net.BindException: Address already in use
> LifecycleException:  Error creating server socket:
java.net.BindException:
> Address already in use
>  at
>
org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConnector.ja
> va:483)
>  at
>
org.apache.catalina.core.StandardService.initialize(StandardService.java:454
> )
>  at
>
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:552)
>  at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
>  at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
>  at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>  at java.lang.reflect.Method.invoke(Native Method)
>  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
> ----- Root Cause -----
> java.net.BindException: Address already in use
>  at java.net.PlainSocketImpl.socketBind(Native Method)
>  at java.net.PlainSocketImpl.bind(Unknown Source)
>  at java.net.ServerSocket.<init>(Unknown Source)
>  at java.net.ServerSocket.<init>(Unknown Source)
>  at
>
org.apache.catalina.net.DefaultServerSocketFactory.createSocket(DefaultServe
> rSocketFactory.java:118)
>  at
>
org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConnector.ja
> va:477)
>  at
>
org.apache.catalina.core.StandardService.initialize(StandardService.java:454
> )
>  at
>
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:552)
>  at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
>  at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
>  at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>  at java.lang.reflect.Method.invoke(Native Method)
>  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
>
>
> First i was quite confuse because I tought i have shut down the TOMCAT
> successfully. So i tried to type this in command prompt ::
> #ps -ef | grep java
> root 18766     1  0 11:26:38 pts/tl    1:27
> /opt/java1.3/bin/../bin/PA_RISC/native_threads/java -classpa
>
> so now i type this ::
> #kill -9 18766
>
> After i have kill  above process, i can run the startup.sh and boot TOMCAT
> successfully.
>
> So from now on, i have to kill the process manually in order to completely
> shutdown TOMCAT. shutdown.sh cannot kill the process for me.
>
> How can solve the problem? it so troublesm for me to shutdown TOMCAT if i
> have to repeat these steps everytime.
>
>
>
>
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message