You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Lott, Carey" <ca...@eds.com> on 2003/08/07 19:59:48 UTC

Starting tomcat from init scripts (HP/UX)

Hi,
The above subject is based on the exact same topic I found in the archives
from back in January, but no solution was ever posted.  We are having the
exact same problem that Pascal was having.  We are trying to start tomcat
from an init script at boot time.  I have the needed variables in the init
script, and the init script calls catalina.sh directly.  Below is a copy of
my script.  I have used the script to stop and start tomcat manually without
a problem.  However, when Tomcat tries to start at boot time the run control
information states that it can't start as root, and it is going to try as
bin, but it is unsuccessful.  Does anybody know why it wouldn't be able to
start as root?  What can I do to fix this?

Init script:
-------------------------------------------------------------
#!/bin/sh
# Start/Stop for Tomcat Java Servlet Container
#

CATALINA_HOME="/bto/appl/apache/jakarta-tomcat-4.0.4"
        export CATALINA_HOME
JAVA_HOME="/opt/java1.4"
        export JAVA_HOME
CLASSPATH="/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.jar:/opt
/java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/
opt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/jav
a1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/
jre/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4
/jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-to
mcat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4
/webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pr
oduct/8.0.6/jdbc/lib/classes111.zip"
        export CLASSPATH

case $1 in
        'start')
                /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start
>> /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 2>&1 &
                ;;
        'stop')
                /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop
>> /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 2>&1 &
                ;;
esac
----------------------------------------------------------------

Thank you for any help you can offer.
Carey

<signature>
<name>Carey Lott</name>
<pos>Web Tools Support</pos>
<org>Infrastructure Storage & Tools Support</org>
<company>EDS</company>
<account>BellSouth</account>
<email>carey.lott@eds.com</email>
<ipager>carey@imcingular.com</ipager>
</signature>

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


Re: Starting tomcat from init scripts (HP/UX)

Posted by "Eric J. Pinnell" <er...@iCky.org>.
Hi,

It's been a while since I tinkered with HP/UX but it seems to me that you
can set all your varibles in the default tomcat start scripts and then
call the default startup.sh and shutdown.sh.

-e

On Thu, 7 Aug 2003, Lott, Carey wrote:

> Hi,
> The above subject is based on the exact same topic I found in the archives
> from back in January, but no solution was ever posted.  We are having the
> exact same problem that Pascal was having.  We are trying to start tomcat
> from an init script at boot time.  I have the needed variables in the init
> script, and the init script calls catalina.sh directly.  Below is a copy of
> my script.  I have used the script to stop and start tomcat manually without
> a problem.  However, when Tomcat tries to start at boot time the run control
> information states that it can't start as root, and it is going to try as
> bin, but it is unsuccessful.  Does anybody know why it wouldn't be able to
> start as root?  What can I do to fix this?
>
> Init script:
> -------------------------------------------------------------
> #!/bin/sh
> # Start/Stop for Tomcat Java Servlet Container
> #
>
> CATALINA_HOME="/bto/appl/apache/jakarta-tomcat-4.0.4"
>         export CATALINA_HOME
> JAVA_HOME="/opt/java1.4"
>         export JAVA_HOME
> CLASSPATH="/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.jar:/opt
> /java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/
> opt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/jav
> a1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/
> jre/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4
> /jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-to
> mcat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4
> /webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pr
> oduct/8.0.6/jdbc/lib/classes111.zip"
>         export CLASSPATH
>
> case $1 in
>         'start')
>                 /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start
> >> /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 2>&1 &
>                 ;;
>         'stop')
>                 /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop
> >> /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 2>&1 &
>                 ;;
> esac
> ----------------------------------------------------------------
>
> Thank you for any help you can offer.
> Carey
>
> <signature>
> <name>Carey Lott</name>
> <pos>Web Tools Support</pos>
> <org>Infrastructure Storage & Tools Support</org>
> <company>EDS</company>
> <account>BellSouth</account>
> <email>carey.lott@eds.com</email>
> <ipager>carey@imcingular.com</ipager>
> </signature>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

Re: Starting tomcat from init scripts (HP/UX)

Posted by "Eric J. Pinnell" <er...@iCky.org>.
Hi,

It's been a while since I tinkered with HP/UX but it seems to me that you
can set all your varibles in the default tomcat start scripts and then
call the default startup.sh and shutdown.sh.

-e

On Thu, 7 Aug 2003, Lott, Carey wrote:

