tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Single-inst app keeps restarting in TruCluster 5.1
@ 2001-07-19  8:42 Raymond Pang
  0 siblings, 0 replies; only message in thread
From: Raymond Pang @ 2001-07-19  8:42 UTC (permalink / raw)
  To: tru64-unix-managers

Hi Managers,

I follow the chapter 2.11 CAA Tutorial of Highly Available Applications 
Manual to set up a single-instance application. It is found that dtcalc 
keeps restarting every minute (CHECK_INTERVAL=60?). And also because of 
RESTART_ATTEMPTS=1, it got relocated to another member on second restart. 
And then back and fore. daemon.log showed it went OFFLINE unexpectedly. 
What could be wrong? Can I have the application checked without restarting?

Attached are the profile and script and copied from the CAA Tutorial. 

TIA

Regards,
Raymond

daemon.log
==========
Jul 19 16:27:38 clusterA CAAD[524806]: `dtcalc` on `clusterA` went OFFLINE unexpectedly
Jul 19 16:27:38 clusterA CAAD[524806]: Attempting to stop `dtcalc` on member `clusterA`
Jul 19 16:27:38 clusterA CAAD[524806]: Stop of `dtcalc` on member `clusterA` succeeded.
Jul 19 16:27:38 clusterA CAAD[524806]: Restarting `dtcalc` on `clusterA` 
Jul 19 16:27:38 clusterA CAAD[524806]: Attempting to start `dtcalc` on member `clusterA` 
Jul 19 16:27:38 clusterA CAAD[524806]: Start of `dtcalc` on member `clusterA`
succeeded.  
Jul 19 16:27:38 clusterA CAAD[524806]: Successfully restarted `dtcalc` on `clusterA`

dtcalc.cap
==========
NAME=dtcalc
TYPE=application
ACTION_SCRIPT=dtcalc.scr
ACTIVE_PLACEMENT=0
AUTO_START=0
CHECK_INTERVAL=60
DESCRIPTION=dtcalc application
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=
OPTIONAL_RESOURCES=
PLACEMENT=balanced
REQUIRED_RESOURCES=
RESTART_ATTEMPTS=1
SCRIPT_TIMEOUT=60

dtcalc.scr
==========
#!/usr/bin/ksh -p
#
# This action script will be used to launch dtcalc.
#
export DISPLAY=mysystem:0
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
CAATMPDIR=/tmp
 
CMDPATH=/usr/dt/bin
 
APPLICATION=${CMDPATH}/dtcalc
 
CMD=`basename $APPLICATION`
 
case $1 in
 
 'start')  [1]
        if [ -f $APPLICATION ]; then
                $APPLICATION &           exit 0   else
                echo "Found exit1" >/dev/console
                exit 1
        fi
        ;;
 'stop')  [2]
       PIDLIST=`ps ax | grep $APPLICATION | grep -v 'caa_' \
                       | grep -v 'grep' | awk '{print $1}'`
       if [ -n "$PIDLIST" ]; then
               kill -9 $PIDLIST
               exit 0
       fi
       exit 0
       ;;
'check') [3]
       PIDLIST='ps ax | grep $CMDPATH | grep -v 'grep' | awk '{print
               $1}''
       if [ -z "$PIDLIST" ]; then
               PIDLIST=`ps ax | grep $CMD | grep -v 'grep'
                       | awk '{print $1}'`
       fi
              if [-n "$PIDLIST" ]; then
                       exit 0
               else
                echo "Error: CAA could not find $CMD." >/dev/console
                exit 1
               fi
       ;;
esac

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-19  8:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-19  8:42 Single-inst app keeps restarting in TruCluster 5.1 Raymond Pang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox