tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Raymond Pang <wmpang () se ! cuhk ! edu ! hk>
To: tru64-unix-managers
Subject: Summary: Single-inst app keeps restarting in TruCluster 5.1
Date: Fri, 20 Jul 2001 02:22:30 +0000	[thread overview]
Message-ID: <102653652421985.tru64-unix-managers.marc@archive.invalid> (raw)

Hi Mangers,

Thanks for the advise from Udo de Boer to manually run the script and check
the exit code. It turns out to be a typo in the "check" part script.

Regards,
Raymond

On Thu, Jul 19, 2001 at 04:42:22PM +0800, Raymond Pang wrote:
> 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

                 reply	other threads:[~2001-07-20  2:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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