Hi All
I'm running a 2 node VRTSvcs 4.1 on Solaris 8.
I've created 2 custom resources , one's an apache web server and the other is a Mysql Db.
I've followed the instructions in the vcs-agent-developers guide and created the relevant directories and shell scripts.
The scripts are identical for the web server and for apache, but the Mysql db online script doesn’t seem to get called or is not working correctly on cluster start. The Apache resource /agent work fine.
If I manually start the mysql resource; once running , I can then use the hares commands to stop and start it- no problem. It only wont start when I issue the hastart on each node.
All I am doing is passing the path of the start-up script to the agent and running a start and stop. The monitor scripts for both web server and apache are running pgrep's.
I cant figure why the Mysql resource/agent doesn’t start but the Apache one does; I dont know where to find further debugging info , can anyone help ?
Here are snippets from my config.
main.cf
Apache_httpd andy_httpd (
ScriptPath = "/etc/rc2.d/S77apache "
)
Mysql intergrate-db (
ScriptPath = "/etc/rc2.d/S78mysql "
)
types.cf
type Apache_httpd (
str Httpd-resource
str ScriptPath
static str ArgList[] = { ScriptPath }
)
type Mysql (
str Mysql-db
str ScriptPath
static str ArgList[] = { ScriptPath }
)
agent code for the web resource# more online
#!/bin/sh
# Apache startup
echo "\nStarting: $2 start\n" >> /opt/VRTSvcs/bin/Apache_httpd/log
echo "Apache starting`date` $0 $@\n" >> /opt/VRTSvcs/bin/Apache_httpd/log
$2 start
# more offline
#!/bin/sh
#Apache shutdown
echo "Apache shutdown `date` $0 $@" >> /opt/VRTSvcs/bin/Apache_httpd/log
$2 stop
# more monitor
#!/bin/sh
if /usr/bin/pgrep -x -u 0 -P 1 httpd >/dev/null 2>&1;
then exit 110;
else exit 100;
fi
agent code for Mysql resource
# more online
#!/bin/sh
# Mysql startup
echo "\nMysql starting`date` $0 $@" >> /opt/VRTSvcs/bin/Mysql/log
echo "\nRunning: $2 start" >> /opt/VRTSvcs/bin/Mysql/log
$2 start
# more offline
#!/bin/sh
#Mysql shutdown
echo "Mysql shutdown `date` $0 $@\n" >> /opt/VRTSvcs/bin/Mysql/log
$2 stop
# more monitor
#!/bin/sh
if /usr/bin/pgrep mysqld >/dev/null 2>&1;
then exit 110;
else exit 100;
fi
Any help would be great.
Regards
Andy