tomcat-users mailing list archives

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

"Turner, John" <> wrote in message
> 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,
> 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
> (multi-user with network) or 5 (multi-user with network with X-Windows),
> the case of Red Hat.  Other variants are similar.
> Now, within a particular rcN.d directory, you will typically see files
> have names like "S55sshd" and "S85tomcat" or "SNNservice" or whatever.
> 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
> So, if you have a S file that you want to stop from running at boot, you
> "cp -p SNNservice KNNservice" and that will stop it the next time you
> Utilities like Red Hat's chkconfig, etc. can manage this for you, or you
> 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
> 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
> continue with the next service in the list, which will eventually be
> 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,
> 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,
> 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... :-)


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message