Summary: Single-inst app keeps restarting in TruCluster 5.1

From: Raymond Pang <wmpang_at_se.cuhk.edu.hk>
Date: Fri, 20 Jul 2001 10:22:30 +0800

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
Received on Fri Jul 20 2001 - 02:23:46 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT