tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Kolinko" <>
Subject Re: Blocking port 8005 in TomCat in Deamon Mode
Date Thu, 10 Jul 2008 09:25:27 GMT
2008/7/10 Suma Rakesh <>:
>> Hi,
>> I am starting Tomcat through one of my C++ programs on
>> windows 2003 server. I am using Bootsrap
>> org.apache.catalina.startup.Bootstrap.main() method and
>> pass 'Start' and 'Stop' as arguments.
>> The documentation  read mentioned that this will start
>> tomcat in daemon mode. However, tomcat still listens on
>> port 8005 (another document mentioned that if started in
>> deamon mode Tomcat will not listen on port 8005)  and I am
>> able to send SHUTDOWN command on this porton local machine.
>> I am not able to do a telnet on port 8005 and send SHUTDOWN
>> command from remote machine though.
>> I would like to block accepting commands on 8005 from local
>> machine as well. Has anyone tried this out? Do you have any
>> pointers ?
>> Regards,
>> Suma.

Hi, Suma

1. You can disable listening on port 8005, by specifying port="-1" in
your server.xml,
but your "Stop" command passed to Bootstrap.main() will stop
working: the bootstrap will not be able to connect to the running
Tomcat instance to shutdown it.

I do not think that "start" and "stop" will run TC in daemon mode.

Supposedly the "startd", "stopd" commands will do
(as I see, looking into the sources of Bootstrap.main()),
if the both or your calls are made to the same JVM instance.

2. You may change 8005 to some other, non-standard, value.

3. You may change the shudown command in your server.xml, to
be some random secret string.

4. Tomcat binds 8005 port only to the localhost address. It does
not accept any connections from the outside.

5. You did not bother to mention what Tomcat version you are using.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message