请教一个heartbeat的问题

请教一个heartbeat的问题
本人的集群有四部服务器,两部是真实服务器,另两部是均衡负载器load balancer,而均衡负载是使用active/slave模式,四部服务器都只是经网络线直接连至switch,两部均衡负载器load balancer未有以serial port 或网络线相互连接。

问题发生在均衡负载器(LB)身上,首先heartbeat程序已经在两部LB激活及运行(附件主(LB)log),所有外来请求都会由主[webserver2.hostname](LB)接收,发到真实服务器,而次[temp1.localdomain](LB)则备用(附件次(LB)log)。
问题1
我尝试重新激活 主(LB) ---- 直接执行shutdown now r ,在重新激活开始直至激活完成后,次(LB)完全没有接管主均衡负载器的功能,接收外来请求,最后需要重新激活次(LB)的heartbeat>>> /etc/init.d/heartbeat stop>>>>
heartbeat /etc/init.d/heartbeat start
次(LB)才能开始主均衡负载器的功能,请问错误出自哪里?

根据HA文件的要求 除了网络联机 还需要一条RJ45 to DB9的crossover cable经switch 将主负载器及次负载器连接,请问可否直接用DB9 to DB9 的serial cable 将两部主机连接? 达到ha 的功能?

Ha.cf

debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 1
deadtime 5
warntime 3
initdead 10
udpport 694
baud 19200
bcast eth0 # Linux
auto_failback on
node webserver2.hostname.com
node temp1.localdomain
ping 192.168.80.72 192.168.80.74
#ping_group group1 10.10.10.254 10.10.10.253
respawn hacluster /usr/lib/heartbeat/ipfail

主(LB)ha-log
heartbeat: 2006/09/25_06:16:22 info: **************************
heartbeat: 2006/09/25_06:16:22 info: Configuration validated. Starting heartbeat 1.2.3.cvs.20050927
heartbeat: 2006/09/25_06:16:22 info: heartbeat: version 1.2.3.cvs.20050927
heartbeat: 2006/09/25_06:16:22 info: Heartbeat generation: 98
heartbeat: 2006/09/25_06:16:22 info: UDP Broadcast heartbeat started on port 694 (694) interface eth0
heartbeat: 2006/09/25_06:16:22 info: ping heartbeat started.
heartbeat: 2006/09/25_06:16:22 info: ping heartbeat started.
heartbeat: 2006/09/25_06:16:22 info: pid 27508 locked in memory.
heartbeat: 2006/09/25_06:16:22 info: Local status now set to: 'up'
heartbeat: 2006/09/25_06:16:23 info: pid 27510 locked in memory.
heartbeat: 2006/09/25_06:16:23 info: pid 27511 locked in memory.
heartbeat: 2006/09/25_06:16:23 info: pid 27512 locked in memory.
heartbeat: 2006/09/25_06:16:23 info: Link webserver2.hostname:eth0 up.
heartbeat: 2006/09/25_06:16:23 info: pid 27513 locked in memory.
heartbeat: 2006/09/25_06:16:23 info: pid 27514 locked in memory.
heartbeat: 2006/09/25_06:16:23 info: Link 192.168.80.72:192.168.80.72 up.
heartbeat: 2006/09/25_06:16:23 info: Status update for node 192.168.80.72: status ping
heartbeat: 2006/09/25_06:16:23 info: pid 27515 locked in memory.
heartbeat: 2006/09/25_06:16:23 info: Status update for node 192.168.80.74: status ping
heartbeat: 2006/09/25_06:16:23 info: pid 27516 locked in memory.
heartbeat: 2006/09/25_06:16:23 info: Link 192.168.80.74:192.168.80.74 up.
heartbeat: 2006/09/25_06:16:32 WARN: node temp1.localdomain: is dead
heartbeat: 2006/09/25_06:16:32 info: Local status now set to: 'active'
heartbeat: 2006/09/25_06:16:32 info: Starting child client "/usr/lib/heartbeat/ipfail" (500,65)
heartbeat: 2006/09/25_06:16:32 info: Starting "/usr/lib/heartbeat/ipfail" as uid 500 gid 65 (pid 27517)
heartbeat: 2006/09/25_06:16:32 WARN: No STONITH device configured.
heartbeat: 2006/09/25_06:16:32 WARN: Shared disks are not protected.
heartbeat: 2006/09/25_06:16:32 info: Resources being acquired from temp1.localdomain.
heartbeat: 2006/09/25_06:16:32 info: Running /etc/ha.d/rc.d/status status
heartbeat: 2006/09/25_06:16:32 info: /usr/lib/heartbeat/mach_down: nice_failback: foreign resources acquired
heartbeat: 2006/09/25_06:16:32 info: mach_down takeover complete.
heartbeat: 2006/09/25_06:16:32 info: Initial resource acquisition complete (mach_down)
heartbeat: 2006/09/25_06:16:32 info: mach_down takeover complete for node temp1.localdomain.
heartbeat: 2006/09/25_06:16:32 info: Local Resource acquisition completed.
heartbeat: 2006/09/25_06:16:32 info: Running /etc/ha.d/rc.d/ip-request-resp ip-request-resp
heartbeat: 2006/09/25_06:16:32 received ip-request-resp VIP/24/eth0 OK yes
heartbeat: 2006/09/25_06:16:32 info: Acquiring resource group: webserver2.hostname VIP/24/eth0
heartbeat: 2006/09/25_06:16:32 info: Running /etc/ha.d/resource.d/IPaddr VIP/24/eth0 start
heartbeat: 2006/09/25_06:16:32 info: /sbin/ifconfig eth0:0 VIP netmask 255.255.255.0 broadcast 192.168.80.255
heartbeat: 2006/09/25_06:16:32 info: Sending Gratuitous Arp for VIP on eth0:0 [eth0]
heartbeat: 2006/09/25_06:16:32 /usr/lib/heartbeat/send_arp -i 1010 -r 5 -p /var/lib/heartbeat/rsctmp/send_arp/send_arp-VIP eth0 VIP auto VIP ffffffffffff
heartbeat: 2006/09/25_06:16:43 info: Local Resource acquisition completed. (none)
heartbeat: 2006/09/25_06:16:43 info: local resource transition completed.

