|
Thanks for this, Pierce. I have only one copy of Tomcat installed on the system. The web application is fully started with jars attached at the time the 'end' is submitted. After ending, a NETSTAT *CNN indicates the Tomcat-associated ports are indeed shutdown. The Tomcat log indicates that all Web Applications are 'removed'. So, I guess the issue is that the JVM is not shutting down due to a programmatically spawned thread from the web application (and the still open port is indeed the port associated with the spawned thread). My programmatic thread is created as a daemon thread thus supposedly causing the JVM to shutdown when all other non-daemon threads (in this case, Tomcat threads) have died. To resolve this, I think I will need to program a shut down of the spawned thread thereby shutting down the JVM. Either that or discover some way of accurately identifying the QP0ZSPWT job that does not involve creating and running in a new subsystem. My sense now is that this is more of a Tomcat issue and so likely more appropriate for a Tomcat forum. Again, thanks for your help. Chris Jewell -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of PierceJ@xxxxxxxxxxxxxxxx Sent: Wednesday, October 26, 2005 8:45 AM To: Java Programming on and around the iSeries / AS400 Subject: Re: Unable to end the QP0ZSPWT job when shutting down Tomcat Sounds odd that the shutdown is not working. The only time I have seen the shutdown fail is when the shutdown script was picking up the wrong config (like you have more than a single Tomcat on a system) and trying to do a shutdown on the wrong port or you are trying to shutdown before the server is completely up and accepting requests. The second case typically happens when you are starting Tomcat for the first time and the system is attaching java programs to the .jar files. Can you tell what is going on from the tomcat logfiles? When the shutdown script runs, what does it say? I typically pass the os400.stderr and os400.stdout properties on the java calls to control where the logs are created. "Christopher J. Jewell" <jewellcj@jewellc To onsult.com> <java400-l@xxxxxxxxxxxx> Sent by: cc java400-l-bounces @midrange.com Subject Unable to end the QP0ZSPWT job when shutting down Tomcat 10/25/2005 02:26 PM Please respond to Java Programming on and around the iSeries / AS400 <java400-l@midran ge.com> Hopefully someone will be able to help with this issue: I have installed Tomcat standalone (i.e. not using ASFTomcat) and am having difficulty getting the spawned job QP0ZSPWT from ending when I end Tomcat. The start up script (startcatalina400.sh) does something like this: export -s QIBM_MULTI_THREADED=Y export -s JAVA_HOME=/QIBM/ProdData/Java400/jdk14 export -s CATALINA_HOME=$1 export -s CATALINA_BASE=$CATALINA_HOME CP=$CATALINA_HOME/bin/bootstrap.jar:/qibm/ProdData/Java400/jdk14/lib/tools.j ar:/qibm/ProdData/OS400/jt400/lib/jt400Native.jar export -s CLASSPATH=$CP java -ms256m -Duser.dir="$CATALINA_BASE" -Dcatalina.base="$CATALINA_BASE" -D catalina.home="$CATALINA_HOME" org.apache.catalina.startup.Bootstrap start This is executed using something like this in the CL: CHGVAR &QSHCMD VALUE('cd' |< &TOMCATPATH |< ';bin/startcatalina400.sh' |> &TOMCATPATH) SBMJOB CMD(STRQSH CMD(&QSHCMD)) JOB(TOMCATJOB) JOBD(QSYSWRK) When the web application runs, I get the following four jobs: TOMCATJOB QP0ZSPWP QP0ZSPWT QZSHSH My 'stop' tomcat' script (endcatalina400.sh) does something like the following: export QIBM_MULTI_THREADED=Y export -s CATALINA_HOME=$1 export -s CATALINA_BASE=$CATALINA_HOME CP=$CATALINA_HOME/bin/bootstrap.jar export -s CLASSPATH=$CP java -ms64m -Dcatalina.base="$CATALINA_BASE" -Dcatalina.home="$CATALINA_HOME " org.apache.catalina.startup.Bootstrap stop and this is executed as follows from the CL: CHGVAR &QSHCMD VALUE('cd' |< &TOMCATPATH |< ';bin/stopcatalina400.sh' |> &TOMCATPATH) SBMJOB CMD(STRQSH CMD(&QSHCMD)) JOB(ENDTOMCATJOB) JOBD(QSYSWRK) Right now, the 'stop script' is not stopping Tomcat. The above mentioned four jobs continue to run. If I end the submitted TOMCATJOB using ENDJOB, all jobs end except for QP0ZSPWT which appears to be running the JVM for Tomcat. There seems to be no way to be able to identify this job so that it can be ended from a program with ENDJOB, (other than by creating your own subsystem and setting this job as a prestart job in the subsystem and ending the entire subsystem, as suggested by the manual). (Unfortunately, the QP0ZSPWT job holds the Tomcat ports open and so any subsequent submission will conflict.) All thoughts appreciated. Chris Jewell -- This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l. -- This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.