Hi Ben, thanks for your very speedy reply. Please find the full file listing below: -

#!/bin/bash

APPS_BASE=/rel/apps

OLD_PWD=`pwd`

case "$1" in
  "")
    echo "$0 [all | app1 [app2]..[appN] ]";
    exit 0;
    ;;
 all)
   echo "Starting all....."
   for i in ${APPS_BASE}/[-A-Za-z0-9_]*
     do
       cd $i;
       appname=`echo $i | sed -e 's|.*/\(.*\)|\1|'`;
test -f bin/start_${appname}.sh && sh bin/start_${appname}.sh "start";
     done
    ;;
  *)
   x=0
   y=$#
   while (( $# > 0 ))
     do
      appname=${APPS_BASE}/$1
      declare -i procid
      if [ -d ${appname} ]; then
           cd ${appname};
procid=`ps ax | grep " -Dcatalina.base=${appname} " | grep -v grep | awk '{print $1}'`
           if [ "$procid" != "0" ]; then
echo "Application $1 appears to be already running (pid $procid)"
           elif [ -f bin/start_${1}.sh ]; then
               sh bin/start_${1}.sh "start"
               sleep 2;
*** line 36 *** procid=`ps ax | grep " -Dcatalina.base=${appname} " | grep -v grep | awk '{print $1}'`
               if [ "$procid" != "0" ]; then
                   echo "$1 Start OK (pid $procid)";
                   let x=x+1;
               fi
           fi
       else
         echo "Application $1 doesn't exist or is disabled";
         let procid=0;
      fi
       shift;
     done

     if [ $y -gt 1 ]; then
        echo "Started $x of $y Applications"
     fi

   ;;
esac

cd ${OLD_PWD}



ben short wrote:
Probably worth posting the /rel/tomcat/bin/start_apps.sh script as it
sounds like it could be suspect.

On 10/8/07, Ray Statham <[EMAIL PROTECTED]> wrote:
Afternoon,

This is my first posting to this list and after breifly checking the
archives I hope this question is not a duplicate: -

I have an unusual problem with my previously stable container which now
generates over 70 instance on startup. This container has been working
correctly
for over 12 months, and I am assured by our dev team that no discrete
modifications have been made. On startup this output is generated: -

start_apps MerchantAdmin
Starting MerchantAdmin............
Using CATALINA_BASE: /rel/apps/MerchantAdmin
Using CATALINA_HOME: /rel/tomcat
Using CATALINA_TMPDIR: /rel/apps/MerchantAdmin/temp
Using JAVA_HOME: /usr/lib/java
/rel/tomcat/bin/start_apps.sh: line 36: 30725
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736: syntax error in expression (error token is "30727
30728
30729
30730
30731
30732
30733
30734
30735
30736")

After a min or so, the following number of instances are running: -

 > ps aux | grep -c MerchantAdmin
71

I would be very grateful for any assistance with this problem..

Kind regards

Ray Statham

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to