Ok.
I use the orginal apache in /etc/ha.d/resources.apache
Here is now my haresources :
/noeud1 IPaddr::192.168.4.4
apache::/usr/local/apache-preprod/conf/httpd.conf/
and here is a part of /usr/lib/ocf/resource.d/heartbeat/apache :
/IBMHTTPD=/opt/IBMHTTPServer/bin/httpd
HTTPDLIST="/usr/local/apache-preprod/bin/httpd "
#HTTPDLIST="/usr/local/apache-preprod/bin/httpd $IBMHTTPD"
MPM=/usr/share/apache2/find_mpm
if
[ -x $MPM ]
then
HTTPDLIST="$HTTPDLIST `$MPM 2>/dev/null`"
fi
WGETOPTS="-O- -q -L"
LOCALHOST="http://localhost"
HTTPDOPTS="-DSTATUS"
DEFAULT_IBMCONFIG=/opt/IBMHTTPServer/conf/httpd.conf
DEFAULT_NORMCONFIG="/usr/local/apache-preprod/conf/httpd.conf"
/
I don't modify anything else.
Now the logs:
Node1
/heartbeat[27975]: 2008/09/03_10:34:52 info: Version 2 support: false
heartbeat[27975]: 2008/09/03_10:34:52 WARN: Logging daemon is disabled
--enabling logging daemon is recommended
heartbeat[27975]: 2008/09/03_10:34:52 info: **************************
heartbeat[27975]: 2008/09/03_10:34:52 info: Configuration validated.
Starting heartbeat 2.1.3
heartbeat[27976]: 2008/09/03_10:34:52 info: heartbeat: version 2.1.3
heartbeat[27976]: 2008/09/03_10:34:52 info: Heartbeat generation: 1217602468
heartbeat[27976]: 2008/09/03_10:34:52 info: glib: ucast: write socket
priority set to IPTOS_LOWDELAY on eth1
heartbeat[27976]: 2008/09/03_10:34:52 info: glib: ucast: bound send
socket to device: eth1
heartbeat[27976]: 2008/09/03_10:34:52 info: glib: ucast: bound receive
socket to device: eth1
heartbeat[27976]: 2008/09/03_10:34:52 info: glib: ucast: started on port
694 interface eth1 to 192.168.4.3
heartbeat[27976]: 2008/09/03_10:34:52 info: G_main_add_TriggerHandler:
Added signal manual handler
heartbeat[27976]: 2008/09/03_10:34:52 info: G_main_add_TriggerHandler:
Added signal manual handler
heartbeat[27976]: 2008/09/03_10:34:52 info: G_main_add_SignalHandler:
Added signal handler for signal 17
heartbeat[27976]: 2008/09/03_10:34:52 info: Local status now set to: 'up'
heartbeat[27976]: 2008/09/03_10:35:53 WARN: node noeud2: is dead
heartbeat[27976]: 2008/09/03_10:35:53 info: Comm_now_up(): updating
status to active
heartbeat[27976]: 2008/09/03_10:35:53 info: Local status now set to:
'active'
heartbeat[27976]: 2008/09/03_10:35:53 WARN: No STONITH device configured.
heartbeat[27976]: 2008/09/03_10:35:53 WARN: Shared disks are not protected.
heartbeat[27976]: 2008/09/03_10:35:53 info: Resources being acquired
from noeud2.
harc[27986]: 2008/09/03_10:35:53 info: Running /etc/ha.d/rc.d/status
status
mach_down[28015]: 2008/09/03_10:35:53 info:
/usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
mach_down[28015]: 2008/09/03_10:35:53 info: mach_down takeover
complete for node noeud2.
heartbeat[27976]: 2008/09/03_10:35:53 info: Initial resource acquisition
complete (T_RESOURCES(us))
heartbeat[27976]: 2008/09/03_10:35:53 info: mach_down takeover complete.
IPaddr[28060]: 2008/09/03_10:35:53 INFO: Resource is stopped
heartbeat[27987]: 2008/09/03_10:35:53 info: Local Resource acquisition
completed.
harc[28111]: 2008/09/03_10:35:53 info: Running
/etc/ha.d/rc.d/ip-request-resp ip-request-resp
ip-request-resp[28111]: 2008/09/03_10:35:53 received ip-request-resp
IPaddr::192.168.4.4 OK yes
ResourceManager[28132]: 2008/09/03_10:35:53 info: Acquiring resource
group: noeud1 IPaddr::192.168.4.4
apache::/usr/local/apache-preprod/conf/httpd.conf
IPaddr[28159]: 2008/09/03_10:35:53 INFO: Resource is stopped
ResourceManager[28132]: 2008/09/03_10:35:53 info: Running
/etc/ha.d/resource.d/IPaddr 192.168.4.4 start
IPaddr[28233]: 2008/09/03_10:35:53 INFO: Using calculated nic for
192.168.4.4: eth0
IPaddr[28233]: 2008/09/03_10:35:53 INFO: Using calculated netmask for
192.168.4.4: 255.255.255.0
IPaddr[28233]: 2008/09/03_10:35:53 INFO: eval ifconfig eth0:0
192.168.4.4 netmask 255.255.255.0 broadcast 192.168.4.255
IPaddr[28216]: 2008/09/03_10:35:53 INFO: Success
apache[28356]: 2008/09/03_10:35:53 INFO: apache not running
apache[28345]: 2008/09/03_10:35:53 INFO: Resource is stopped
ResourceManager[28132]: 2008/09/03_10:35:54 info: Running
/etc/ha.d/resource.d/apache /usr/local/apache-preprod/conf/httpd.conf start
apache[28433]: 2008/09/03_10:35:55 INFO: apache not running
apache[28433]: 2008/09/03_10:35:55 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:35:56 INFO: apache not running
apache[28433]: 2008/09/03_10:35:56 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:35:57 INFO: apache not running
apache[28433]: 2008/09/03_10:35:57 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:35:58 INFO: apache not running
apache[28433]: 2008/09/03_10:35:58 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:35:59 INFO: apache not running
apache[28433]: 2008/09/03_10:35:59 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:00 INFO: apache not running
apache[28433]: 2008/09/03_10:36:00 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:01 INFO: apache not running
apache[28433]: 2008/09/03_10:36:01 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:02 INFO: apache not running
apache[28433]: 2008/09/03_10:36:02 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:03 INFO: apache not running
apache[28433]: 2008/09/03_10:36:03 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
heartbeat[27976]: 2008/09/03_10:36:03 info: Local Resource acquisition
completed. (none)
heartbeat[27976]: 2008/09/03_10:36:03 info: local resource transition
completed.
apache[28433]: 2008/09/03_10:36:04 INFO: apache not running
apache[28433]: 2008/09/03_10:36:04 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:05 INFO: apache not running
apache[28433]: 2008/09/03_10:36:05 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:06 INFO: apache not running
apache[28433]: 2008/09/03_10:36:06 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:07 INFO: apache not running
apache[28433]: 2008/09/03_10:36:07 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:08 INFO: apache not running
apache[28433]: 2008/09/03_10:36:08 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:36:09 INFO: apache not running
apache[28433]: 2008/09/03_10:36:09 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
........................
apache[28433]: 2008/09/03_10:42:05 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:42:06 INFO: apache not running
apache[28433]: 2008/09/03_10:42:06 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up
apache[28433]: 2008/09/03_10:42:07 INFO: apache not running
apache[28433]: 2008/09/03_10:42:07 INFO: waiting for apache
/usr/local/apache-preprod/conf/httpd.conf to come up/
Node2 :
/heartbeat[3614]: 2008/09/03_10:36:17 info: Version 2 support: false
heartbeat[3614]: 2008/09/03_10:36:17 WARN: Logging daemon is disabled
--enabling logging daemon is recommended
heartbeat[3614]: 2008/09/03_10:36:17 info: **************************
heartbeat[3614]: 2008/09/03_10:36:17 info: Configuration validated.
Starting heartbeat 2.1.3
heartbeat[3615]: 2008/09/03_10:36:17 info: heartbeat: version 2.1.3
heartbeat[3615]: 2008/09/03_10:36:18 info: Heartbeat generation: 1217925553
heartbeat[3615]: 2008/09/03_10:36:18 info: glib: ucast: write socket
priority set to IPTOS_LOWDELAY on eth1
heartbeat[3615]: 2008/09/03_10:36:18 info: glib: ucast: bound send
socket to device: eth1
heartbeat[3615]: 2008/09/03_10:36:18 info: glib: ucast: bound receive
socket to device: eth1
heartbeat[3615]: 2008/09/03_10:36:18 info: glib: ucast: started on port
694 interface eth1 to 192.168.4.88
heartbeat[3615]: 2008/09/03_10:36:18 info: G_main_add_TriggerHandler:
Added signal manual handler
heartbeat[3615]: 2008/09/03_10:36:18 info: G_main_add_TriggerHandler:
Added signal manual handler
heartbeat[3615]: 2008/09/03_10:36:18 info: G_main_add_SignalHandler:
Added signal handler for signal 17
heartbeat[3615]: 2008/09/03_10:36:18 info: Local status now set to: 'up'
heartbeat[3615]: 2008/09/03_10:37:18 WARN: node noeud1: is dead
heartbeat[3615]: 2008/09/03_10:37:18 info: Comm_now_up(): updating
status to active
heartbeat[3615]: 2008/09/03_10:37:18 info: Local status now set to: 'active'
heartbeat[3615]: 2008/09/03_10:37:18 WARN: No STONITH device configured.
heartbeat[3615]: 2008/09/03_10:37:18 WARN: Shared disks are not protected.
heartbeat[3615]: 2008/09/03_10:37:18 info: Resources being acquired from
noeud1.
heartbeat[3626]: 2008/09/03_10:37:18 info: No local resources
[/usr/share/heartbeat/ResourceManager listkeys noeud2] to acquire.
heartbeat[3615]: 2008/09/03_10:37:18 info: Initial resource acquisition
complete (T_RESOURCES(us))
harc[3625]: 2008/09/03_10:37:18 info: Running /etc/ha.d/rc.d/status
status
mach_down[3654]: 2008/09/03_10:37:18 info: Taking over resource
group IPaddr::192.168.4.4
ResourceManager[3680]: 2008/09/03_10:37:18 info: Acquiring resource
group: noeud1 IPaddr::192.168.4.4 noeud1 IPaddr::192.168.4.4
apache::/usr/local/apache-preprod/conf/httpd.conf
IPaddr[3707]: 2008/09/03_10:37:19 INFO: Resource is stopped
ResourceManager[3680]: 2008/09/03_10:37:19 info: Running
/etc/ha.d/resource.d/IPaddr 192.168.4.4 start
IPaddr[3781]: 2008/09/03_10:37:19 INFO: Using calculated nic for
192.168.4.4: eth0
IPaddr[3781]: 2008/09/03_10:37:19 INFO: Using calculated netmask for
192.168.4.4: 255.255.255.0
IPaddr[3781]: 2008/09/03_10:37:19 INFO: eval ifconfig eth0:2
192.168.4.4 netmask 255.255.255.0 broadcast 192.168.4.255
IPaddr[3764]: 2008/09/03_10:37:19 INFO: Success
ResourceManager[3680]: 2008/09/03_10:37:19 ERROR: Cannot locate
resource script noeud1
ResourceManager[3680]: 2008/09/03_10:37:19 ERROR: Cannot locate
resource script noeud1
ResourceManager[3680]: 2008/09/03_10:37:19 ERROR: Cannot locate
resource script noeud1
ResourceManager[3680]: 2008/09/03_10:37:19 CRIT: Giving up resources
due to failure of noeud1
ResourceManager[3680]: 2008/09/03_10:37:19 info: Releasing resource
group: noeud1 IPaddr::192.168.4.4 noeud1 IPaddr::192.168.4.4
apache::/usr/local/apache-preprod/conf/httpd.conf
ResourceManager[3680]: 2008/09/03_10:37:19 info: Running
/etc/ha.d/resource.d/apache /usr/local/apache-preprod/conf/httpd.conf stop
apache[3959]: 2008/09/03_10:37:19 INFO: apache is not running.
apache[3948]: 2008/09/03_10:37:19 INFO: Success
ResourceManager[3680]: 2008/09/03_10:37:19 info: Running
/etc/ha.d/resource.d/IPaddr 192.168.4.4 stop
IPaddr[4042]: 2008/09/03_10:37:19 INFO: ifconfig eth0:2 down
IPaddr[4025]: 2008/09/03_10:37:19 INFO: Success
ResourceManager[3680]: 2008/09/03_10:37:19 ERROR: Cannot locate
resource script noeud1
ResourceManager[3680]: 2008/09/03_10:37:19 ERROR: Cannot locate
resource script noeud1
....
ResourceManager[3680]: 2008/09/03_10:37:28 ERROR: Cannot locate
resource script noeud1
ResourceManager[3680]: 2008/09/03_10:37:28 ERROR: Cannot locate
resource script noeud1
heartbeat[3615]: 2008/09/03_10:37:29 info: Local Resource acquisition
completed. (none)
heartbeat[3615]: 2008/09/03_10:37:29 info: local resource transition
completed.
ResourceManager[3680]: 2008/09/03_10:37:30 info: Retrying failed stop
operation [noeud1]
ResourceManager[3680]: 2008/09/03_10:37:30 ERROR: Cannot locate
resource script noeud1
ResourceManager[3680]: 2008/09/03_10:37:30 ERROR: Cannot locate
resource script noeud1
ResourceManager[3680]: 2008/09/03_10:37:30 ERROR: Cannot locate
resource script noeud1
ResourceManager[3680]: 2008/09/03_10:37:30 ERROR: Resource script for
noeud1 probably not LSB-compliant.
ResourceManager[3680]: 2008/09/03_10:37:30 WARN: it (noeud1) MUST
succeed on a stop when already stopped
ResourceManager[3680]: 2008/09/03_10:37:30 WARN: Machine reboot
narrowly avoided!
ResourceManager[3680]: 2008/09/03_10:37:30 info: Running
/etc/ha.d/resource.d/IPaddr 192.168.4.4 stop
IPaddr[4392]: 2008/09/03_10:37:30 INFO: Success
mach_down[3654]: 2008/09/03_10:37:30 info:
/usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
mach_down[3654]: 2008/09/03_10:37:30 info: mach_down takeover
complete for node noeud1.
heartbeat[3615]: 2008/09/03_10:37:30 info: mach_down takeover complete.
hb_standby[4461]: 2008/09/03_10:38:00 Going standby [foreign].
heartbeat[3615]: 2008/09/03_10:38:00 info: noeud2 wants to go standby
[foreign]
heartbeat[3615]: 2008/09/03_10:38:12 WARN: No reply to standby request.
Standby request cancelled.
heartbeat[3615]: 2008/09/03_10:41:26 info: Heartbeat shutdown in
progress. (3615)
heartbeat[4523]: 2008/09/03_10:41:26 info: Giving up all HA resources.
ResourceManager[4536]: 2008/09/03_10:41:26 info: Releasing resource
group: noeud1 IPaddr::192.168.4.4 noeud1 IPaddr::192.168.4.4
apache::/usr/local/apache-preprod/conf/httpd.conf
ResourceManager[4536]: 2008/09/03_10:41:26 info: Running
/etc/ha.d/resource.d/apache /usr/local/apache-preprod/conf/httpd.conf stop
apache[4585]: 2008/09/03_10:41:26 INFO: apache is not running.
apache[4574]: 2008/09/03_10:41:26 INFO: Success
ResourceManager[4536]: 2008/09/03_10:41:26 info: Running
/etc/ha.d/resource.d/IPaddr 192.168.4.4 stop
IPaddr[4651]: 2008/09/03_10:41:26 INFO: Success
ResourceManager[4536]: 2008/09/03_10:41:26 ERROR: Cannot locate
resource script noeud1
ResourceManager[4536]: 2008/09/03_10:41:26 ERROR: Cannot locate
resource script noeud1
ResourceManager[4536]: 2008/09/03_10:41:27 info: Retrying failed stop
operation [noeud1]
.....
ResourceManager[4536]: 2008/09/03_10:41:36 ERROR: Cannot locate
resource script noeud1
ResourceManager[4536]: 2008/09/03_10:41:36 ERROR: Resource script for
noeud1 probably not LSB-compliant.
ResourceManager[4536]: 2008/09/03_10:41:36 WARN: it (noeud1) MUST
succeed on a stop when already stopped
ResourceManager[4536]: 2008/09/03_10:41:36 WARN: Machine reboot
narrowly avoided!
ResourceManager[4536]: 2008/09/03_10:41:36 info: Running
/etc/ha.d/resource.d/IPaddr 192.168.4.4 stop
IPaddr[5008]: 2008/09/03_10:41:36 INFO: Success/
I was obliged to kill (-9) ha on my two nodes...
Well. What is wrong now ?
Thanks for you help.
Franck
Lars Marowsky-Bree a écrit :
On 2008-09-02T23:14:06, Franck Huet <[EMAIL PROTECTED]> wrote:
my haresources :
noeud1 IPaddr2::192.168.4.4 apache-preprod (where apache-preprod is a
link to /etc/init.d/apache-preprod which works fine with start and stop)
it does _not_ work with with "start" and "stop":
ResourceManager[23965]: 2008/09/02_10:27:55 info: Running
/etc/ha.d/resource.d/apache-preprod start
ResourceManager[23965]: 2008/09/02_10:27:55 ERROR: Return code 1 from
/etc/ha.d/resource.d/apache-preprod
ResourceManager[23965]: 2008/09/02_10:27:55 CRIT: Giving up resources
due to failure of apache-preprod
This is your problem. "start" returns an error. Fix that.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems