Video Screencast Help

VCS shows resource offline even though it can be started

Created: 23 Aug 2013 | 3 comments
thstettler's picture

VCS: 6.0.1

RHEL 6.4

I have several application resources, which show offline even though they are online. I can start them manually, i.e. using the commands configured in the resource. Even the StartProgram works.

Resource description:

 

runfcgipelix3 State                 <host1>  OFFLINE
runfcgipelix3 State                 <host2> OFFLINE
runfcgipelix3 CleanProgram          global        /opt/app_pelix/pelix/fcgi/runfcgipelix3.sh stop
runfcgipelix3 ComputeStats          global        0
runfcgipelix3 ContainerInfo         global        Type Name Enabled
runfcgipelix3 EnvFile               global        
runfcgipelix3 MonitorProcesses      global        
runfcgipelix3 MonitorProgram        global        /opt/app_pelix/bin/runfcgipelix3_status
runfcgipelix3 PidFiles              global        
runfcgipelix3 ResContainerInfo      global        Type Name Enabled
runfcgipelix3 ResourceInfo          global        State Stale Msg TS
runfcgipelix3 ResourceRecipients    global        
runfcgipelix3 StartProgram          global        /opt/app_pelix/pelix/fcgi/runfcgipelix3.sh start
runfcgipelix3 StopProgram           global        /opt/app_pelix/pelix/fcgi/runfcgipelix3.sh stop
runfcgipelix3 TriggerPath           global        
runfcgipelix3 TriggerResRestart     global        0
runfcgipelix3 TriggerResStateChange global        0
runfcgipelix3 TriggersEnabled       global        
runfcgipelix3 UseSUDash             global        0
runfcgipelix3 User                  global        pelix
 
Monitoring script:
 
#!/bin/sh
 
 
#. /etc/rola/minimalenv
. $HOME/.rolaenv
 
WORKDIR="$HOME/fcgi"
SOCKET="socket/fcgipelix3"
CONFIG="FCgiPelix3.conf"
 
 
case "$1" in
start)
$0 stop
sleep 1
cd $WORKDIR
nohup ./FCgiPelix3 -L -u $SOCKET -f $CONFIG < /dev/null \
> /dev/null 2>&1 &
;;
test)
$0 stop
sleep 1
cd $WORKDIR
./FCgiPelix3 -L -u $SOCKET -f $CONFIG
;;
status)
N=`abs FCgiPelix3 | wc -l`
echo "status: $N"
if [ $N -gt 0 ]; then
exit 110
else
exit 100
fi
;;
stop)
abs -k FCgiPelix3
;;
*)
echo "usage: $0 {start|stop|status|test}"
;;
esac
 
Executing the monitoring command:
root@<host1> bin]# su - pelix -c "/opt/app_pelix/pelix/fcgi/runfcgipelix3.sh status"
status: 1
[root@<host1> bin]# echo $?
110
 
The monitoring script does return the correct value, but this does not seem to get picked up by VCS.
Ther are three resources set up like this, none of them work.
 
Thank you for your help.
 
Operating Systems:

Comments 3 CommentsJump to latest comment

mikebounds's picture

UseSUDash is set to 0 and in your example from the command line you are using "su -", so you need to set UseSUDash to 1 if you want the profile of user pelix to be run.

Also MonitorProgram shows as been set to "/opt/app_pelix/bin/runfcgipelix3_status" so it is not been passed any args so yout script will return "usage" message - shouldn't this be "/opt/app_pelix/pelix/fcgi/runfcgipelix3.sh status"

 

Mike

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below

thstettler's picture

I di try and get it to work with a wrapper, which did not work either.

The UseSUDash seems to have fixed this. I knew it was something stupid like that.

 

Thank you very much.

g_lee's picture

runfcgipelix3 UseSUDash             global        0

What do you get if you run the following (without the dash, as UseSUDash = 0)?

root@<host1> bin]# su pelix -c "/opt/app_pelix/pelix/fcgi/runfcgipelix3.sh status"

[EDIT: .... oops, Mike beat me to it, and spotted another issue to boot]

If this post has helped you, please vote or mark as solution