Ricky,

Actually, for my startup script that is in init.d, all I am doing is linking
to catalina.sh.  An "ls -al" of it look like this:

lrwxrwxrwx   1 root     staff         53 Nov 12 09:01 tomcat ->
/bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh

I have then placed a link to this in the rc3.d.  I could have linked
directly to catalina.sh from rc3.d, but for consistency I like all my
startup and kill scripts in the rc#.d directories to link to the init.d
directory.  The link in the rc3.d directory looks like this:

lrwxrwxrwx   1 root     sys           18 Oct 25 10:13 S55tomcat ->
/etc/init.d/tomcat

An uppercase "S" signifies a startup script, and an uppercase "K" signifies
a kill (or stop) script.

This is the script I am using in the crontab:  (I am sure many have come up
with better, but this works for my developers)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/ksh
# The script stops and starts the java servlet container

JAVA_HOME=/bto/appl/apache/j2sdk
CATALINA_HOME=/bto/appl/apache/jakarta-tomcat-4.0.4
#CLASSPATH=$CATALINA_HOME/common/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA
_HOME/jre/lib/ext:.
CLASSPATH=$CATALINA_HOME/common/lib/servlet.jar:/bto/appl/apache/j2sdk/jre/l
ib/rt.jar:/bto/appl/apache/j2sdk/lib/tools.jar:/bto/app
l/apache/j2sdk/lib/dt.jar:/bto/appl/apache/j2sdk/lib/htmlconverter.jar:/bto/
appl/apache/j2sdk/jre/lib/charsets.jar:/bto/appl/apache
/j2sdk/jre/lib/javaplugin.jar:/bto/appl/apache/j2sdk/jre/lib/ext/dnsns.jar:/
bto/appl/apache/j2sdk/jre/lib/ext/localedata.jar:/bto/a
ppl/apache/j2sdk/jre/lib/ext/ldapsec.jar:/bto/appl/apache/j2sdk/jre/lib/jce.
jar:/bto/appl/apache/j2sdk/jre/lib/jsse.jar:.:/bto/appl
/apache/jakarta-tomcat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/ja
karta-tomcat-4.0.4/webapps/esd/WEB-INF/lib:/bto/appl/ap
ache/htdocs/esd/java

export JAVA_HOME
export CATALINA_HOME
export CLASSPATH

/bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop

/bin/sleep 10

/bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-----Original Message-----
From: Ricky Leung [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 12:36 PM
To: Tomcat Users List
Subject: RE: tomcat not starting after reboot or from cron


Do you mind sharing your Tomcat restart script with us?  I want to do the
same but perhaps on a weekly basis.  One of the problems I am worried about
is that Tomcat isn't stopping, so I would need to wait for it to end or kill
it before I restart it.

Any help would be appreciated.

Thanks.
Ricky

> -----Original Message-----
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 12:31 PM
> To: Tomcat Users List
> Subject: RE: tomcat not starting after reboot or from cron
>
>
> Howdy,
> We have some tomcat instances that restart nightly from a crontab,
> without a problem.  They're all tomcat 4.0.6-LE on Solaris 2.8.  None
> use apache as the front end.  None run as root.  Each runs as its own
> user, and the restart job is in that user's crontab.  We've had no
> problems with this setup.  What does the cron output email say when you
> have problems?
>
> Yoav Shapira
> Millennium ChemInformatics
>
>
> >-----Original Message-----
> >From: Lott, Carey [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, January 22, 2003 12:13 PM
> >To: 'Tomcat Users List'
> >Subject: tomcat not starting after reboot or from cron
> >
> >Has anybody had a problem with tomcat (4.0.4) starting after a reboot?
> Or
> >problems starting it from the root crontab?
> >I have no problems at all starting tomcat manually.  Everything works
> fine
> >that way.
> >To automate the startup after a reboot, I am using init.d with the
> startup
> >script in rc3.d.  However, nothing is happening.  I'm not even
> receiving
> >any
> >errors in the logs.  But I can immediately start it manually with out a
> >problem.
> >Also I can't stop and start tomcat from a crontab.  I set up a stop and
> >start script and placed them in the root crontab, but the time comes to
> >stop
> >tomcat and nothing happens then the startup script should be initiated
> a
> >minute later but it is a mute point since tomcat didn't stop, but
> nothing
> >shows up in the logs either way.
> >Is there a parameter or something that I am missing for this to work?
> >
> >I am running Tomcat 4.0.4 (as a standalone server using port 8880) on
> >Solaris 2.7.  Apache 1.3.9 is running on the server as well using port
> 80.
> >
> >Thanks in advance for the help.
> >
> >- Carey -
> >
> >--
> >To unsubscribe, e-mail:   <mailto:tomcat-user-
> >[EMAIL PROTECTED]>
> >For additional commands, e-mail: <mailto:tomcat-user-
> >[EMAIL PROTECTED]>
>
>
> --
> 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]>

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

Reply via email to