Avoid WARNING messages when shutting down the Tomcat container

Description

See: https://groups.google.com/forum/#!topic/codehaus-cargo/_mSXPKM7P_o

The following log statement is logged (twice?) when stopping (or restarting) Tomcat 8.x using Cargo:

1 WARN [org.apache.catalina.core.StandardServer] [] StandardServer.await: Invalid command '' received

Erik 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.

Status

Assignee

S. Ali Tokmen

Reporter

S. Ali Tokmen

Components

Fix versions

Affects versions

1.4.15

Priority

Major