Re: ERROR Starting 2nd instance of Tomcat
Don't edit your profile. Any environment variables needed by tomcat should be provided by the service script. Just define them at the top before an processing. That isolates the second one from the first. --David Eduardo Ponce de Leon wrote: David, Thanks for the response, that is what I did. I installed a stock version in a different directory and customize it. Created a global variable for my home directory (in my profile file) but I when I run ./catalina.sh run to start it I am getting this error. Any ideas? [EMAIL PROTECTED] bin]# ./catalina.sh run Using CATALINA_BASE: /usr/local/tomcat-test Using CATALINA_HOME_TEST: /usr/local/tomcat-test Using CATALINA_TMPDIR_TEST: /usr/local/tomcat-test/temp Using JRE_HOME: /usr/lib/jvm/java WARNING: error instantiating 'org.apache.juli.ClassLoaderLogManager' referenced by java.util.logging.manager, class not found java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager not found <> WARNING: error instantiating '1catalina.org.apache.juli.FileHandler,' referenced by handlers, class not found java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler, <> Exception during runtime initialization java.lang.ExceptionInInitializerError <> Caused by: java.lang.NullPointerException <> -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2008 7:45 AM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat I'm not sure about your install layout at the moment -- whether you installed via a tomcat original distribution or some third party packaged version. If you used a third party package version, undo your efforts to duplicate the first tomcat. Then download, unarchive, and customize the second tomcat in it's own directory. Lastly customize the service scripts for the second one to look at the second one specifically. --David Eduardo Ponce de Leon wrote: David, I can´t start the newly stock tomcat version. When I try to start up tomcat by ./catalina.sh run I am getting an error which is pointing to the original tomcat version.. how can I avoid that and just start the instance Ive just installed? -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2008 10:08 AM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat I mean your command line for starting the second tomcat includes the phrase 'In the config file'. Why is that there? I doubt it's coincidence your error message contains the exact same phrase that you have on the command line. It's most likely the source of your problem. 'tomcat5-test start' should be more than enough to get the second instance going. --David Eduardo Ponce de León wrote: I'vedone that to start my second instance! Don’t I need a script to start it up? Eduardo Ponce de León Desarrollador Latino Mobile --- Moliere 450A-101, México D.F. (T) +5255 - 52 50 65 52 (M)+5255 - 55 06 37 16 (E) [EMAIL PROTECTED] --- www.latinomobile.com.mx El Mejor Contenido Latino para Móviles -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 11:38 PM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat Ok ... taking a second look at this, why on earth are you using the command 'tomcat5-test start In the config file' to start tomcat? In particular, 'In the config file' phrase has no place on the command line. --David Eduardo Ponce de León wrote: I am trying to run a 2nd instace of tomcat. For this, ive duplicated the tomcat folder and modified the server.xml files with different ports. I've also created a startup script, but when I run the script I am getting this error... Can anyone help please!! [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file Starting tomcat5-test: [ FAILED ] This is what i get in my catalina.out -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied This is my startup script... #!/bin/bash # # tomcat5 This shell script takes care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT INFO # Provides: tomcat5 # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: # Default-Stop: # Description: Release implementation for Servlet 2.4 and JSP 2.0 # Short-Description: start and stop tomcat ### END INIT INFO
RE: ERROR Starting 2nd instance of Tomcat
David, Thanks for the response, that is what I did. I installed a stock version in a different directory and customize it. Created a global variable for my home directory (in my profile file) but I when I run ./catalina.sh run to start it I am getting this error. Any ideas? [EMAIL PROTECTED] bin]# ./catalina.sh run Using CATALINA_BASE: /usr/local/tomcat-test Using CATALINA_HOME_TEST: /usr/local/tomcat-test Using CATALINA_TMPDIR_TEST: /usr/local/tomcat-test/temp Using JRE_HOME: /usr/lib/jvm/java WARNING: error instantiating 'org.apache.juli.ClassLoaderLogManager' referenced by java.util.logging.manager, class not found java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager not found <> WARNING: error instantiating '1catalina.org.apache.juli.FileHandler,' referenced by handlers, class not found java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler, <> Exception during runtime initialization java.lang.ExceptionInInitializerError <> Caused by: java.lang.NullPointerException <> -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2008 7:45 AM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat I'm not sure about your install layout at the moment -- whether you installed via a tomcat original distribution or some third party packaged version. If you used a third party package version, undo your efforts to duplicate the first tomcat. Then download, unarchive, and customize the second tomcat in it's own directory. Lastly customize the service scripts for the second one to look at the second one specifically. --David Eduardo Ponce de Leon wrote: > David, > I can´t start the newly stock tomcat version. When I try to start up tomcat > by ./catalina.sh run I am getting an error which is pointing to the original > tomcat version.. how can I avoid that and just start the instance Ive just > installed? > > > -Original Message- > From: David Smith [mailto:[EMAIL PROTECTED] > Sent: Friday, August 29, 2008 10:08 AM > To: Tomcat Users List > Subject: Re: ERROR Starting 2nd instance of Tomcat > > I mean your command line for starting the second tomcat includes the > phrase 'In the config file'. Why is that there? I doubt it's coincidence > your error message contains the exact same phrase that you have on the > command line. It's most likely the source of your problem. 'tomcat5-test > start' should be more than enough to get the second instance going. > > --David > > Eduardo Ponce de León wrote: > >> I'vedone that to start my second instance! Dont I need a script to start >> > it > >> up? >> >> Eduardo Ponce de León >> Desarrollador >> >> Latino Mobile >> --- >> Moliere 450A-101, México D.F. >> (T) +5255 - 52 50 65 52 >> (M)+5255 - 55 06 37 16 >> (E) [EMAIL PROTECTED] >> ----------- >> www.latinomobile.com.mx >> El Mejor Contenido Latino para Móviles >> >> -Original Message- >> From: David Smith [mailto:[EMAIL PROTECTED] >> Sent: Thursday, August 28, 2008 11:38 PM >> To: Tomcat Users List >> Subject: Re: ERROR Starting 2nd instance of Tomcat >> >> Ok ... taking a second look at this, why on earth are you using the >> command 'tomcat5-test start In the config file' to start tomcat? In >> particular, 'In the config file' phrase has no place on the command line. >> >> --David >> >> Eduardo Ponce de León wrote: >> >> >>> >>> >>> I am trying to run a 2nd instace of tomcat. For this, ive duplicated the >>> tomcat folder and modified the server.xml files with different ports. >>> > I've > >>> also created a startup script, but when I run the script I am getting >>> > this > >>> error... Can anyone help please!! >>> >>> [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file >>> Starting tomcat5-test: [ FAILED ] >>> >>> This is what i get in my catalina.out >>> >>> -sh: line 0: export: `In the config file': not a valid identifier >>> /bin/bash: /usr/bin/tomcat5-test: Permission denied >>> -sh: line 0: export: `In the config file': not a valid identifier >>> /bin/bash: /usr/bin/tomcat5-test: Permission denied >>> >>> This is my startup script... #!/bin/bash # # tomcat5 This shell script >>> >>> >> takes >> >>
Re: ERROR Starting 2nd instance of Tomcat
I'm not sure about your install layout at the moment -- whether you installed via a tomcat original distribution or some third party packaged version. If you used a third party package version, undo your efforts to duplicate the first tomcat. Then download, unarchive, and customize the second tomcat in it's own directory. Lastly customize the service scripts for the second one to look at the second one specifically. --David Eduardo Ponce de Leon wrote: David, I can´t start the newly stock tomcat version. When I try to start up tomcat by ./catalina.sh run I am getting an error which is pointing to the original tomcat version.. how can I avoid that and just start the instance Ive just installed? -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2008 10:08 AM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat I mean your command line for starting the second tomcat includes the phrase 'In the config file'. Why is that there? I doubt it's coincidence your error message contains the exact same phrase that you have on the command line. It's most likely the source of your problem. 'tomcat5-test start' should be more than enough to get the second instance going. --David Eduardo Ponce de León wrote: I'vedone that to start my second instance! Don’t I need a script to start it up? Eduardo Ponce de León Desarrollador Latino Mobile --- Moliere 450A-101, México D.F. (T) +5255 - 52 50 65 52 (M)+5255 - 55 06 37 16 (E) [EMAIL PROTECTED] --- www.latinomobile.com.mx El Mejor Contenido Latino para Móviles -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 11:38 PM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat Ok ... taking a second look at this, why on earth are you using the command 'tomcat5-test start In the config file' to start tomcat? In particular, 'In the config file' phrase has no place on the command line. --David Eduardo Ponce de León wrote: I am trying to run a 2nd instace of tomcat. For this, ive duplicated the tomcat folder and modified the server.xml files with different ports. I've also created a startup script, but when I run the script I am getting this error... Can anyone help please!! [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file Starting tomcat5-test: [ FAILED ] This is what i get in my catalina.out -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied This is my startup script... #!/bin/bash # # tomcat5 This shell script takes care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT INFO # Provides: tomcat5 # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: # Default-Stop: # Description: Release implementation for Servlet 2.4 and JSP 2.0 # Short-Description: start and stop tomcat ### END INIT INFO # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot # - heavily rewritten by Deepak Bhole and Jason Corley # # commented out until the RHEL and FC daemon functions converge # Source the function library #if [ -r "/etc/rc.d/init.d/functions" ]; then #. /etc/rc.d/init.d/functions #fi NAME="$(basename $0)" unset ISBOOT if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then NAME="${NAME:3}" ISBOOT="1" fi # For SELinux we need to use 'runuser' not 'su' if [ -x "/sbin/runuser" ]; then SU="/sbin/runuser" else SU="su" fi # Get the tomcat config (use this for environment specific settings) TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" if [ -r "$TOMCAT_CFG" ]; then . ${TOMCAT_CFG} fi # Get instance specific config file if [ -r "/etc/sysconfig/${NAME}" ]; then . /etc/sysconfig/${NAME} fi # Define which connector port to use CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" # Path to the script that will refresh jar symlinks on startup TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" # Tomcat program name TOMCAT_PROG="$NAME" # Define the tomcat username TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}" RETVAL="0" # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) functi
RE: ERROR Starting 2nd instance of Tomcat
David, I can´t start the newly stock tomcat version. When I try to start up tomcat by ./catalina.sh run I am getting an error which is pointing to the original tomcat version.. how can I avoid that and just start the instance Ive just installed? -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2008 10:08 AM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat I mean your command line for starting the second tomcat includes the phrase 'In the config file'. Why is that there? I doubt it's coincidence your error message contains the exact same phrase that you have on the command line. It's most likely the source of your problem. 'tomcat5-test start' should be more than enough to get the second instance going. --David Eduardo Ponce de León wrote: > I'vedone that to start my second instance! Dont I need a script to start it > up? > > Eduardo Ponce de León > Desarrollador > > Latino Mobile > --- > Moliere 450A-101, México D.F. > (T) +5255 - 52 50 65 52 > (M)+5255 - 55 06 37 16 > (E) [EMAIL PROTECTED] > --- > www.latinomobile.com.mx > El Mejor Contenido Latino para Móviles > > -Original Message- > From: David Smith [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 28, 2008 11:38 PM > To: Tomcat Users List > Subject: Re: ERROR Starting 2nd instance of Tomcat > > Ok ... taking a second look at this, why on earth are you using the > command 'tomcat5-test start In the config file' to start tomcat? In > particular, 'In the config file' phrase has no place on the command line. > > --David > > Eduardo Ponce de León wrote: > >> >> >> I am trying to run a 2nd instace of tomcat. For this, ive duplicated the >> tomcat folder and modified the server.xml files with different ports. I've >> also created a startup script, but when I run the script I am getting this >> error... Can anyone help please!! >> >> [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file >> Starting tomcat5-test: [ FAILED ] >> >> This is what i get in my catalina.out >> >> -sh: line 0: export: `In the config file': not a valid identifier >> /bin/bash: /usr/bin/tomcat5-test: Permission denied >> -sh: line 0: export: `In the config file': not a valid identifier >> /bin/bash: /usr/bin/tomcat5-test: Permission denied >> >> This is my startup script... #!/bin/bash # # tomcat5 This shell script >> > takes > >> care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN >> > INIT > >> INFO >> # Provides: tomcat5 >> # Required-Start: $network $syslog >> # Required-Stop: $network $syslog >> # Default-Start: >> # Default-Stop: >> # Description: Release implementation for Servlet 2.4 and JSP 2.0 >> # Short-Description: start and stop tomcat >> ### END INIT INFO >> # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot >> # - heavily rewritten by Deepak Bhole and Jason Corley >> # # commented out until the RHEL and FC daemon functions converge >> # Source the function library >> #if [ -r "/etc/rc.d/init.d/functions" ]; then >> #. /etc/rc.d/init.d/functions >> #fi >> NAME="$(basename $0)" >> unset ISBOOT >> if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then >> NAME="${NAME:3}" >> ISBOOT="1" >> fi >> # For SELinux we need to use 'runuser' not 'su' >> if [ -x "/sbin/runuser" ]; then >> SU="/sbin/runuser" >> else >> SU="su" >> fi >> # Get the tomcat config (use this for environment specific settings) >> TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" >> if [ -r "$TOMCAT_CFG" ]; then >> . ${TOMCAT_CFG} >> fi >> # Get instance specific config file >> if [ -r "/etc/sysconfig/${NAME}" ]; then >> . /etc/sysconfig/${NAME} >> fi >> # Define which connector port to use >> CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" >> # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" >> # Path to the script that will refresh jar symlinks on startup >> TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" >> # Tomcat program name >> TOMCAT_PROG="$NAME" >> # Define the tomcat username >> TOMCAT_USER="${TOMCAT_USER:-tomcat}" >> # Define the tom
RE: ERROR Starting 2nd instance of Tomcat
I dunno why it is there...this is in my script which calls that config file! # Get the tomcat config (use this for environment specific settings) TOMCAT_CFG="/etc/tomcat5-test/tomcat5.conf" if [ -r "$TOMCAT_CFG" ]; then . ${TOMCAT_CFG} fi -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2008 10:08 AM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat I mean your command line for starting the second tomcat includes the phrase 'In the config file'. Why is that there? I doubt it's coincidence your error message contains the exact same phrase that you have on the command line. It's most likely the source of your problem. 'tomcat5-test start' should be more than enough to get the second instance going. --David Eduardo Ponce de León wrote: > I'vedone that to start my second instance! Dont I need a script to start it > up? > > Eduardo Ponce de León > Desarrollador > > Latino Mobile > --- > Moliere 450A-101, México D.F. > (T) +5255 - 52 50 65 52 > (M)+5255 - 55 06 37 16 > (E) [EMAIL PROTECTED] > --- > www.latinomobile.com.mx > El Mejor Contenido Latino para Móviles > > -Original Message- > From: David Smith [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 28, 2008 11:38 PM > To: Tomcat Users List > Subject: Re: ERROR Starting 2nd instance of Tomcat > > Ok ... taking a second look at this, why on earth are you using the > command 'tomcat5-test start In the config file' to start tomcat? In > particular, 'In the config file' phrase has no place on the command line. > > --David > > Eduardo Ponce de León wrote: > >> >> >> I am trying to run a 2nd instace of tomcat. For this, ive duplicated the >> tomcat folder and modified the server.xml files with different ports. I've >> also created a startup script, but when I run the script I am getting this >> error... Can anyone help please!! >> >> [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file >> Starting tomcat5-test: [ FAILED ] >> >> This is what i get in my catalina.out >> >> -sh: line 0: export: `In the config file': not a valid identifier >> /bin/bash: /usr/bin/tomcat5-test: Permission denied >> -sh: line 0: export: `In the config file': not a valid identifier >> /bin/bash: /usr/bin/tomcat5-test: Permission denied >> >> This is my startup script... #!/bin/bash # # tomcat5 This shell script >> > takes > >> care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN >> > INIT > >> INFO >> # Provides: tomcat5 >> # Required-Start: $network $syslog >> # Required-Stop: $network $syslog >> # Default-Start: >> # Default-Stop: >> # Description: Release implementation for Servlet 2.4 and JSP 2.0 >> # Short-Description: start and stop tomcat >> ### END INIT INFO >> # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot >> # - heavily rewritten by Deepak Bhole and Jason Corley >> # # commented out until the RHEL and FC daemon functions converge >> # Source the function library >> #if [ -r "/etc/rc.d/init.d/functions" ]; then >> #. /etc/rc.d/init.d/functions >> #fi >> NAME="$(basename $0)" >> unset ISBOOT >> if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then >> NAME="${NAME:3}" >> ISBOOT="1" >> fi >> # For SELinux we need to use 'runuser' not 'su' >> if [ -x "/sbin/runuser" ]; then >> SU="/sbin/runuser" >> else >> SU="su" >> fi >> # Get the tomcat config (use this for environment specific settings) >> TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" >> if [ -r "$TOMCAT_CFG" ]; then >> . ${TOMCAT_CFG} >> fi >> # Get instance specific config file >> if [ -r "/etc/sysconfig/${NAME}" ]; then >> . /etc/sysconfig/${NAME} >> fi >> # Define which connector port to use >> CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" >> # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" >> # Path to the script that will refresh jar symlinks on startup >> TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" >> # Tomcat program name >> TOMCAT_PROG="$NAME" >> # Define the tomcat username >> TOMCAT_USER="${TOMCAT_USER:-tomcat}" >&
RE: ERROR Starting 2nd instance of tomcat
I reposted because I unsubscribe from my other email, only because of that!!! -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2008 10:04 AM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of tomcat Please stop reposting this. It's already in the archives for anyone who cares to go back and take a look at your original post. --David Eduardo Ponce de Leon wrote: > I am trying to run a 2nd instace of tomcat. For this, ive duplicated the > tomcat folder and modified the server.xml files with different ports. I've > also created a startup script, but when I run the script I am getting this > error... Can anyone help please!! > > [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file > Starting tomcat5-test: [ FAILED ] > > This is what i get in my catalina.out > > -sh: line 0: export: `In the config file': not a valid identifier > /bin/bash: /usr/bin/tomcat5-test: Permission denied > -sh: line 0: export: `In the config file': not a valid identifier > /bin/bash: /usr/bin/tomcat5-test: Permission denied > > This is my startup script... #!/bin/bash # # tomcat5 This shell script takes > care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT > INFO > # Provides: tomcat5 > # Required-Start: $network $syslog > # Required-Stop: $network $syslog > # Default-Start: > # Default-Stop: > # Description: Release implementation for Servlet 2.4 and JSP 2.0 > # Short-Description: start and stop tomcat > ### END INIT INFO > # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot > # - heavily rewritten by Deepak Bhole and Jason Corley > # # commented out until the RHEL and FC daemon functions converge > # Source the function library > #if [ -r "/etc/rc.d/init.d/functions" ]; then > #. /etc/rc.d/init.d/functions > #fi > NAME="$(basename $0)" > unset ISBOOT > if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then > NAME="${NAME:3}" > ISBOOT="1" > fi > # For SELinux we need to use 'runuser' not 'su' > if [ -x "/sbin/runuser" ]; then > SU="/sbin/runuser" > else > SU="su" > fi > # Get the tomcat config (use this for environment specific settings) > TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" > if [ -r "$TOMCAT_CFG" ]; then > . ${TOMCAT_CFG} > fi > # Get instance specific config file > if [ -r "/etc/sysconfig/${NAME}" ]; then > . /etc/sysconfig/${NAME} > fi > # Define which connector port to use > CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" > # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" > # Path to the script that will refresh jar symlinks on startup > TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" > # Tomcat program name > TOMCAT_PROG="$NAME" > # Define the tomcat username > TOMCAT_USER="${TOMCAT_USER:-tomcat}" > # Define the tomcat log file > TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}" > RETVAL="0" > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function checkpid() { > local i > for i in $* ; do > if [ -d "/proc/${i}" ]; then > return 0 > fi > done > return 1 > } > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function echo_failure() { > echo -en "\\033[60G " > echo -n "[ " > echo -n $"FAILED" > echo -n " ]" > echo -ne "\r" > return 1 > } > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function echo_success() { > echo -en "\\033[60G " > echo -n "[ " > echo -n $"OK" > echo -n " ]" > echo -ne "\r" > return 0 > } > # Look for open ports, as the function name might imply > function findFreePorts() { > local isSet1="false" > local isSet2="false" > local isSet3="false" > local lower="8000" > randomPort1="0" > randomPort2="0" > randomPort3="0" > local -a listeners="( $( > netstat -ntl | \ > awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}') )" > while [ "$isSet1" = "false" ] || \ > [ "$isSet2" = "false" ] || \ > [ "$isSet3" = "false" ]; do > let port="${lower}+${RANDOM:0:4}" > if [ -z `expr " ${listeners[*]} " : "
Re: ERROR Starting 2nd instance of Tomcat
I mean your command line for starting the second tomcat includes the phrase 'In the config file'. Why is that there? I doubt it's coincidence your error message contains the exact same phrase that you have on the command line. It's most likely the source of your problem. 'tomcat5-test start' should be more than enough to get the second instance going. --David Eduardo Ponce de León wrote: I'vedone that to start my second instance! Don’t I need a script to start it up? Eduardo Ponce de León Desarrollador Latino Mobile --- Moliere 450A-101, México D.F. (T) +5255 - 52 50 65 52 (M)+5255 - 55 06 37 16 (E) [EMAIL PROTECTED] --- www.latinomobile.com.mx El Mejor Contenido Latino para Móviles -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 11:38 PM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat Ok ... taking a second look at this, why on earth are you using the command 'tomcat5-test start In the config file' to start tomcat? In particular, 'In the config file' phrase has no place on the command line. --David Eduardo Ponce de León wrote: I am trying to run a 2nd instace of tomcat. For this, ive duplicated the tomcat folder and modified the server.xml files with different ports. I've also created a startup script, but when I run the script I am getting this error... Can anyone help please!! [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file Starting tomcat5-test: [ FAILED ] This is what i get in my catalina.out -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied This is my startup script... #!/bin/bash # # tomcat5 This shell script takes care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT INFO # Provides: tomcat5 # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: # Default-Stop: # Description: Release implementation for Servlet 2.4 and JSP 2.0 # Short-Description: start and stop tomcat ### END INIT INFO # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot # - heavily rewritten by Deepak Bhole and Jason Corley # # commented out until the RHEL and FC daemon functions converge # Source the function library #if [ -r "/etc/rc.d/init.d/functions" ]; then #. /etc/rc.d/init.d/functions #fi NAME="$(basename $0)" unset ISBOOT if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then NAME="${NAME:3}" ISBOOT="1" fi # For SELinux we need to use 'runuser' not 'su' if [ -x "/sbin/runuser" ]; then SU="/sbin/runuser" else SU="su" fi # Get the tomcat config (use this for environment specific settings) TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" if [ -r "$TOMCAT_CFG" ]; then . ${TOMCAT_CFG} fi # Get instance specific config file if [ -r "/etc/sysconfig/${NAME}" ]; then . /etc/sysconfig/${NAME} fi # Define which connector port to use CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" # Path to the script that will refresh jar symlinks on startup TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" # Tomcat program name TOMCAT_PROG="$NAME" # Define the tomcat username TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}" RETVAL="0" # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function checkpid() { local i for i in $* ; do if [ -d "/proc/${i}" ]; then return 0 fi done return 1 } # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function echo_failure() { echo -en "\\033[60G " echo -n "[ " echo -n $"FAILED" echo -n " ]" echo -ne "\r" return 1 } # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function echo_success() { echo -en "\\033[60G " echo -n "[ " echo -n $"OK" echo -n " ]" echo -ne "\r" return 0 } # Look for open ports, as the function name might imply function findFreePorts() { local isSet1="false" local isSet2="false" local isSet3="false" local lower="8000" randomPort1="0" randomPort2="0" randomPort3="0" local -a listeners="( $( netstat -ntl | \ aw
Re: ERROR Starting 2nd instance of tomcat
Please stop reposting this. It's already in the archives for anyone who cares to go back and take a look at your original post. --David Eduardo Ponce de Leon wrote: I am trying to run a 2nd instace of tomcat. For this, ive duplicated the tomcat folder and modified the server.xml files with different ports. I've also created a startup script, but when I run the script I am getting this error... Can anyone help please!! [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file Starting tomcat5-test: [ FAILED ] This is what i get in my catalina.out -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied This is my startup script... #!/bin/bash # # tomcat5 This shell script takes care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT INFO # Provides: tomcat5 # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: # Default-Stop: # Description: Release implementation for Servlet 2.4 and JSP 2.0 # Short-Description: start and stop tomcat ### END INIT INFO # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot # - heavily rewritten by Deepak Bhole and Jason Corley # # commented out until the RHEL and FC daemon functions converge # Source the function library #if [ -r "/etc/rc.d/init.d/functions" ]; then #. /etc/rc.d/init.d/functions #fi NAME="$(basename $0)" unset ISBOOT if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then NAME="${NAME:3}" ISBOOT="1" fi # For SELinux we need to use 'runuser' not 'su' if [ -x "/sbin/runuser" ]; then SU="/sbin/runuser" else SU="su" fi # Get the tomcat config (use this for environment specific settings) TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" if [ -r "$TOMCAT_CFG" ]; then . ${TOMCAT_CFG} fi # Get instance specific config file if [ -r "/etc/sysconfig/${NAME}" ]; then . /etc/sysconfig/${NAME} fi # Define which connector port to use CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" # Path to the script that will refresh jar symlinks on startup TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" # Tomcat program name TOMCAT_PROG="$NAME" # Define the tomcat username TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}" RETVAL="0" # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function checkpid() { local i for i in $* ; do if [ -d "/proc/${i}" ]; then return 0 fi done return 1 } # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function echo_failure() { echo -en "\\033[60G " echo -n "[ " echo -n $"FAILED" echo -n " ]" echo -ne "\r" return 1 } # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function echo_success() { echo -en "\\033[60G " echo -n "[ " echo -n $"OK" echo -n " ]" echo -ne "\r" return 0 } # Look for open ports, as the function name might imply function findFreePorts() { local isSet1="false" local isSet2="false" local isSet3="false" local lower="8000" randomPort1="0" randomPort2="0" randomPort3="0" local -a listeners="( $( netstat -ntl | \ awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}') )" while [ "$isSet1" = "false" ] || \ [ "$isSet2" = "false" ] || \ [ "$isSet3" = "false" ]; do let port="${lower}+${RANDOM:0:4}" if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then if [ "$isSet1" = "false" ]; then export randomPort1="$port" isSet1="true" elif [ "$isSet2" = "false" ]; then export randomPort2="$port" isSet2="true" elif [ "$isSet3" = "false" ]; then export randomPort3="$port" isSet3="true" fi fi done } function makeHomeDir() { if [ ! -d "$CATALINA_HOME" ]; then echo "$CATALINA_HOME does not exist, creating" if [ ! -d "/var/lib/${NAME}" ]; then mkdir -p /var/lib/${NAME} cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME} fi mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf ln -fs /var/cache/${NAME}/${i} ${CATALINA_HOME}/${i} done for i in common server shared webapps; do ln -fs /var/lib/${NAME}/${i} ${CATALINA_HOME}/${i} done ln -fs /var/log/${NAME} ${CATALINA_HOME}/logs cp -pLR /usr/share/tomcat5-test/* ${CATALINA_HOME}/conf/ cp -pLR /usr/share/tomcat5-test/bin $CATALINA_HOME cp -pLR /usr/share/tomcat5-test/* ${CATALINA_HOME}/work/ chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi } function parseOptions() { options="" options="$options $( awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \ $TOMCAT_CFG )" if [ -r "/etc/sysconfig/${NAME}" ]; then options="$options $( awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \ /etc/sysconfig/${NAME} )" fi TOMCAT_SCRIPT="$options $TOMCAT_SCRIPT" } # See how we were called. function start() { echo -n "Starting ${TOMCAT_PROG}: " if [ -f
RE: ERROR Starting 2nd instance of Tomcat
It is not a tomcat script.. I've clearly stated that I've created that script to startup the 2nd instance!! Eduardo Ponce de León Desarrollador Latino Mobile --- Moliere 450A-101, México D.F. (T) +5255 - 52 50 65 52 (M)+5255 - 55 06 37 16 (E) [EMAIL PROTECTED] --- www.latinomobile.com.mx El Mejor Contenido Latino para Móviles -Original Message- From: Len Popp [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 10:49 PM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat Where does that "In the config file" come from? It's not in a Tomcat script, is it? -- Len On Thu, Aug 28, 2008 at 18:54, Eduardo Ponce de León <[EMAIL PROTECTED]> wrote: > > > I am trying to run a 2nd instace of tomcat. For this, ive duplicated the > tomcat folder and modified the server.xml files with different ports. I've > also created a startup script, but when I run the script I am getting this > error... Can anyone help please!! > > [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file > Starting tomcat5-test: [ FAILED ] > > This is what i get in my catalina.out > > -sh: line 0: export: `In the config file': not a valid identifier > /bin/bash: /usr/bin/tomcat5-test: Permission denied > -sh: line 0: export: `In the config file': not a valid identifier > /bin/bash: /usr/bin/tomcat5-test: Permission denied > > This is my startup script... #!/bin/bash # # tomcat5 This shell script takes > care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT > INFO > # Provides: tomcat5 > # Required-Start: $network $syslog > # Required-Stop: $network $syslog > # Default-Start: > # Default-Stop: > # Description: Release implementation for Servlet 2.4 and JSP 2.0 > # Short-Description: start and stop tomcat > ### END INIT INFO > # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot > # - heavily rewritten by Deepak Bhole and Jason Corley > # # commented out until the RHEL and FC daemon functions converge > # Source the function library > #if [ -r "/etc/rc.d/init.d/functions" ]; then > #. /etc/rc.d/init.d/functions > #fi > NAME="$(basename $0)" > unset ISBOOT > if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then > NAME="${NAME:3}" > ISBOOT="1" > fi > # For SELinux we need to use 'runuser' not 'su' > if [ -x "/sbin/runuser" ]; then > SU="/sbin/runuser" > else > SU="su" > fi > # Get the tomcat config (use this for environment specific settings) > TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" > if [ -r "$TOMCAT_CFG" ]; then > . ${TOMCAT_CFG} > fi > # Get instance specific config file > if [ -r "/etc/sysconfig/${NAME}" ]; then > . /etc/sysconfig/${NAME} > fi > # Define which connector port to use > CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" > # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" > # Path to the script that will refresh jar symlinks on startup > TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" > # Tomcat program name > TOMCAT_PROG="$NAME" > # Define the tomcat username > TOMCAT_USER="${TOMCAT_USER:-tomcat}" > # Define the tomcat log file > TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}" > RETVAL="0" > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function checkpid() { > local i > for i in $* ; do > if [ -d "/proc/${i}" ]; then > return 0 > fi > done > return 1 > } > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function echo_failure() { > echo -en "\\033[60G " > echo -n "[ " > echo -n $"FAILED" > echo -n " ]" > echo -ne "\r" > return 1 > } > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function echo_success() { > echo -en "\\033[60G " > echo -n "[ " > echo -n $"OK" > echo -n " ]" > echo -ne "\r" > return 0 > } > # Look for open ports, as the function name might imply > function findFreePorts() { > local isSet1="false" > local isSet2="false" > local isSet3="false" > local lower="8000" > randomPort1="0" > randomPort2="0" > randomPort3="0" > local -a listeners="
RE: ERROR Starting 2nd instance of Tomcat
I'vedone that to start my second instance! Dont I need a script to start it up? Eduardo Ponce de León Desarrollador Latino Mobile --- Moliere 450A-101, México D.F. (T) +5255 - 52 50 65 52 (M)+5255 - 55 06 37 16 (E)[EMAIL PROTECTED] --- www.latinomobile.com.mx El Mejor Contenido Latino para Móviles -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 11:38 PM To: Tomcat Users List Subject: Re: ERROR Starting 2nd instance of Tomcat Ok ... taking a second look at this, why on earth are you using the command 'tomcat5-test start In the config file' to start tomcat? In particular, 'In the config file' phrase has no place on the command line. --David Eduardo Ponce de León wrote: > > > I am trying to run a 2nd instace of tomcat. For this, ive duplicated the > tomcat folder and modified the server.xml files with different ports. I've > also created a startup script, but when I run the script I am getting this > error... Can anyone help please!! > > [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file > Starting tomcat5-test: [ FAILED ] > > This is what i get in my catalina.out > > -sh: line 0: export: `In the config file': not a valid identifier > /bin/bash: /usr/bin/tomcat5-test: Permission denied > -sh: line 0: export: `In the config file': not a valid identifier > /bin/bash: /usr/bin/tomcat5-test: Permission denied > > This is my startup script... #!/bin/bash # # tomcat5 This shell script takes > care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT > INFO > # Provides: tomcat5 > # Required-Start: $network $syslog > # Required-Stop: $network $syslog > # Default-Start: > # Default-Stop: > # Description: Release implementation for Servlet 2.4 and JSP 2.0 > # Short-Description: start and stop tomcat > ### END INIT INFO > # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot > # - heavily rewritten by Deepak Bhole and Jason Corley > # # commented out until the RHEL and FC daemon functions converge > # Source the function library > #if [ -r "/etc/rc.d/init.d/functions" ]; then > #. /etc/rc.d/init.d/functions > #fi > NAME="$(basename $0)" > unset ISBOOT > if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then > NAME="${NAME:3}" > ISBOOT="1" > fi > # For SELinux we need to use 'runuser' not 'su' > if [ -x "/sbin/runuser" ]; then > SU="/sbin/runuser" > else > SU="su" > fi > # Get the tomcat config (use this for environment specific settings) > TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" > if [ -r "$TOMCAT_CFG" ]; then > . ${TOMCAT_CFG} > fi > # Get instance specific config file > if [ -r "/etc/sysconfig/${NAME}" ]; then > . /etc/sysconfig/${NAME} > fi > # Define which connector port to use > CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" > # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" > # Path to the script that will refresh jar symlinks on startup > TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" > # Tomcat program name > TOMCAT_PROG="$NAME" > # Define the tomcat username > TOMCAT_USER="${TOMCAT_USER:-tomcat}" > # Define the tomcat log file > TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}" > RETVAL="0" > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function checkpid() { > local i > for i in $* ; do > if [ -d "/proc/${i}" ]; then > return 0 > fi > done > return 1 > } > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function echo_failure() { > echo -en "\\033[60G " > echo -n "[ " > echo -n $"FAILED" > echo -n " ]" > echo -ne "\r" > return 1 > } > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function echo_success() { > echo -en "\\033[60G " > echo -n "[ " > echo -n $"OK" > echo -n " ]" > echo -ne "\r" > return 0 > } > # Look for open ports, as the function name might imply > function findFreePorts() { > local isSet1="false" > local isSet2="false" > local isSet3="false" > local lower="8000" > randomPort1="0" > randomPort2="0" > rand
Re: ERROR Starting 2nd instance of Tomcat
Ok ... taking a second look at this, why on earth are you using the command 'tomcat5-test start In the config file' to start tomcat? In particular, 'In the config file' phrase has no place on the command line. --David Eduardo Ponce de León wrote: I am trying to run a 2nd instace of tomcat. For this, ive duplicated the tomcat folder and modified the server.xml files with different ports. I've also created a startup script, but when I run the script I am getting this error... Can anyone help please!! [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file Starting tomcat5-test: [ FAILED ] This is what i get in my catalina.out -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied -sh: line 0: export: `In the config file': not a valid identifier /bin/bash: /usr/bin/tomcat5-test: Permission denied This is my startup script... #!/bin/bash # # tomcat5 This shell script takes care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT INFO # Provides: tomcat5 # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: # Default-Stop: # Description: Release implementation for Servlet 2.4 and JSP 2.0 # Short-Description: start and stop tomcat ### END INIT INFO # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot # - heavily rewritten by Deepak Bhole and Jason Corley # # commented out until the RHEL and FC daemon functions converge # Source the function library #if [ -r "/etc/rc.d/init.d/functions" ]; then #. /etc/rc.d/init.d/functions #fi NAME="$(basename $0)" unset ISBOOT if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then NAME="${NAME:3}" ISBOOT="1" fi # For SELinux we need to use 'runuser' not 'su' if [ -x "/sbin/runuser" ]; then SU="/sbin/runuser" else SU="su" fi # Get the tomcat config (use this for environment specific settings) TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" if [ -r "$TOMCAT_CFG" ]; then . ${TOMCAT_CFG} fi # Get instance specific config file if [ -r "/etc/sysconfig/${NAME}" ]; then . /etc/sysconfig/${NAME} fi # Define which connector port to use CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" # Path to the script that will refresh jar symlinks on startup TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" # Tomcat program name TOMCAT_PROG="$NAME" # Define the tomcat username TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}" RETVAL="0" # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function checkpid() { local i for i in $* ; do if [ -d "/proc/${i}" ]; then return 0 fi done return 1 } # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function echo_failure() { echo -en "\\033[60G " echo -n "[ " echo -n $"FAILED" echo -n " ]" echo -ne "\r" return 1 } # remove when the RHEL and FC daemon functions converge # (pulled from /etc/rc.d/init.d/functions) function echo_success() { echo -en "\\033[60G " echo -n "[ " echo -n $"OK" echo -n " ]" echo -ne "\r" return 0 } # Look for open ports, as the function name might imply function findFreePorts() { local isSet1="false" local isSet2="false" local isSet3="false" local lower="8000" randomPort1="0" randomPort2="0" randomPort3="0" local -a listeners="( $( netstat -ntl | \ awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}') )" while [ "$isSet1" = "false" ] || \ [ "$isSet2" = "false" ] || \ [ "$isSet3" = "false" ]; do let port="${lower}+${RANDOM:0:4}" if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then if [ "$isSet1" = "false" ]; then export randomPort1="$port" isSet1="true" elif [ "$isSet2" = "false" ]; then export randomPort2="$port" isSet2="true" elif [ "$isSet3" = "false" ]; then export randomPort3="$port" isSet3="true" fi fi done } function makeHomeDir() { if [ ! -d "$CATALINA_HOME" ]; then echo "$CATALINA_HOME does not exist, creating" if [ ! -d "/var/lib/${NAME}" ]; then mkdir -p /var/lib/${NAME} cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME} fi mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf ln -fs /var/cache/${NAME}/${i} ${CATALINA_HOME}/${i} done for i in common server shared webapps; do ln -fs /var/lib/${NAME}/${i} ${CATALINA_HOME}/${i} done ln -fs /var/log/${NAME} ${CATALINA_HOME}/logs cp -pLR /usr/share/tomcat5-test/* ${CATALINA_HOME}/conf/ cp -pLR /usr/share/tomcat5-test/bin $CATALINA_HOME cp -pLR /usr/share/tomcat5-test/* ${CATALINA_HOME}/work/ chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi } function parseOptions() { options="" options="$options $( awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \ $TOMCAT_CFG )" if [ -r "/etc/sysconfig/${NAME}" ]; then options="$options $( awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \ /etc/sysconfig/${NAME} )" fi TOMCAT_SCRIPT="$options $TOMCAT_SCRIPT" } #
Re: ERROR Starting 2nd instance of Tomcat
Where does that "In the config file" come from? It's not in a Tomcat script, is it? -- Len On Thu, Aug 28, 2008 at 18:54, Eduardo Ponce de León <[EMAIL PROTECTED]> wrote: > > > I am trying to run a 2nd instace of tomcat. For this, ive duplicated the > tomcat folder and modified the server.xml files with different ports. I've > also created a startup script, but when I run the script I am getting this > error... Can anyone help please!! > > [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file > Starting tomcat5-test: [ FAILED ] > > This is what i get in my catalina.out > > -sh: line 0: export: `In the config file': not a valid identifier > /bin/bash: /usr/bin/tomcat5-test: Permission denied > -sh: line 0: export: `In the config file': not a valid identifier > /bin/bash: /usr/bin/tomcat5-test: Permission denied > > This is my startup script... #!/bin/bash # # tomcat5 This shell script takes > care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT > INFO > # Provides: tomcat5 > # Required-Start: $network $syslog > # Required-Stop: $network $syslog > # Default-Start: > # Default-Stop: > # Description: Release implementation for Servlet 2.4 and JSP 2.0 > # Short-Description: start and stop tomcat > ### END INIT INFO > # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot > # - heavily rewritten by Deepak Bhole and Jason Corley > # # commented out until the RHEL and FC daemon functions converge > # Source the function library > #if [ -r "/etc/rc.d/init.d/functions" ]; then > #. /etc/rc.d/init.d/functions > #fi > NAME="$(basename $0)" > unset ISBOOT > if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then > NAME="${NAME:3}" > ISBOOT="1" > fi > # For SELinux we need to use 'runuser' not 'su' > if [ -x "/sbin/runuser" ]; then > SU="/sbin/runuser" > else > SU="su" > fi > # Get the tomcat config (use this for environment specific settings) > TOMCAT_CFG="/etc/tomcat5/tomcat5.conf" > if [ -r "$TOMCAT_CFG" ]; then > . ${TOMCAT_CFG} > fi > # Get instance specific config file > if [ -r "/etc/sysconfig/${NAME}" ]; then > . /etc/sysconfig/${NAME} > fi > # Define which connector port to use > CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" > # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test" > # Path to the script that will refresh jar symlinks on startup > TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink" > # Tomcat program name > TOMCAT_PROG="$NAME" > # Define the tomcat username > TOMCAT_USER="${TOMCAT_USER:-tomcat}" > # Define the tomcat log file > TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}" > RETVAL="0" > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function checkpid() { > local i > for i in $* ; do > if [ -d "/proc/${i}" ]; then > return 0 > fi > done > return 1 > } > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function echo_failure() { > echo -en "\\033[60G " > echo -n "[ " > echo -n $"FAILED" > echo -n " ]" > echo -ne "\r" > return 1 > } > # remove when the RHEL and FC daemon functions converge > # (pulled from /etc/rc.d/init.d/functions) > function echo_success() { > echo -en "\\033[60G " > echo -n "[ " > echo -n $"OK" > echo -n " ]" > echo -ne "\r" > return 0 > } > # Look for open ports, as the function name might imply > function findFreePorts() { > local isSet1="false" > local isSet2="false" > local isSet3="false" > local lower="8000" > randomPort1="0" > randomPort2="0" > randomPort3="0" > local -a listeners="( $( > netstat -ntl | \ > awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}') )" > while [ "$isSet1" = "false" ] || \ > [ "$isSet2" = "false" ] || \ > [ "$isSet3" = "false" ]; do > let port="${lower}+${RANDOM:0:4}" > if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then > if [ "$isSet1" = "false" ]; then > export randomPort1="$port" > isSet1="true" > elif [ "$isSet2" = "false" ]; then > export randomPort2="$port" > isSet2="true" > elif [ "$isSet3" = "false" ]; then > export randomPort3="$port" > isSet3="true" > fi > fi > done > } > function makeHomeDir() { > if [ ! -d "$CATALINA_HOME" ]; then > echo "$CATALINA_HOME does not exist, creating" > if [ ! -d "/var/lib/${NAME}" ]; then > mkdir -p /var/lib/${NAME} > cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME} > fi > mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf > /var/cache/${NAME}/work /var/log/${NAME} > for i in temp work; do > ln -fs /var/cache/${NAME}/${i} > ${CATALINA_HOME}/${i} > done > for i in common server shared webapps; do > ln -fs /var/lib/${NAME}/${i} > ${CATALINA_HOME}/${i} > done > ln -fs /var/log/${NAME} ${CATALINA_HOME}/logs > cp -pLR /usr/share/tomcat5-test/* > ${CATALINA_HOME}/conf/ > cp -pLR /usr/share/tomcat5-test/bin $CATALINA_HOME > cp -pLR /usr/share/tomcat5-test/* > ${CATALINA_HOME}/work/ > chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi > } > function parseOptions() { > options="" > options="$optio