本帖最后由 zxcv473199162 于 2016-1-25 21:36 编辑
Starting High-Availability services: INFO: Resource is stopped
Heartbeat failure [rc=6]. Failed.
heartbeat[5917]: 2016/01/15_21:19:07 ERROR: Illegal directive [le] in /etc/ha.d//ha.cf
heartbeat: udpport setting must precede media statementsheartbeat[5917]: 2016/01/15_21:19:07 ERROR: Heartbeat not started: configuration error.
heartbeat[5917]: 2016/01/15_21:19:07 ERROR: Configuration error, heartbeat not started.
这是ha.cf 的配置
le /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
warntime 10
initdead 60
udpport 694
bcast eth0
auto_failback on
node master
node slave
ping 192.168.2.1
respawn hacluster /usr/lib/heartbeat/ipfail
Starting High-Availability services: INFO: Resource is stopped
Heartbeat failure [rc=6]. Failed.
heartbeat[5917]: 2016/01/15_21:19:07 ERROR: Illegal directive [le] in /etc/ha.d//ha.cf
heartbeat: udpport setting must precede media statementsheartbeat[5917]: 2016/01/15_21:19:07 ERROR: Heartbeat not started: configuration error.
heartbeat[5917]: 2016/01/15_21:19:07 ERROR: Configuration error, heartbeat not started.
这是ha.cf 的配置
le /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
warntime 10
initdead 60
udpport 694
bcast eth0
auto_failback on
node master
node slave
ping 192.168.2.1
respawn hacluster /usr/lib/heartbeat/ipfail
0
这是 ha。cf的配置 le /var/log/ha-debug logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 30 warntime 10 initdead 60 udpport 694 bcast eth0 auto_failback on node master node slave ping 192.168.2.1 respawn hacluster /usr/lib/heartbeat/ipfail
0
cat ha-log
Jan 15 19:36:49 master heartbeat: [2388]: ERROR: Heartbeat not started: configur ation error.
Jan 15 19:36:49 master heartbeat: [2388]: ERROR: Configuration error, heartbeat not started.
布局错误 我是按老师一步一步来的
乐橙306 发表于 2016-1-26 19:25
把 /var/log/ha-log 日志全部贴出来
看看是否有类似的报错
cat ha-log
Jan 15 19:36:49 master heartbeat: [2388]: ERROR: Heartbeat not started: configur ation error.
Jan 15 19:36:49 master heartbeat: [2388]: ERROR: Configuration error, heartbeat not started.
布局错误 我是按老师一步一步来的
0
ha-log 日志 说 ha.cf配置文件有错误
与铭哥文档里的ha.cf做了对比 发现有几个问题
铭哥 你的
1.debugfile /var/log/ha-debug le /var/log/ha-debug
2.ucast eth1 192.168.21.100 bcast eth0
#铭哥用的单播 你用的组播 单播更好 改改吧
#采取网卡eth0的udp单播来通贴心跳,ip应为对方IP,建议采取单播。当一个网段有多台如许cluster话,则必然要采取单播,不然每组cluster都邑看到对方的节点,从而报错。
zxcv473199162 发表于 2016-1-26 22:09
cat ha-log
Jan 15 19:36:49 master heartbeat: [2388]: ERROR: Heartbeat not started: configur ...
ha-log 日志 说 ha.cf配置文件有错误
与铭哥文档里的ha.cf做了对比 发现有几个问题
铭哥 你的
1.debugfile /var/log/ha-debug le /var/log/ha-debug
2.ucast eth1 192.168.21.100 bcast eth0
#铭哥用的单播 你用的组播 单播更好 改改吧
#采取网卡eth0的udp单播来通贴心跳,ip应为对方IP,建议采取单播。当一个网段有多台如许cluster话,则必然要采取单播,不然每组cluster都邑看到对方的节点,从而报错。
0
看这个帖子 http://www.apelearn.com/bbs/fo ... tbeat
第一个问题 是仲裁IP 必须与外网在同一网段 而内网是用来做心跳检查的
第二个问题 看你的系统是32位还是64位 来配置respawn hacluster /usr/lib/heartbeat/ipfail,如果是64位,那么修改如下 respawn hacluster /usr/lib64/heartbeat/ipfail
第一个问题 是仲裁IP 必须与外网在同一网段 而内网是用来做心跳检查的
第二个问题 看你的系统是32位还是64位 来配置respawn hacluster /usr/lib/heartbeat/ipfail,如果是64位,那么修改如下 respawn hacluster /usr/lib64/heartbeat/ipfail
编辑回复