You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christoph Kukulies <ku...@gilberto.physik.RWTH-Aachen.DE> on 2000/10/12 18:02:37 UTC

Re: HELP: tomact.sh[3.1]+FreeBSD ok on command line but not on boot

On Thu, Oct 12, 2000 at 05:46:52PM +0100, Paul Sharpe wrote:
> tomcat.sh works which works fine from the command line but not from
> /usr/local/etc/rc.d on boot
> 
> I'm capturing everything from STDOUT and STDERR for
> 
>   /usr/local/jdk1.1.8/bin/java  -Dtomcat.home=/usr/local/tomcat org.apache.tomcat.startup.Tomcat start
> 
> on boot and comparing it to what I get when I start Tomcat after boot.
> The environment diffs from the two scenarios look innocuous (notably
> $CLASSPATH is identical) i.e.
> 
>   7a8
>   > OLDPWD=/root
>   10a12
>   > _=/usr/local/etc/rc.d/tomcat.sh
>   11a14
>   > TERM=xterm
> 
> However on boot java seems to just stop loading classes (I'm running
> with -verbose) at an arbitrary point.  Not only that but the point at
> which it stops is different from one reboot to the next!
> 
>   su-2.03# wc -l javawrapper.log.*
>        145 javawrapper.log.bad.1
>        158 javawrapper.log.bad.2
>        171 javawrapper.log.bad.3
>        127 javawrapper.log.bad.4
>        290 javawrapper.log.ok
>        891 total
> 
> Can anyone explain this?
> 
> Tomcat 3.1
> FreeBSD junodev 3.3-RELEASE FreeBSD 3.3-RELEASE #0
> JDK 1.1.8


I can confirm this phenomenon under FreeBSD 5.0-current of
yesterday. My /usr/local/etc/rc.d/apache.sh looks
like:

#!/bin/sh
export JAVA_HOME=/usr/local/jdk1.1.8
/usr/local/build/tomcat/bin/startup.sh
sleep 3
/usr/local/sbin/apachectl start


(You see the defensive sleep3 there, but still I have to do a tomcat
start by hand after reboot). 



> 
> paul
> 
> --
> paul@miraclefish.com

-- 
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de

Re: HELP: tomact.sh[3.1]+FreeBSD ok on command line but not on boot

Posted by Christopher Farley <ch...@northernbrewer.com>.
On Thu, 12 Oct 2000, Paul Sharpe wrote:

> 
> 
> Christopher Farley wrote:
> >
> > I'm running FreeBSD 4.1 RELEASE, and I do not have to start tomcat by hand
> > after a reboot. I start Apache first, then start Tomcat, with no sleeps at
> > all.
> > 
> > I pipe all the output to /dev/null, so I never noticed a problem with
> > STDOUT/STDERR.
> 
> Do you start things from /usr/local/etc/rc.d or /etc/rc.local? 

I start it from /usr/local/etc/rc.d. Here's my script, not universally
applicable, but it works for me:

#!/usr/local/bin/bash
# Starts the webserver, including Tomcat
source /root/.bashrc
[ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl start >/dev/null && echo -n ' apache'
/bin/sh /usr/local/tomcat/bin/startup.sh >/dev/null && echo -n ' tomcat'

We recently had a power outage, and when the power came on Apache and
Tomcat both went back up, so I was pleased.


Re: HELP: tomact.sh[3.1]+FreeBSD ok on command line but not on boot

Posted by Paul Sharpe <pa...@miraclefish.com>.

Christopher Farley wrote:
> 
> On Thu, 12 Oct 2000, Christoph Kukulies wrote:
> 
> > I can confirm this phenomenon under FreeBSD 5.0-current of
> > yesterday. My /usr/local/etc/rc.d/apache.sh looks
> > like:
> >
> > #!/bin/sh
> > export JAVA_HOME=/usr/local/jdk1.1.8
> > /usr/local/build/tomcat/bin/startup.sh
> > sleep 3
> > /usr/local/sbin/apachectl start
> >
> >
> > (You see the defensive sleep3 there, but still I have to do a tomcat
> > start by hand after reboot).
> 
> I'm running FreeBSD 4.1 RELEASE, and I do not have to start tomcat by hand
> after a reboot. I start Apache first, then start Tomcat, with no sleeps at
> all.
> 
> I pipe all the output to /dev/null, so I never noticed a problem with
> STDOUT/STDERR.

Do you start things from /usr/local/etc/rc.d or /etc/rc.local?

paul

--
paul@miraclefish.com

Re: HELP: tomact.sh[3.1]+FreeBSD ok on command line but not on boot

Posted by Christopher Farley <ch...@northernbrewer.com>.
On Thu, 12 Oct 2000, Christoph Kukulies wrote:

> I can confirm this phenomenon under FreeBSD 5.0-current of
> yesterday. My /usr/local/etc/rc.d/apache.sh looks
> like:
> 
> #!/bin/sh
> export JAVA_HOME=/usr/local/jdk1.1.8
> /usr/local/build/tomcat/bin/startup.sh
> sleep 3
> /usr/local/sbin/apachectl start
> 
> 
> (You see the defensive sleep3 there, but still I have to do a tomcat
> start by hand after reboot). 

I'm running FreeBSD 4.1 RELEASE, and I do not have to start tomcat by hand
after a reboot. I start Apache first, then start Tomcat, with no sleeps at
all.

I pipe all the output to /dev/null, so I never noticed a problem with
STDOUT/STDERR.

----
Christopher Farley
Northern Brewer / 1150 Grand Avenue / St. Paul, MN 55105
www.northernbrewer.com