次(LB)ha-log
heartbeat: 2006/09/24_14:55:07 info: **************************
heartbeat: 2006/09/24_14:55:07 info: Configuration validated. Starting heartbeat 1.2.3.cvs.20050927
heartbeat: 2006/09/24_14:55:07 info: heartbeat: version 1.2.3.cvs.20050927
heartbeat: 2006/09/24_14:55:07 info: Heartbeat generation: 119
heartbeat: 2006/09/24_14:55:07 info: UDP Broadcast heartbeat started on port 694 (694) interface eth0
heartbeat: 2006/09/24_14:55:07 info: ping heartbeat started.
heartbeat: 2006/09/24_14:55:07 info: ping heartbeat started.
heartbeat: 2006/09/24_14:55:07 info: pid 30538 locked in memory.
heartbeat: 2006/09/24_14:55:07 info: Local status now set to: 'up'
heartbeat: 2006/09/24_14:55:08 info: pid 30540 locked in memory.
heartbeat: 2006/09/24_14:55:08 info: pid 30541 locked in memory.
heartbeat: 2006/09/24_14:55:08 info: pid 30542 locked in memory.
heartbeat: 2006/09/24_14:55:08 info: Link temp1.localdomain:eth0 up.
heartbeat: 2006/09/24_14:55:08 info: pid 30543 locked in memory.
heartbeat: 2006/09/24_14:55:08 info: pid 30544 locked in memory.
heartbeat: 2006/09/24_14:55:08 info: Link 192.168.80.72:192.168.80.72 up.
heartbeat: 2006/09/24_14:55:08 info: Status update for node 192.168.80.72: status ping
heartbeat: 2006/09/24_14:55:08 info: pid 30545 locked in memory.
heartbeat: 2006/09/24_14:55:08 info: Status update for node 192.168.80.74: status ping
heartbeat: 2006/09/24_14:55:08 info: pid 30546 locked in memory.
heartbeat: 2006/09/24_14:55:08 info: Link 192.168.80.74:192.168.80.74 up.
heartbeat: 2006/09/24_14:55:17 WARN: node webserver2.hostname: is dead
heartbeat: 2006/09/24_14:55:17 info: Local status now set to: 'active'
heartbeat: 2006/09/24_14:55:17 info: Starting child client "/usr/lib/heartbeat/ipfail" (500,65)
heartbeat: 2006/09/24_14:55:17 info: Starting "/usr/lib/heartbeat/ipfail" as uid 500 gid 65 (pid 30555)
heartbeat: 2006/09/24_14:55:17 WARN: No STONITH device configured.
heartbeat: 2006/09/24_14:55:17 WARN: Shared disks are not protected.
heartbeat: 2006/09/24_14:55:17 info: Resources being acquired from webserver2.hostname.
heartbeat: 2006/09/24_14:55:17 info: Running /etc/ha.d/rc.d/status status
heartbeat: 2006/09/24_14:55:17 info: No local resources [/usr/lib/heartbeat/ResourceManager listkeys temp1.localdomain] to acquire.
heartbeat: 2006/09/24_14:55:17 info: Taking over resource group VIP/24/eth0
heartbeat: 2006/09/24_14:55:17 info: Acquiring resource group: webserver2.hostname VIP/24/eth0
heartbeat: 2006/09/24_14:55:17 info: Running /etc/ha.d/resource.d/IPaddr VIP/24/eth0 start
heartbeat: 2006/09/24_14:55:17 info: /sbin/ifconfig eth0:0 VIP netmask 255.255.255.0 broadcast 192.168.80.255
heartbeat: 2006/09/24_14:55:17 info: Sending Gratuitous Arp for VIP on eth0:0 [eth0]
heartbeat: 2006/09/24_14:55:17 /usr/lib/heartbeat/send_arp -i 1010 -r 5 -p /var/lib/heartbeat/rsctmp/send_arp/send_arp-VIP eth0 VIP auto VIP ffffffffffff
heartbeat: 2006/09/24_14:55:17 info: /usr/lib/heartbeat/mach_down: nice_failback: foreign resources acquired
heartbeat: 2006/09/24_14:55:17 info: mach_down takeover complete.
heartbeat: 2006/09/24_14:55:17 info: Initial resource acquisition complete (mach_down)
heartbeat: 2006/09/24_14:55:17 info: mach_down takeover complete for node webserver2.hostname.
heartbeat: 2006/09/24_14:55:27 info: Local Resource acquisition completed. (none)
heartbeat: 2006/09/24_14:55:27 info: local resource transition completed.

Forums:

直接用串口连接即可。
把酒当歌,黎曼几何。

谢谢maluyao的提点
另外, 我现在的主及次负载器,只是使用网络线经switch 连接出外,两者没有有串口或crossover cable接连,那heartbeat 是否不能正常运作?

那你的网线就起心跳线的作用,一般来说,用串口线最简单、经济、可靠。前两天托同事买了一根,结果没要我的钱,于是我让他下次去电脑城的时候帮我带台IBM T60回来。

把酒当歌,黎曼几何。

应该可以的,我现在用的是虚拟机,都可以实现切换功能.

randomness