java -Dcatalina.home=[...] -Dcatalina.base=[...] -Djava.io.tmpdir=[...] -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=[...]/catalina-base/conf/logging.properties -classpath [...]/bin/tomcat-juli.jar:[...]/bin/bootstrap.jar:[...]/tools.jar org.apache.catalina.startup.Bootstrap stop... and the answer from Tomcat:
Aug 21, 2015 3:24:10 PM org.apache.catalina.core.StandardServer awaitShould it then be "shutdown" instead of "stop"? Or is it something else?
WARNING: StandardServer.await: Invalid command '' received
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/cce494bd-30b2-498c-8877-f66d3039ac18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
Thank you for your feedback. I have absolutely no idea what is going on here.
I tested with a vanilla download of Tomcat 8.x (tested both 8.0.24 and 8.0.26), and the command sent by Cargo is more or less the same as the command resulting from running shutdown.bat/shutdown.sh in Tomcat. There are some minor differences, but I cannot understand how these can explain this very strange behavior:
1) The classpath is a bit different: [..]\bin\bootstrap.jar:[..]\bin\tomcat-juli.jar (with Tomcat). Different order of the jar-files, and tools.jar is not included.
2) Tomcat supplies an extra system property: '-Djava.endorsed.dirs="[..]\endorsed', but in the vanilla download this folder does not even exist, so I am quite sure this does not matter
When you invoke shutdown.bat/shutdown.sh Tomcat replies (in the server log):
25-Aug-2015 18:01:42.427 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
and after that Tomcat shuts down cleanly.
To answer your question, it seems like the command sent by Cargo is (more or less) correct. There must be something strange going on....
To dig more into this, I think we have to debug Tomcat when Cargo tries to shut it down. But I do not how to do that.
Any ideas?
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/55e61301-b582-4d44-940f-46a362a56b86%40googlegroups.com.
Hi,
Sorry for taking so long to get back to you. I finally managed to dig deeper into this strange issue.
First, the problem is not as serious as I first assumed. Cargo shuts down Tomcat cleanly. The only issue is annoying log messages generated by Tomcat when shut down by Cargo.
When I managed to debug the right stuff (the JVM where Cargo is running; not the container/Tomcat JVM), I found out that these annoying log messages (StandardServer.await: Invalid command '' received) originates from code in the method AbstractLocalContainer#waitForCompletion. In particular the following, and rather naive (but presumably harmless), line: https://github.com/codehaus-cargo/cargo/blob/master/core/api/container/src/main/java/org/codehaus/cargo/container/spi/AbstractLocalContainer.java#L361
The Tomcat shutdown port is in fact a property ending with ".port" (cargo.rmi.port), which makes Cargo issue a request to the shutdown port with no "command" (it just try to connect to port). This happens, even several times, before the correct shutdown command (issued by Cargo) is received and processed by Tomcat - which results in these annoying log messages.
What do you think? How hard would it be eventually fix this "bug"?
Regards,
Erik
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/3952205f-707c-4f72-bed9-ec0033f5ac28%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/23ff1713-6511-4f0b-9d09-9e1265a9f316%40googlegroups.com.