Hi,

Thanks for your responses. 

Apparently startd and stopd did not work for me. My TC version is 4.1. 

I will probably change the shutdown command in server.xml to a random string.

Thanks,
Suma.

--- On Thu, 7/10/08, Konstantin Kolinko <[EMAIL PROTECTED]> wrote:

> From: Konstantin Kolinko <[EMAIL PROTECTED]>
> Subject: Re: Blocking port 8005 in TomCat in Deamon Mode
> To: "Tomcat Users List" <users@tomcat.apache.org>, [EMAIL PROTECTED]
> Date: Thursday, July 10, 2008, 2:25 AM
> 2008/7/10 Suma Rakesh <[EMAIL PROTECTED]>:
> >> 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: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to