You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Frederick Ouimet <fo...@gmail.com> on 2011/07/19 19:43:38 UTC

Invalid command 'SHUTDOW' received

Hi!

I'm having problems shutting down Tomcat on my Windows 7 Home Premium
laptop. I tried Tomcat 6.0.29, 6.0.32, 7.0.14, 7.0.16 and 7.0.19 (just
released today) and all give the same result. Basically, Tomcat starts fine,
either from the DOS command line (startup.bat) or from Eclipse. The problem
is when I shutdown (shutdown.bat) the server, I receive WARNING:
StandardServer.await: Invalid command 'SHUTDOW' received. This happens from
a default Tomcat installation (unzipped the package), no changes to the
server.xml file or any other files. Seems that there is something trimming
the last byte from the command. If I run the server in DOS, I can execute
shutdown.bat over and over again until the server catches the command
properly (See catalina log, the server responded on the 14th shutdown
command). It's intermittent too. Sometimes, the server responds properly on
the second or third shutdown but never on the first one.

I tried the following:
- changed the admin port (8005) to something else, 55551 for example, but
still gives the problem.
- I turned off my Avast (AntiVirus) resident shields and Comodo firewall to
no avail.
- Using Putty telnet, if I connect to port 8005 (or whatever I changed it
to) in raw mode and type SHUTDOWN, it works just fine.
- I used netstat -an | find "8005" and only see one process LISTENING
- Tried using JDK1.5.0_22 instead of JDK1.6.0_25 to no avail.
- Cleaned out event viewer and don't see any new entries appearing.

I tried the same tomcat releases on two different Windows XP desktops and a
Mac and there is no such problems. I'm thinking it has to do with Windows 7
or something else running on my laptop. Anyone else has this kind of problem
or could someone provide me with some tips on how I could solve this? I've
tried Geronimo-Jetty and Glassfish and don't have any problems shutting
those down.

Thanks for your help!

Fred.

--------------------------------------------------------------------------------
Catalina.log:

2-Jul-2011 9:41:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
2-Jul-2011 9:41:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].
2-Jul-2011 9:41:11 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
2-Jul-2011 9:41:11 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
2-Jul-2011 9:41:11 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1588 ms
2-Jul-2011 9:41:11 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
2-Jul-2011 9:41:11 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.16
2-Jul-2011 9:41:11 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory docs
2-Jul-2011 9:41:12 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory examples
2-Jul-2011 9:41:12 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory host-manager
2-Jul-2011 9:41:12 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory manager
2-Jul-2011 9:41:12 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory ROOT
2-Jul-2011 9:41:12 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
2-Jul-2011 9:41:12 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
2-Jul-2011 9:41:12 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 942 ms
2-Jul-2011 9:41:19 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:24 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:26 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:28 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:29 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:30 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:31 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:32 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:34 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:35 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:36 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:37 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:39 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
2-Jul-2011 9:41:40 PM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping
the Server instance.
2-Jul-2011 9:41:40 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-apr-8080"]
2-Jul-2011 9:41:41 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-apr-8009"]
2-Jul-2011 9:41:42 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
2-Jul-2011 9:41:42 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-apr-8080"]
2-Jul-2011 9:41:42 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-apr-8009"]
2-Jul-2011 9:41:42 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-apr-8080"]
2-Jul-2011 9:41:42 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-apr-8009"]

-- 
Frederick ouimet
fouimet@gmail.com

Re: Invalid command 'SHUTDOW' received

Posted by Frederick Ouimet <fo...@gmail.com>.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

Re: Invalid command 'SHUTDOW' received

Posted by André Warnier <aw...@ice-sa.com>.
Chris,

Christopher Schultz wrote:
...
> 
> How is it that you got a string of invalid ones, and then a valid one?
> 
I believe that this is the exact question which the OP was himself submitting...

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


Re: Invalid command 'SHUTDOW' received

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frederick,

On 7/19/2011 1:43 PM, Frederick Ouimet wrote:
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received

I would ask if that's a copy/paste error, but I can see you have many of
them in the log file:

> 2-Jul-2011 9:41:19 PM org.apache.catalina.core.StandardServer await 
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 
> 2-Jul-2011 9:41:24 PM org.apache.catalina.core.StandardServer await 
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 
> 2-Jul-2011 9:41:26 PM org.apache.catalina.core.StandardServer await 
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received

"SHUTDOW" is not the expected shutdown string in a default install (it
should be "SHUTDOWN" - note the final "N"). I can see that it eventually
works:

> 2-Jul-2011 9:41:39 PM org.apache.catalina.core.StandardServer await 
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 
> 2-Jul-2011 9:41:40 PM org.apache.catalina.core.StandardServer await 
> INFO: A valid shutdown command was received via the shutdown port.
> Stopping the Server instance.

How is it that you got a string of invalid ones, and then a valid one?

Are you using a default server.xml file, or have you modified it in any
way? You might want to post server.xml, minus anything sensitive
(passwords, etc.).

I don't use Tomcat on Windows but I believe that under all
configurations, Tomcat reads it's own server.xml to determine the
"shutdown" string to send to the local process, so everything should be
fine. Is it possible that you are using more than one server.xml file
and that one of them has shutdown="SHUTDOW" set.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4l36gACgkQ9CaO5/Lv0PDjBgCeJKivpXSE4lw7AVe5vG/eqRjH
6cIAoLSI2MF1QWUNm/XZNMjqwkZ+6v4G
=It8u
-----END PGP SIGNATURE-----

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


Re: Invalid command 'SHUTDOW' received

Posted by André Warnier <aw...@ice-sa.com>.
Frederick Ouimet wrote:

... (all noted, and thanks for the detailed info and the homework)

...

> --------------------------------------------------------------------------------
> Catalina.log:
> 
...

> 2-Jul-2011 9:41:12 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 942 ms
> 2-Jul-2011 9:41:19 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:24 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:26 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:28 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:29 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:30 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:31 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:32 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:34 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:35 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:36 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:37 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:39 PM org.apache.catalina.core.StandardServer await
> WARNING: StandardServer.await: Invalid command 'SHUTDOW' received
> 2-Jul-2011 9:41:40 PM org.apache.catalina.core.StandardServer await
> INFO: A valid shutdown command was received via the shutdown port. Stopping
> the Server instance.
...

Looking at the above log, I see that (apparently) Tomcat receives a succession of shutdown 
commands, at more or less 1 second interval.
How do you do that ?

(I am asking because as far as I understand what is happening, each invocation of a 
"shutdown.bat" starts a separate instance of a Java JVM, and at least a part of Tomcat 
within it.  Isn't the fact of starting those multiple JVMs in such a short time, on a 
Windows laptop, by itself a possible cause of the issue ?)

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


Re: Invalid command 'SHUTDOW' received

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/7/19 Frederick Ouimet <fo...@gmail.com>:
> - Tried using JDK1.5.0_22 instead of JDK1.6.0_25 to no avail.

1. Is your system 32-bit or 64-bit?  Do you use 64-bit JDK or 32-bit JDK?

2. What is language and default character set in your system?

3. I wonder what will happen if you edit shutdown command value in
your system.xml. Does it trim last character, any characters after 7th
one, or character 'N'  specifically?


Best regards,
Konstantin Kolinko

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