Re: Starting tomcat from init scripts (HP/UX)
It's the former. The latter doesn't occur on this list in my experience. John Lott, Carey wrote: Since nobody has responded does this mean nobody has any more ideas on the problem or am I getting the You idiot. The answer is staring you in the face. silent treatment? If it is the latter, I will admit being an idiot if someone will enlighten me. If it is the former, I want to say thank you for the help I have received to this point because I am farther along then I was, and if I figure out a solution short of a cron entry I'll post it. Thanks again for the help. Carey -Original Message- From: Lott, Carey Sent: Friday, August 15, 2003 11:18 AM To: 'Tomcat Users List' Subject: RE: Starting tomcat from init scripts (HP/UX) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
I have the following recommendations: - put a 'set -xv' in all batch scripts that are part of the startup procedure. - I'm not familiar with HP/UX. Under linux I would try to strace the startscript. (Under solaris it's truss) -Original Message- From: Lott, Carey [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:47 PM To: 'Tomcat Users List' Subject: RE: Starting tomcat from init scripts (HP/UX) I tried calling the startup.sh instead of catalina.sh, but I had the same outcome. It executes the first part of the script which displays the variables that are being used, but it doesn't do anything more. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
Since nobody has responded does this mean nobody has any more ideas on the problem or am I getting the You idiot. The answer is staring you in the face. silent treatment? If it is the latter, I will admit being an idiot if someone will enlighten me. If it is the former, I want to say thank you for the help I have received to this point because I am farther along then I was, and if I figure out a solution short of a cron entry I'll post it. Thanks again for the help. Carey -Original Message- From: Lott, Carey Sent: Friday, August 15, 2003 11:18 AM To: 'Tomcat Users List' Subject: RE: Starting tomcat from init scripts (HP/UX) Ok, I finally got the script to execute correctly and I got the familiar output: Using CATALINA_BASE: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_HOME: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_TMPDIR: /bto/appl/apache/jakarta-tomcat-4.0.4/temp Using JAVA_HOME: /opt/java1.4 But tomcat still isn't starting, and I am not receiving any other errors. Also the script executes fine when I do it from command line. I have placed the start/stop script in /sbin/init.d/. I have made the script be last to start and first to stop. I couldn't get the script to recognize the env variables when they were in the rc.config.d directory, so I placed them directly in the script which seems to have worked, but the process still isn't starting. Can anybody give me any other ideas as to what could be wrong or what I could try? Any ideas how I can get a better error information? Below is the start/stop script - /sbin/init.d/tomcat. Can you see anything missing? Thanks in advance for everybody's input and help. #!/sbin/sh # Start/Stop for Tomcat Java Servlet Container # PATH=/sbin:/usr/sbin:/usr/bin export PATH ## Source global configuration file ##. /etc/rc.config # Needed variables 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:/o pt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/java 1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/j re/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-tom cat-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/pro duct/8.0.6/jdbc/lib/classes111.zip export CLASSPATH case $1 in start_msg) echo Starting Tomcat ;; 'start') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 21 ;; stop_msg) echo Stopping Tomcat ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac exit 0; signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Morgan Pyne [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:54 AM To: Tomcat Users List Subject: RE: Starting tomcat from init scripts (HP/UX) Have a look at /usr/share/doc/start_up.txt or /usr/share/doc/start_up.ps on a HP-UX 11.00 machine for details of how to write a startup script conforming to HP-UX's standards (for issuing messages at startup and shutdown via the 'start_msg' and 'stop_msg' parameters, honouring the settings in /etc/rc.config.d etc...). You can use any of the scripts in /sbin/init.d as a basis - modify one as appropriate and get it to simply call catalina.sh. We also modified our catalina.sh to check which userid was calling the script. If it was root it would sudo to the non-privileged user that Tomcat ran under ('tomcat'). If it was userid 'tomcat' calling it it would simply continue. If it was anyone else, it would exit with an error message. This way we get Tomcat started as a non-privileged user starting automatically on boot. Regards, Morgan -Original Message- From
Re: Starting tomcat from init scripts (HP/UX)
1 - You classpath is probably wrong - it should be tiny to allow dynamic classloading so classes may be reloaded 2 - Try using startup.sh, here is an easy way: cd /bto/appl/apache/jakarta-tomcat-4.0.4 bin/startup.sh instead of catalina.sh. 3 - Temporarily - hack the startup scripts to print crap to standard out so you can trap the error messages for more information 4 - There should be error messages somewhere - but do the above since they can't seem to be found -Tim Lott, Carey wrote: Since nobody has responded does this mean nobody has any more ideas on the problem or am I getting the You idiot. The answer is staring you in the face. silent treatment? If it is the latter, I will admit being an idiot if someone will enlighten me. If it is the former, I want to say thank you for the help I have received to this point because I am farther along then I was, and if I figure out a solution short of a cron entry I'll post it. Thanks again for the help. Carey -Original Message- From: Lott, Carey Sent: Friday, August 15, 2003 11:18 AM To: 'Tomcat Users List' Subject: RE: Starting tomcat from init scripts (HP/UX) Ok, I finally got the script to execute correctly and I got the familiar output: Using CATALINA_BASE: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_HOME: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_TMPDIR: /bto/appl/apache/jakarta-tomcat-4.0.4/temp Using JAVA_HOME: /opt/java1.4 But tomcat still isn't starting, and I am not receiving any other errors. Also the script executes fine when I do it from command line. I have placed the start/stop script in /sbin/init.d/. I have made the script be last to start and first to stop. I couldn't get the script to recognize the env variables when they were in the rc.config.d directory, so I placed them directly in the script which seems to have worked, but the process still isn't starting. Can anybody give me any other ideas as to what could be wrong or what I could try? Any ideas how I can get a better error information? Below is the start/stop script - /sbin/init.d/tomcat. Can you see anything missing? Thanks in advance for everybody's input and help. #!/sbin/sh # Start/Stop for Tomcat Java Servlet Container # PATH=/sbin:/usr/sbin:/usr/bin export PATH ## Source global configuration file ##. /etc/rc.config # Needed variables 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:/o pt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/java 1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/j re/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-tom cat-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/pro duct/8.0.6/jdbc/lib/classes111.zip export CLASSPATH case $1 in start_msg) echo Starting Tomcat ;; 'start') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 21 ;; stop_msg) echo Stopping Tomcat ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac exit 0; signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Morgan Pyne [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:54 AM To: Tomcat Users List Subject: RE: Starting tomcat from init scripts (HP/UX) Have a look at /usr/share/doc/start_up.txt or /usr/share/doc/start_up.ps on a HP-UX 11.00 machine for details of how to write a startup script conforming to HP-UX's standards (for issuing messages at startup and shutdown via the 'start_msg' and 'stop_msg' parameters, honouring the settings in /etc/rc.config.d etc...). You can use any of the scripts in /sbin/init.d as a basis - modify one
RE: Starting tomcat from init scripts (HP/UX)
Ok, I finally got the script to execute correctly and I got the familiar output: Using CATALINA_BASE: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_HOME: /bto/appl/apache/jakarta-tomcat-4.0.4 Using CATALINA_TMPDIR: /bto/appl/apache/jakarta-tomcat-4.0.4/temp Using JAVA_HOME: /opt/java1.4 But tomcat still isn't starting, and I am not receiving any other errors. Also the script executes fine when I do it from command line. I have placed the start/stop script in /sbin/init.d/. I have made the script be last to start and first to stop. I couldn't get the script to recognize the env variables when they were in the rc.config.d directory, so I placed them directly in the script which seems to have worked, but the process still isn't starting. Can anybody give me any other ideas as to what could be wrong or what I could try? Any ideas how I can get a better error information? Below is the start/stop script - /sbin/init.d/tomcat. Can you see anything missing? Thanks in advance for everybody's input and help. #!/sbin/sh # Start/Stop for Tomcat Java Servlet Container # PATH=/sbin:/usr/sbin:/usr/bin export PATH ## Source global configuration file ##. /etc/rc.config # Needed variables 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:/o pt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/java 1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/j re/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-tom cat-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/pro duct/8.0.6/jdbc/lib/classes111.zip export CLASSPATH case $1 in start_msg) echo Starting Tomcat ;; 'start') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 21 ;; stop_msg) echo Stopping Tomcat ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac exit 0; signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Morgan Pyne [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:54 AM To: Tomcat Users List Subject: RE: Starting tomcat from init scripts (HP/UX) Have a look at /usr/share/doc/start_up.txt or /usr/share/doc/start_up.ps on a HP-UX 11.00 machine for details of how to write a startup script conforming to HP-UX's standards (for issuing messages at startup and shutdown via the 'start_msg' and 'stop_msg' parameters, honouring the settings in /etc/rc.config.d etc...). You can use any of the scripts in /sbin/init.d as a basis - modify one as appropriate and get it to simply call catalina.sh. We also modified our catalina.sh to check which userid was calling the script. If it was root it would sudo to the non-privileged user that Tomcat ran under ('tomcat'). If it was userid 'tomcat' calling it it would simply continue. If it was anyone else, it would exit with an error message. This way we get Tomcat started as a non-privileged user starting automatically on boot. Regards, Morgan -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 02:11 To: Tomcat Users List Subject: RE: Starting tomcat from init scripts (HP/UX) Tim is right. In HP/UX there is a default start script (I forget what it's called). You plug in the name of your service and add any other stuff it might need. You define you service as being active somewhere else. (I know I'm not much help but it's been a while). That way when it starts you get the [OK] message. -e On Thu, 7 Aug 2003, Lott, Carey wrote: I tried calling the startup.sh instead of catalina.sh, but I had the same outcome. It executes
Re: Starting tomcat from init scripts (HP/UX)
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 21 ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac Thank you for any help you can offer. Carey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
Have a look at /usr/share/doc/start_up.txt or /usr/share/doc/start_up.ps on a HP-UX 11.00 machine for details of how to write a startup script conforming to HP-UX's standards (for issuing messages at startup and shutdown via the 'start_msg' and 'stop_msg' parameters, honouring the settings in /etc/rc.config.d etc...). You can use any of the scripts in /sbin/init.d as a basis - modify one as appropriate and get it to simply call catalina.sh. We also modified our catalina.sh to check which userid was calling the script. If it was root it would sudo to the non-privileged user that Tomcat ran under ('tomcat'). If it was userid 'tomcat' calling it it would simply continue. If it was anyone else, it would exit with an error message. This way we get Tomcat started as a non-privileged user starting automatically on boot. Regards, Morgan -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 02:11 To: Tomcat Users List Subject: RE: Starting tomcat from init scripts (HP/UX) Tim is right. In HP/UX there is a default start script (I forget what it's called). You plug in the name of your service and add any other stuff it might need. You define you service as being active somewhere else. (I know I'm not much help but it's been a while). That way when it starts you get the [OK] message. -e On Thu, 7 Aug 2003, Lott, Carey wrote: I tried calling the startup.sh instead of catalina.sh, but I had the same outcome. It executes the first part of the script which displays the variables that are being used, but it doesn't do anything more. We haven't been able to find any errors to give us an idea of what the problem is. I'm sorry I think I forgot to say in the initial email that I am running Tomcat 4.0.4 on HP/UX 11.00. I appreciate any suggestions you can offer. signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:11 PM To: Tomcat Users List Subject: Re: Starting tomcat from init scripts (HP/UX) 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. ja r:/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:/o pt/jav a1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/ja va1.4/ jre/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/j ava1.4 /jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jaka rta-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/ora cle/pr oduct/8.0.6/jdbc/lib/classes111.zip export CLASSPATH
Re: Starting tomcat from init scripts (HP/UX)
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 21 ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac Thank you for any help you can offer. Carey signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 21 ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac Thank you for any help you can offer. Carey signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
I tried calling the startup.sh instead of catalina.sh, but I had the same outcome. It executes the first part of the script which displays the variables that are being used, but it doesn't do anything more. We haven't been able to find any errors to give us an idea of what the problem is. I'm sorry I think I forgot to say in the initial email that I am running Tomcat 4.0.4 on HP/UX 11.00. I appreciate any suggestions you can offer. signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:11 PM To: Tomcat Users List Subject: Re: Starting tomcat from init scripts (HP/UX) 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.ja r:/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 21 ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac Thank you for any help you can offer. Carey signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
Tim is right. In HP/UX there is a default start script (I forget what it's called). You plug in the name of your service and add any other stuff it might need. You define you service as being active somewhere else. (I know I'm not much help but it's been a while). That way when it starts you get the [OK] message. -e On Thu, 7 Aug 2003, Lott, Carey wrote: I tried calling the startup.sh instead of catalina.sh, but I had the same outcome. It executes the first part of the script which displays the variables that are being used, but it doesn't do anything more. We haven't been able to find any errors to give us an idea of what the problem is. I'm sorry I think I forgot to say in the initial email that I am running Tomcat 4.0.4 on HP/UX 11.00. I appreciate any suggestions you can offer. signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:11 PM To: Tomcat Users List Subject: Re: Starting tomcat from init scripts (HP/UX) 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.ja r:/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 21 ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac Thank you for any help you can offer. Carey signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Starting tomcat from init scripts (HP/UX)
Hi All, Tomcat starts fine if I call startup.sh manually, but not if it is called from the init scripts when the HP/UX box starts. When trying to start tomcat from the init scripts when the HP/UX box is booting, tomcat seems to start up fine but then on the last line in catalina.out it just says that it is shuttong down and that's the end of it. So the logs are not very useful for helping me figure out what the problem might be. Has anyone encountered this problem, and what was the fix? Thanks, Pascal Forget -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
Your init scripts do not have the same environment as your login environment. That is, whe you login, things like JAVA_HOME and CATALINA_HOME are set. When you run a script through init, they aren't. Change your init script to set the values of JAVA_HOME and CATALINA_HOME, or source the login files (like /etc/profile, perhaps) where those variables are declared and set. John -Original Message- From: Pascal Forget [mailto:[EMAIL PROTECTED]] Sent: Monday, January 27, 2003 9:44 AM To: Tomcat Users List Subject: Starting tomcat from init scripts (HP/UX) Hi All, Tomcat starts fine if I call startup.sh manually, but not if it is called from the init scripts when the HP/UX box starts. When trying to start tomcat from the init scripts when the HP/UX box is booting, tomcat seems to start up fine but then on the last line in catalina.out it just says that it is shuttong down and that's the end of it. So the logs are not very useful for helping me figure out what the problem might be. Has anyone encountered this problem, and what was the fix? Thanks, Pascal Forget -- 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: Starting tomcat from init scripts (HP/UX)
Thanks for the tip, John. I already set CATALINA_HOME and JAVA_HOME near the top of catalina.sh for that very reason, so maybe it's something else in the environment. Anyway your email provided us with a good hint on what we should look for. Thanks! Pascal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Starting tomcat from init scripts (HP/UX)
Yeah we had wacky issues with that too. We had some incomptentant admins who tried starting up tomcat before the network was brought up. We also ran into wacky shell behavior (can't remember the specifics) that java did not like to start on boot from any run level. I think in the end we added an entry to /etc/inittab to a internally written/adapted script which takes one arg of stop/start ... and does the appropriate action to all our tomcat instances. I can post the script if I can get permission. Its a hard thing to test because in our 2+ yrs with our HPUX boxes - we rebooted them twice. (And that was because the box needed moved across the country) -Tim Pascal Forget wrote: Hi All, Tomcat starts fine if I call startup.sh manually, but not if it is called from the init scripts when the HP/UX box starts. When trying to start tomcat from the init scripts when the HP/UX box is booting, tomcat seems to start up fine but then on the last line in catalina.out it just says that it is shuttong down and that's the end of it. So the logs are not very useful for helping me figure out what the problem might be. Has anyone encountered this problem, and what was the fix? Thanks, Pascal Forget -- 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: Starting tomcat from init scripts (HP/UX)
Does your init script call catalina.sh directly? John -Original Message- From: Pascal Forget [mailto:[EMAIL PROTECTED]] Sent: Monday, January 27, 2003 10:17 AM To: Tomcat Users List Subject: Re: Starting tomcat from init scripts (HP/UX) Thanks for the tip, John. I already set CATALINA_HOME and JAVA_HOME near the top of catalina.sh for that very reason, so maybe it's something else in the environment. Anyway your email provided us with a good hint on what we should look for. Thanks! Pascal -- 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]