You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Eric Miller <je...@uchicago.edu> on 2001/08/16 21:55:21 UTC

Tomcat 4 restart command?

I'm wondering if in Tomcat 4 there is a "restart" command that you can use
to restart it rather than having to "stop" and "start" it using startup and
shutdown scripts?

The problem that I have is that it takes time for it to startup and
shutdown, especially when you have SSL enabled. So, a restart command would
be nice. Or, if it printed out messages like it does in Tomcat 3.x where as
each listening port becomes active (i.e. first port 8080 for HTTP, then
later when HTTPS is available and the SecureRandom has been generated), it
prints out a message to the screen. This way you know when Tomcat is fully
started or stopped. Otherwise, the scripts just return you back to the UNIX
prompt before it's actually started up or shutdown and you don't know
exactly when that process is complete.

I guess a restart command isn't really that important although it would be
nice. I like the messages that are displayed in Tomcat 3.x better though. I
like knowing exactly when the ports are ready for use.

Jon



Re: Tomcat 4 restart command?

Posted by Jonathan Eric Miller <to...@shark.uchicago.edu>.
Thanks for the info. Actually, I just enabled the "reloadable" option on my
Context (development server). So, as long as that works reliably, I should
have to restart my server far less often.

Thanks, Jon

----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat User List" <to...@jakarta.apache.org>
Sent: Thursday, August 16, 2001 3:17 PM
Subject: Re: Tomcat 4 restart command?


>
>
> On Thu, 16 Aug 2001, Jonathan Eric Miller wrote:
>
> > I'm wondering if in Tomcat 4 there is a "restart" command that you can
use
> > to restart it rather than having to "stop" and "start" it using startup
and
> > shutdown scripts?
> >
> > The problem that I have is that it takes time for it to startup and
> > shutdown, especially when you have SSL enabled. So, a restart command
would
> > be nice. Or, if it printed out messages like it does in Tomcat 3.x where
as
> > each listening port becomes active (i.e. first port 8080 for HTTP, then
> > later when HTTPS is available and the SecureRandom has been generated),
it
> > prints out a message to the screen. This way you know when Tomcat is
fully
> > started or stopped. Otherwise, the scripts just return you back to the
UNIX
> > prompt before it's actually started up or shutdown and you don't know
> > exactly when that process is complete.
> >
>
> You know it's done when you see the second "Starting service xxxxx" line
> in $CATALINA_HOME/logs/catalina.out.
>
> > I guess a restart command isn't really that important although it would
be
> > nice. I like the messages that are displayed in Tomcat 3.x better
though. I
> > like knowing exactly when the ports are ready for use.
> >
> > Jon
> >
> >
> >
>
> There's no restart command for the whole server, but there is a convenient
> way to restart a particular webapp (say, because you just updated it).
>
> Prerequisite:  set up a user in your conf/tomcat-users.xml file that has a
> role named "manager".  It doesn't matter which user and password it is
> (Tomcat will only check for the presence of this role).
>
> Now, assume you want to force the web app at context path "/examples" to
> reload.  Simply go to a browser and type:
>
>   http://localhost:8080/manager/reload?path=/examples
>
> The first time you do this, you will be challenged for the username and
> password you have entered.  But, after that, you can just hit "reload" to
> resubmit the same command again.
>
> This stuff will be covered in a (soon to be written, I promise :-) HOWTO
> document about the Manager web app.  In the mean time, consult the source
> code of the Manager servelt (org.apache.catalina.servlets.ManagerServlet)
> for all the things it can do.
>
> Craig
>
>
>


RE: Tomcat 4 restart command?

Posted by "Rob S." <rs...@home.com>.
> This stuff will be covered in a (soon to be written, I promise :-) HOWTO
> document about the Manager web app.  In the mean time, consult the source
> code of the Manager servelt (org.apache.catalina.servlets.ManagerServlet)
> for all the things it can do.

FYI anytime you or anyone writes an email like this, I drop it into a "docs"
folder, and if it spawns an idea for something, I have an email i put notes
in.  E.g. someone wrote "i got tomcat standalone running, now what?" which i
put a to-do of creating an image or doc on how to read through the docs.

- r


Re: Tomcat 4 restart command?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 16 Aug 2001, Jonathan Eric Miller wrote:

> I'm wondering if in Tomcat 4 there is a "restart" command that you can use
> to restart it rather than having to "stop" and "start" it using startup and
> shutdown scripts?
> 
> The problem that I have is that it takes time for it to startup and
> shutdown, especially when you have SSL enabled. So, a restart command would
> be nice. Or, if it printed out messages like it does in Tomcat 3.x where as
> each listening port becomes active (i.e. first port 8080 for HTTP, then
> later when HTTPS is available and the SecureRandom has been generated), it
> prints out a message to the screen. This way you know when Tomcat is fully
> started or stopped. Otherwise, the scripts just return you back to the UNIX
> prompt before it's actually started up or shutdown and you don't know
> exactly when that process is complete.
> 

You know it's done when you see the second "Starting service xxxxx" line
in $CATALINA_HOME/logs/catalina.out.

> I guess a restart command isn't really that important although it would be
> nice. I like the messages that are displayed in Tomcat 3.x better though. I
> like knowing exactly when the ports are ready for use.
> 
> Jon
> 
> 
> 

There's no restart command for the whole server, but there is a convenient
way to restart a particular webapp (say, because you just updated it).

Prerequisite:  set up a user in your conf/tomcat-users.xml file that has a
role named "manager".  It doesn't matter which user and password it is
(Tomcat will only check for the presence of this role).

Now, assume you want to force the web app at context path "/examples" to
reload.  Simply go to a browser and type:

  http://localhost:8080/manager/reload?path=/examples

The first time you do this, you will be challenged for the username and
password you have entered.  But, after that, you can just hit "reload" to
resubmit the same command again.

This stuff will be covered in a (soon to be written, I promise :-) HOWTO
document about the Manager web app.  In the mean time, consult the source
code of the Manager servelt (org.apache.catalina.servlets.ManagerServlet)
for all the things it can do.

Craig