Re: Start tomcat before apache on RedHat7.3

2003-01-15 Thread Arcadius A.
Bill Lunnon [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


 Have attached a copy of my /etc/rc.d/init.d/httpd file.
 It starts TOMCAT (3.3.1) and apache(1.3.27)
 and stops the other way.

 Hope this helps

 Bill


Thanks Bill! :-)






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Start tomcat before apache on RedHat7.3

2003-01-14 Thread Arcadius A.
 what runs when, and stick the delay in there.

 Another solution is to not use ApacheConfig (i.e. and the dynamically
 generated mod_jk.conf file) at all, just use some static version that
 you created.  In fact, this makes a lot more sense to me, for a number
 of reasons, including that I don't believe ApacheConfig can capture
 everything that needs to go into that file, and that once you have
 things set, it's not going to change that frequently (so you shouldn't
 have to regenerate it every time you start Tomcat).



Thanks for the reply...
Just let me point out that I have not used neither mod_jk.conf  nor
ApacheConfig 
I have written all the loadModule . and JkMount   etc directly
into httpd.conf

Regrads

Arcadius.




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Start tomcat before apache on RedHat7.3

2003-01-14 Thread Arcadius A.

Turner, John [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 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:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Start tomcat before apache on RedHat7.3

2003-01-14 Thread Turner, John

Then the delay shouldn't need to be more than 5 or 10 seconds.

John


 -Original Message-
 From: Arcadius A. [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 14, 2003 8:38 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Start tomcat before apache on RedHat7.3
 
 
  what runs when, and stick the delay in there.
 
  Another solution is to not use ApacheConfig (i.e. and the 
 dynamically
  generated mod_jk.conf file) at all, just use some static 
 version that
  you created.  In fact, this makes a lot more sense to me, 
 for a number
  of reasons, including that I don't believe ApacheConfig can capture
  everything that needs to go into that file, and that once you have
  things set, it's not going to change that frequently (so 
 you shouldn't
  have to regenerate it every time you start Tomcat).
 
 
 
 Thanks for the reply...
 Just let me point out that I have not used neither mod_jk.conf  nor
 ApacheConfig 
 I have written all the loadModule . and JkMount   
 etc directly
 into httpd.conf
 
 Regrads
 
 Arcadius.
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Start tomcat before apache on RedHat7.3

2003-01-14 Thread Arcadius A.

Turner, John [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Then the delay shouldn't need to be more than 5 or 10 seconds.


Ok John,
I'm not asking you to do the whole thing for me
but could you give me an example of a script that could do what you're
talking about?

This problem is realy strange I have TomCat 3.2 running on FreeBSD with
apache3.27 and mod_jk (automatic config)  when I reboot, tomcat and
apache start quite fine without the need of any special script  but I
cannot see why I'm having troubles on RedHat.

regards.




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Start tomcat before apache on RedHat7.3

2003-01-14 Thread Turner, John

If you have 2 files in /etc/rc3.d, one called S80httpd and one called
S85tomcat (the SNN is going to be different), they are sym links to
start/stop scripts in /etc/init.d.  First thing, check to make sure the
SNNtomcat file has a smaller number than the SNNhttpd file so that it starts
first.  Second, if that is still causing problems, then edit the script in
init.d, your choice which one, and stick sleep NN in there, where NN
equals number of seconds.

If you put it at the bottom of the Tomcat start script, the script will
pause that number of seconds before exiting and notifying init that it can
continue with other scripts.  This delay will probably be enough time to
allow Tomcat to finish it's startup process.

John


 -Original Message-
 From: Arcadius A. [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 14, 2003 9:13 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Start tomcat before apache on RedHat7.3
 
 
 
 Turner, John [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
  Then the delay shouldn't need to be more than 5 or 10 seconds.
 
 
 Ok John,
 I'm not asking you to do the whole thing for me
 but could you give me an example of a script that could do what you're
 talking about?
 
 This problem is realy strange I have TomCat 3.2 running 
 on FreeBSD with
 apache3.27 and mod_jk (automatic config)  when I reboot, 
 tomcat and
 apache start quite fine without the need of any special 
 script  but I
 cannot see why I'm having troubles on RedHat.
 
 regards.
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Start tomcat before apache on RedHat7.3

2003-01-14 Thread Mike Millson
I have a howto document in pdf and sxw (Open Office) format that may be of
help.

http://www.atsga.com/docs/

Mike

-Original Message-
From: news [mailto:[EMAIL PROTECTED]]On Behalf Of Arcadius A.
Sent: Tuesday, January 14, 2003 9:13 AM
To: [EMAIL PROTECTED]
Subject: Re: Start tomcat before apache on RedHat7.3



Turner, John [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Then the delay shouldn't need to be more than 5 or 10 seconds.


Ok John,
I'm not asking you to do the whole thing for me
but could you give me an example of a script that could do what you're
talking about?

This problem is realy strange I have TomCat 3.2 running on FreeBSD with
apache3.27 and mod_jk (automatic config)  when I reboot, tomcat and
apache start quite fine without the need of any special script  but I
cannot see why I'm having troubles on RedHat.

regards.




--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Start tomcat before apache on RedHat7.3

2003-01-14 Thread Bill Lunnon


-Original Message-
From: news [mailto:[EMAIL PROTECTED]]On Behalf Of Arcadius A.
Sent: Wednesday, 15 January 2003 1:13 AM
To: [EMAIL PROTECTED]
Subject: Re: Start tomcat before apache on RedHat7.3



Turner, John [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Then the delay shouldn't need to be more than 5 or 10 seconds.


Ok John,
I'm not asking you to do the whole thing for me
but could you give me an example of a script that could do what you're
talking about?

This problem is realy strange I have TomCat 3.2 running on FreeBSD with
apache3.27 and mod_jk (automatic config)  when I reboot, tomcat and
apache start quite fine without the need of any special script  but I
cannot see why I'm having troubles on RedHat.

regards.


Have attached a copy of my /etc/rc.d/init.d/httpd file.
It starts TOMCAT (3.3.1) and apache(1.3.27)
and stops the other way.

Hope this helps

Bill

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



httpd
Description: Binary data
--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Start tomcat before apache on RedHat7.3

2003-01-13 Thread Arcadius A.
Hello!
I've successfully  installed tomcat+apache+mod_jk.
Everything work fine...except :
At boot time, apache starts before tomcat so after the system boots, I still
need to restart apache before I can access the jsp pages
Note that I have placed startup scripts for both apache and tomcat in
/etc/rc.d/init.d/.
The tomcat startup script is the one that comes with tomcat.
Apache startup script is a symbolic link to the apachectl script [ :-)]

Thanks for the help.

Regards.

Arcadius.




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Start tomcat before apache on RedHat7.3

2003-01-13 Thread Turner, John

I'm assuming that you are using the ApacheConfig class to auto-generate
configuration directives for Apache's httpd.conf.

Tomcat needs time to start up, and the ApacheConfig class needs time to
write mod_jk.conf (or whatever file you are using).

So, you have to put a delay into the process somewhere.  Like a sleep 20
or something right after the Tomcat script executes, but before Apache is
started, or take both of them out of init.d and put the startup into
rc.local where you have more explicit control over what runs when, and stick
the delay in there.

John


 -Original Message-
 From: Arcadius A. [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 13, 2003 8:10 AM
 To: [EMAIL PROTECTED]
 Subject: Start tomcat before apache on RedHat7.3
 
 
 Hello!
 I've successfully  installed tomcat+apache+mod_jk.
 Everything work fine...except :
 At boot time, apache starts before tomcat so after the system 
 boots, I still
 need to restart apache before I can access the jsp pages
 Note that I have placed startup scripts for both apache and tomcat in
 /etc/rc.d/init.d/.
 The tomcat startup script is the one that comes with tomcat.
 Apache startup script is a symbolic link to the apachectl 
 script [ :-)]
 
 Thanks for the help.
 
 Regards.
 
 Arcadius.
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Start tomcat before apache on RedHat7.3

2003-01-13 Thread Arcadius A.

Turner, John [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 I'm assuming that you are using the ApacheConfig class to auto-generate
 configuration directives for Apache's httpd.conf.

 Tomcat needs time to start up, and the ApacheConfig class needs time to
 write mod_jk.conf (or whatever file you are using).

 So, you have to put a delay into the process somewhere.  Like a sleep 20
 or something right after the Tomcat script executes, but before Apache is
 started, or take both of them out of init.d and put the startup into
 rc.local where you have more explicit control over what runs when, and
stick
 the delay in there.

 John


Hello!
Thanks for the reply
I've notice that under the directory  /etc/rc.d/ are several
subdirectories init.d, rc0.d , rc1.d, ... ,rc6.d.
Wouldn't it be easier to just put tomcat startup script in rci.d and
apache startup script in rcj.d where ij ?

 (IMHO, the order in which startup scripts are started depends on where
they are located)

Thanks.




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Start tomcat before apache on RedHat7.3

2003-01-13 Thread Turner, John

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.

John


 -Original Message-
 From: Arcadius A. [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 13, 2003 8:35 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Start tomcat before apache on RedHat7.3
 
 
 
 Turner, John [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
  I'm assuming that you are using the ApacheConfig class to 
 auto-generate
  configuration directives for Apache's httpd.conf.
 
  Tomcat needs time to start up, and the ApacheConfig class 
 needs time to
  write mod_jk.conf (or whatever file you are using).
 
  So, you have to put a delay into the process somewhere.  
 Like a sleep 20
  or something right after the Tomcat script executes, but 
 before Apache is
  started, or take both of them out of init.d and put the startup into
  rc.local where you have more explicit control over what 
 runs when, and
 stick
  the delay in there.
 
  John
 
 
 Hello!
 Thanks for the reply
 I've notice that under the directory  /etc/rc.d/ are several
 subdirectories init.d, rc0.d , rc1.d, ... ,rc6.d.
 Wouldn't it be easier to just put tomcat startup script in rci.d and
 apache startup script in rcj.d where ij ?
 
  (IMHO, the order in which startup scripts are started 
 depends on where
 they are located)
 
 Thanks.
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Start tomcat before apache on RedHat7.3

2003-01-13 Thread Milt Epstein
On Mon, 13 Jan 2003, Turner, John wrote:

 I'm assuming that you are using the ApacheConfig class to
 auto-generate configuration directives for Apache's httpd.conf.

 Tomcat needs time to start up, and the ApacheConfig class needs time
 to write mod_jk.conf (or whatever file you are using).

 So, you have to put a delay into the process somewhere.  Like a
 sleep 20 or something right after the Tomcat script executes, but
 before Apache is started, or take both of them out of init.d and put
 the startup into rc.local where you have more explicit control over
 what runs when, and stick the delay in there.

Another solution is to not use ApacheConfig (i.e. and the dynamically
generated mod_jk.conf file) at all, just use some static version that
you created.  In fact, this makes a lot more sense to me, for a number
of reasons, including that I don't believe ApacheConfig can capture
everything that needs to go into that file, and that once you have
things set, it's not going to change that frequently (so you shouldn't
have to regenerate it every time you start Tomcat).


  -Original Message-
  From: Arcadius A. [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 13, 2003 8:10 AM
  To: [EMAIL PROTECTED]
  Subject: Start tomcat before apache on RedHat7.3
 
 
  Hello!
  I've successfully  installed tomcat+apache+mod_jk.
  Everything work fine...except :
  At boot time, apache starts before tomcat so after the system
  boots, I still
  need to restart apache before I can access the jsp pages
  Note that I have placed startup scripts for both apache and tomcat in
  /etc/rc.d/init.d/.
  The tomcat startup script is the one that comes with tomcat.
  Apache startup script is a symbolic link to the apachectl
  script [ :-)]
 
  Thanks for the help.
 
  Regards.
 
  Arcadius.
 
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 

 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]