It works fine if you wait long enough between calling the stop and start script,
but not if you write a "restart" script which
calls "catalina.sh start" and immediately after, "catalina.sh stop", because
then there's no delay between the two, and tomcat doesn't have the
time to shutdown before you try (and fail) to restart it.

In my case, I need to wait 10 seconds between doing a shutdown and a startup,
but this varies depending on the number
of webapps you have (in the case of the original poster, it's 40 seconds), so I
agree with him there should be a more elegant
way to restart the server.


Thanh Duong wrote:

> Hi,
> to start tomcat in a separate window use
> "$CATALINA_HOME/bin/catalina.sh start"
>
> to stop tomcat use
> "$CATALINA_HOME/bin/catalina.sh stop"
>
> It works fine!!!! so you don't need to wait for ending the tomcat process.
>
> Bye
> Thanh
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Donnerstag, 14. Februar 2002 16:02
> To: [EMAIL PROTECTED]
> Subject: restarting Tomcat 4
>
> Hi.
>
>      I was wondering if anyone out there has a good way of restarting Tomcat
> 4...?  In version 3, I used to just be able to do
> "$TOMCAT_HOME/bin/shutdown.sh; $TOMCAT_HOME/bin/startup.sh".  Now, in
> version
> 4 though, since the starting and stopping scripts seem to have been modified
> to be background processes, this no longer works since it won't wait for the
> first script to finish anymore before starting the second one.  Now, my
> restart alias looks like this: "$CATALINA_HOME/bin/shutdown.sh; sleep 40;
> $CATALINA_HOME/bin/startup.sh".  Pretty lame, and I just arrived at the
> sleep
> value by trial and error (actually as I add more stuff in my server.xml
> file,
> I think the shutdown might even take longer, so I may need to bump this
> value
> up).  Does anyone have any more elegant/exact ways of doing this?


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to