tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arcadius A." <ahou...@sh.cvut.cz>
Subject Re: Start tomcat before apache on RedHat7.3
Date Tue, 14 Jan 2003 13:39:38 GMT

"Turner, John" <JTurner@AAS.com> wrote in message
news:83F0258A9996D311B14200A0C98F173602F22BE2@aas-internet.aas.com...
>
> Nope, where startup (and shutdown) scripts are located has no bearing
> whatsoever on when they are started.  Where != when.
>
> The init directories are known as rcN.d, where N = a number.  That number
> defines runlevel, not startup order.  A UNIX/Linux machine has different
> runlevels.  Single user, multi-user, single-user with network,
maintenance,
> multi-user with X windows, whatever.  Each one of those runlevels has a
> number.  Which run level the computer is booting to defines which init
> directory is used to startup services.  The default runlevel is typically
3
> (multi-user with network) or 5 (multi-user with network with X-Windows),
in
> the case of Red Hat.  Other variants are similar.
>
> Now, within a particular rcN.d directory, you will typically see files
that
> have names like "S55sshd" and "S85tomcat" or "SNNservice" or whatever.
Some
> will be named "KNNservice".  NN in this case is also a number, and THAT
> number defines startup order.  That is, S55service will startup before
> S85service.  "S" means "start at boot" and "K" means "do not start at
boot".
> So, if you have a S file that you want to stop from running at boot, you
can
> "cp -p SNNservice KNNservice" and that will stop it the next time you
boot.
> Utilities like Red Hat's chkconfig, etc. can manage this for you, or you
can
> get in and hack it around manually, whichever makes you comfortable.
>
> The point here is NOT startup order, but startup TIME.  That is, elapsed
> time, not sequence time.  Tomcat needs time to startup, but your init
> scripts don't know that, so they will be good little scripts and try to
> execute as fast as possible, in the milliseconds, meaning that Apache's
> startup script or command will execute right after Tomcat's, while Tomcat
is
> still trying to complete, especially in the case of using ApacheConfig for
> mod_jk.
>
> You want to slow all of that down.  The solution is to 1) delay the point
> when Tomcat's startup script reports to init that things are OK and init
can
> continue with the next service in the list, which will eventually be
Apache,
> 2) delay the point when Apache's startup command/script is executed, 3)
> start Tomcat at boot and Apache manually, or 4) start both manually,
Tomcat
> first, and Apache second after a self-imposed delay that gives Tomcat a
> chance to complete.
>
> Word of advice:  STAY OUT of /etc/rc.d/init.d unless you know exactly what
> you are doing, or have a good backup and a rescue disk...messing around in
> there can cause trouble, like an infinite loop when trying to boot or
> whatever.  You want to do things in the appropriate runlevel directory,
like
> rc3.d or whatever, and use a tool like chkconfig to manage your runlevel
> dirs and their links to the actual start/stop scripts.
>

Thanks John for clearing things up... :-)

ARcadius.




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message