> Hi,
> The above subject is based on the exact same topic I found in the archives
> from back in January, but no solution was ever posted.  We are having the
> exact same problem that Pascal was having.  We are trying to start tomcat
> from an init script at boot time.  I have the needed variables in the init
> script, and the init script calls catalina.sh directly.  Below is a copy of
> my script.  I have used the script to stop and start tomcat manually without
> a problem.  However, when Tomcat tries to start at boot time the run control
> information states that it can't start as root, and it is going to try as
> bin, but it is unsuccessful.  Does anybody know why it wouldn't be able to
> start as root?  What can I do to fix this?
>
> Init script:
> -------------------------------------------------------------
> #!/bin/sh
> # Start/Stop for Tomcat Java Servlet Container
> #
>
> CATALINA_HOME="/bto/appl/apache/jakarta-tomcat-4.0.4"
>         export CATALINA_HOME
> JAVA_HOME="/opt/java1.4"
>         export JAVA_HOME
> CLASSPATH="/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.jar:/opt
> /java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/
> opt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/jav
> a1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/
> jre/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4
> /jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-to
> mcat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4
> /webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pr
> oduct/8.0.6/jdbc/lib/classes111.zip"
>         export CLASSPATH
>
> case $1 in
>         'start')
>                 /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start
> >> /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 2>&1 &
>                 ;;
>         'stop')
>                 /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop
> >> /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 2>&1 &
>                 ;;
> esac
> ----------------------------------------------------------------
>
> Thank you for any help you can offer.
> Carey
>
> <signature>
> <name>Carey Lott</name>
> <pos>Web Tools Support</pos>
> <org>Infrastructure Storage & Tools Support</org>
> <company>EDS</company>
> <account>BellSouth</account>
> <email>carey.lott@eds.com</email>
> <ipager>carey@imcingular.com</ipager>
> </signature>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

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


Re: Starting tomcat from init scripts (HP/UX)

Posted by Tim Funk <fu...@joedog.org>.
Put your startup wrapper in inittab. (Our wrapper was a copy and tweak of 
some other script also called from initab )

-Tim


Lott, Carey wrote:
> Hi,
> The above subject is based on the exact same topic I found in the archives
> from back in January, but no solution was ever posted.  We are having the
> exact same problem that Pascal was having.  We are trying to start tomcat
> from an init script at boot time.  I have the needed variables in the init
> script, and the init script calls catalina.sh directly.  Below is a copy of
> my script.  I have used the script to stop and start tomcat manually without
> a problem.  However, when Tomcat tries to start at boot time the run control
> information states that it can't start as root, and it is going to try as
> bin, but it is unsuccessful.  Does anybody know why it wouldn't be able to
> start as root?  What can I do to fix this?
> 
> Init script:
> -------------------------------------------------------------
> #!/bin/sh
> # Start/Stop for Tomcat Java Servlet Container
> #
> 
> CATALINA_HOME="/bto/appl/apache/jakarta-tomcat-4.0.4"
>         export CATALINA_HOME
> JAVA_HOME="/opt/java1.4"
>         export JAVA_HOME
> CLASSPATH="/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.jar:/opt
> /java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/
> opt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/jav
> a1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/
> jre/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4
> /jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-to
> mcat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4
> /webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pr
> oduct/8.0.6/jdbc/lib/classes111.zip"
>         export CLASSPATH
> 
> case $1 in
>         'start')
>                 /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start
> 
>>>/bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 2>&1 &
> 
>                 ;;
>         'stop')
>                 /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop
> 
>>>/bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 2>&1 &
> 
>                 ;;
> esac
> ----------------------------------------------------------------
> 
> Thank you for any help you can offer.
> Carey
>  


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


Re: Starting tomcat from init scripts (HP/UX)

Posted by Tim Funk <fu...@joedog.org>.
Put your startup wrapper in inittab. (Our wrapper was a copy and tweak of 
some other script also called from initab )

-Tim


Lott, Carey wrote:
> Hi,
> The above subject is based on the exact same topic I found in the archives
> from back in January, but no solution was ever posted.  We are having the
> exact same problem that Pascal was having.  We are trying to start tomcat
> from an init script at boot time.  I have the needed variables in the init
> script, and the init script calls catalina.sh directly.  Below is a copy of
> my script.  I have used the script to stop and start tomcat manually without
> a problem.  However, when Tomcat tries to start at boot time the run control
> information states that it can't start as root, and it is going to try as
> bin, but it is unsuccessful.  Does anybody know why it wouldn't be able to
> start as root?  What can I do to fix this?
> 
> Init script:
> -------------------------------------------------------------
> #!/bin/sh
> # Start/Stop for Tomcat Java Servlet Container
> #
> 
> CATALINA_HOME="/bto/appl/apache/jakarta-tomcat-4.0.4"
>         export CATALINA_HOME
> JAVA_HOME="/opt/java1.4"
>         export JAVA_HOME
> CLASSPATH="/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.jar:/opt
> /java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/
> opt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/jav
> a1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/
> jre/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4
> /jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-to
> mcat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4
> /webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pr
> oduct/8.0.6/jdbc/lib/classes111.zip"
>         export CLASSPATH
> 
> case $1 in
>         'start')
>                 /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start
> 
>>>/bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 2>&1 &
> 
>                 ;;
>         'stop')
>                 /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop
> 
>>>/bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 2>&1 &
> 
>                 ;;
> esac
> ----------------------------------------------------------------
> 
> Thank you for any help you can offer.
> Carey
>