开始心跳时,我有以下错误。 问题是什么?
# service heartbeat start Starting High-Availability services: IPaddr[16856]: INFO: Running OK ResourceManager[16833]: CRITICAL: Resource IPaddr::47.168.96.10 is active, and should not be! ResourceManager[16833]: CRITICAL: Non-idle resources can affect data integrity! ResourceManager[16833]: info: If you don't know what this means, then get help! ResourceManager[16833]: info: Read the docs and/or source to /usr/share/heartbeat/ResourceManager for more details. CRITICAL: Resource IPaddr::47.168.96.10 is active, and should not be! CRITICAL: Non-idle resources can affect data integrity! info: If you don't know what this means, then get help! info: Read the docs and/or the source to /usr/share/heartbeat/ResourceManager for more details. ResourceManager[16833]: CRITICAL: Non-idle resources will affect resource takeback! ResourceManager[16833]: CRITICAL: Non-idle resources may affect data integrity! Done.
我的界面:
eth1 Link encap:Ethernet HWaddr 00:17:a4:12:e6:ee inet addr:47.168.96.48 Bcast:47.168.96.255 Mask:255.255.255.0 inet6 addr: fe80::217:a4ff:fe12:e6ee/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1109187 errors:0 dropped:0 overruns:0 frame:0 TX packets:1144245 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:335466263 (335.4 MB) TX bytes:810577087 (810.5 MB) Interrupt:17 eth1:0 Link encap:Ethernet HWaddr 00:17:a4:12:e6:ee inet addr:47.168.96.10 Bcast:47.168.96.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:17
这里是ha.conf
logfile /var/log/ha-log debugfile /var/log/ha-debug autojoin none ucast eth1 node1 ucast eth1 node1 udpport 694 warntime 3 deadtime 5 initdead 10 keepalive 1 node node1 node2 auto_failback on
这里是hareresouces
cat haresources node1IPaddr::47.168.96.10 failback.sh
eth心跳后开始。
//NODE1 /resource.d# service heartbeat start Starting High-Availability services: IPaddr[4050]: INFO: Resource is stopped Done. /etc/heartbeat# ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:17:a4:12:e6:ee brd ff:ff:ff:ff:ff:ff inet 47.168.96.48/24 brd 47.168.96.255 scope global eth0 inet6 fe80::217:a4ff:fe12:e6ee/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether 00:04:75:f8:0a:a6 brd ff:ff:ff:ff:ff:ff inet6 fe80::204:75ff:fef8:aa6/64 scope link valid_lft forever preferred_lft forever root@node1:/etc/heartbeat# //NODE2 /resource.d# service heartbeat start Starting High-Availability services: IPaddr[4050]: INFO: Resource is stopped Done. /etc/heartbeat/resource.d# ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 80:1f:02:2f:52:d7 brd ff:ff:ff:ff:ff:ff inet6 fe80::821f:2ff:fe2f:52d7/64 scope link valid_lft forever preferred_lft forever 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:17:a4:17:52:09 brd ff:ff:ff:ff:ff:ff inet 47.168.96.46/24 brd 47.168.96.255 scope global eth0 inet6 fe80::217:a4ff:fe17:5209/64 scope link valid_lft forever preferred_lft forever root@node2:/etc/heartbeat/resource.d#
CRITICAL: Resource IPaddr::47.168.96.10 is active, and should not be!
看起来你已经设置了一个虚拟别名界面:
eth1:0 Link encap:Ethernet HWaddr 00:17:a4:12:e6:ee inet addr:47.168.96.10 Bcast:47.168.96.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:17
这是不必要的,心跳会为你做。 从/etc/network/interfaces删除此别名,然后重试。