请教有关RedHat As4 下安装 Heartbeat,主机正常运行,备机自行启动
我现在测试环境的网络架构比较简单,主机地址: 178.78.8.210
备机地址: 178.78.8.250
虚拟 IP: 178.78.8.220
relaSrv: 178.78.8.200;178.78.8.201
用LVS集群,负责负载均衡采用 DR 模式;
所有电脑在同一网段,主机和备机只有一块网卡,两者之间也只是网线连接。
hearbeat软件只有在备机上安装,而且配置文件如下:
ha.cf
========================================
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
warntime 10
initdead 30
udpport 694
ucast eth0 168.68.8.210
auto_failback on
node linux3.hzbank.com
node linux4.hzbank.com
haresources
========================================
linux3.hzbank.com IPaddr::178.78.8.220/24/178.78.8.255 ipvsadm ldirectord::/etc/ha.d/ldirectord.cf
authkey
========================================
auth 1
1 crc
ldirectord.cf
========================================
checktimeout=3
checkinterval=1
#fallback=127.0.0.1:80
autoreload=yes
logfile="/var/log/ldirectord.log"
#logfile="local0"
quiescent=yes
ha-log的现象
========================================
heartbeat: 2007/01/11_19:32:35 info: **************************
heartbeat: 2007/01/11_19:32:35 info: Configuration validated. Starting heartbeat 1.2.3.cvs.20050927
heartbeat: 2007/01/11_19:32:35 info: heartbeat: version 1.2.3.cvs.20050927
heartbeat: 2007/01/11_19:32:35 info: Heartbeat generation: 20
heartbeat: 2007/01/11_19:32:35 info: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
heartbeat: 2007/01/11_19:32:35 info: ucast: bound send socket to device: eth0
heartbeat: 2007/01/11_19:32:35 info: ucast: bound receive socket to device: eth0
heartbeat: 2007/01/11_19:32:35 info: ucast: started on port 694 interface eth0 to 168.68.8.210
heartbeat: 2007/01/11_19:32:35 info: pid 10580 locked in memory.
heartbeat: 2007/01/11_19:32:35 info: Local status now set to: 'up'
heartbeat: 2007/01/11_19:32:36 info: pid 10583 locked in memory.
heartbeat: 2007/01/11_19:32:36 info: pid 10584 locked in memory.
heartbeat: 2007/01/11_19:32:36 info: pid 10585 locked in memory.
==================等待后 没有检测到对方地址,开始启动本地服务=======================
heartbeat: 2007/01/11_19:33:05 WARN: node linux3.hzbank.com: is dead
heartbeat: 2007/01/11_19:33:05 info: Local status now set to: 'active'
heartbeat: 2007/01/11_19:33:05 WARN: No STONITH device configured.
heartbeat: 2007/01/11_19:33:05 WARN: Shared disks are not protected.
heartbeat: 2007/01/11_19:33:05 info: Resources being acquired from linux3.hzbank.com.
heartbeat: 2007/01/11_19:33:05 info: Running /etc/ha.d/rc.d/status status
heartbeat: 2007/01/11_19:33:06 info: No local resources [/usr/lib/heartbeat/ResourceManager listkeys
linux4.hzbank.com] to acquire.
heartbeat: 2007/01/11_19:33:06 info: Taking over resource group IPaddr::168.68.8.220/24/168.68.8.255
heartbeat: 2007/01/11_19:33:06 info: Acquiring resource group: linux3.hzbank.com
IPaddr::168.68.8.220/24/168.68.8.255 ipvsadm ldirectord::/etc/ha.d/ldirectord.cf
heartbeat: 2007/01/11_19:33:06 info: Running /etc/ha.d/resource.d/IPaddr 168.68.8.220/24/168.68.8.255
start
heartbeat: 2007/01/11_19:33:06 info: /sbin/ifconfig eth0:0 168.68.8.220 netmask 255.255.255.0 broadcast
168.68.8.255
heartbeat: 2007/01/11_19:33:06 info: Sending Gratuitous Arp for 168.68.8.220 on eth0:0 [eth0]
heartbeat: 2007/01/11_19:33:06 /usr/lib/heartbeat/send_arp -i 1010 -r 5 -p
/var/lib/heartbeat/rsctmp/send_arp/send_arp-168.68.8.220 eth0 168.68.8.220 auto 168.68.8.220 ffffffffffff
heartbeat: 2007/01/11_19:33:06 info: Running /etc/init.d/ipvsadm start
heartbeat: 2007/01/11_19:33:06 info: Running /etc/ha.d/resource.d/ldirectord /etc/ha.d/ldirectord.cf
start
heartbeat: 2007/01/11_19:33:07 info: /usr/lib/heartbeat/mach_down: nice_failback: foreign resources
acquired
heartbeat: 2007/01/11_19:33:07 info: mach_down takeover complete.
heartbeat: 2007/01/11_19:33:07 info: Initial resource acquisition complete (mach_down)
heartbeat: 2007/01/11_19:33:07 info: mach_down takeover complete for node linux3.hzbank.com.
heartbeat: 2007/01/11_19:33:17 info: Local Resource acquisition completed. (none)
heartbeat: 2007/01/11_19:33:17 info: local resource transition completed.
Anonymous (没有被验证)
周六, 2007-01-13 12:51
Permalink
两台机器都得装heartbea
两台机器都得装heartbeat软件。
Anonymous (没有被验证)
周四, 2007-02-01 10:51
Permalink
我现在只是实现了机
我现在只是实现了机器层次的双机备份,即断电、网络中断等,但是对于服务如tomcat的宕机而非机器的宕机却无法做到备机服务的自启动,不知怎么回事?
Anonymous (没有被验证)
周日, 2007-02-04 14:13
Permalink
两台机器都装了heartbea
两台机器都装了heartbeat.我的需求是这样,假设两台机器均正常,均安装了heartbeat,且正常,没有出现网络中断或断电的情况。
其中主机的tomcat服务在运行一段时间后,其java进程因为某些原因被kill掉了或者服务被停止了,这时hearbeat监测到当前tomcat服务不存在了,于是请求备机启动tomcat,从而接管主机。
不知我这个需求heartbeat支持吗?