设为首页收藏本站

LinuxTone | 运维专家网论坛 - 最棒的Linux运维与开源架构技术交流社区!

 找回密码
 注册

QQ登录

只需一步,快速开始

#公告#抱歉,网站将关闭,不再开放。由于PC时代已远逝 。在这个后移动互联网时代,我们继续携手前行,保持对技术的热情。共同构建linuxtone知识星球欢迎加入,一起讨论技术、招聘人才、分享资源。请新老linuxtone人 扫码移步到 知识星球:linuxtone

学习是一种信仰!分享是一种快乐!能力= 心态 * 沟通 * 知识 (你的每一天需要正能量!)

 网站的发展需要你贡献一份力量!希望你能每天坚持看贴1小时,并回答网友的问题!祝你在浏览论坛的过程中取得进步!谢谢!linuxtone加油!大家加油! 友情提示: 你今天学习了吗?你今天进步了吗?少一点抱怨!多一点进步!Life is short ! Why not linuxtone ?  

网站的发展、感谢每位坛友的努力!

查看: 4461|回复: 0

[Heartbeat] heartbeat资源故障 [复制链接]

Rank: 6Rank: 6

签到
65
注册时间
2012-3-1
最后登录
2016-12-16
在线时间
21 小时
阅读权限
70
积分
7201
帖子
14
主题
3
精华
0
UID
18309
发表于 2012-5-16 23:33:53 |显示全部楼层
今天试着配置了一下 heartbeat,但是有点小问题,不知道有没有人遇到过这个问题,并且我试验了无数次,google了无数次,的确无法解决。希望高手指点:
            服务器:server01    eth0:192.168.92.128    eth1:192.168.211.128
                          server02    eth0:192.168.92.129    eth1:192.168.211.129

server01:
       vi  /etc/sysconfig/network:
  
         NETWORKING=yes
         NETWORKING_IPV6=no
         HOSTNAME=server01

hearbeat等安装都没有问题,没有任何报错。
vi /usr/local/heartbeat/etc/ha.d/ha.cf
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility     local0
keepalive 2
deadtime 8
warntime 12
initdead 15
udpport 694
bcast   eth1            # Linux
auto_failback off
#watchdog /dev/watchdog
node    server01
node    server02
ping 192.168.211.129
respawn hacluster /usr/local/heartbeat/lib/heartbeat/ipfail

vi /usr/local/heartbeat/etc/ha.d/haresources:

         server01        IPaddr::192.168.92.188/24/eth0:0

server02上的配置差不多。只是修改了network中的HOSTNAME=server02
ha.cf中的ping  192.168.211.128 和 haresources中的   server02        IPaddr::192.168.92.188/24/eth0:0

然后我没有启动server02,或者在server02上禁止ping   echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

清空日志  echo > /var/log/ha-debug
然后监控日志  tail -f /var/log/ha-debug

在执行service  heartbeat start 启动的时候提示:
Starting High-Availability services: IPaddr[3709]: INFO:  Resource is stopped      [OK]


接着调试的日志出现:
May 17 07:17:20 server02 heartbeat: [3578]: info: Pacemaker support: false
May 17 07:17:20 server02 heartbeat: [3578]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
May 17 07:17:20 server02 heartbeat: [3578]: info: **************************
May 17 07:17:20 server02 heartbeat: [3578]: info: Configuration validated. Starting heartbeat 3.0.5
May 17 07:17:20 server02 heartbeat: [3579]: info: heartbeat: version 3.0.5
May 17 07:17:20 server02 heartbeat: [3579]: info: Heartbeat generation: 1337207292
May 17 07:17:20 server02 heartbeat: [3579]: info: glib: UDP Broadcast heartbeat started on port 694 (694) interface eth1
May 17 07:17:20 server02 heartbeat: [3579]: info: glib: UDP Broadcast heartbeat closed on port 694 interface eth1 - Status: 1
May 17 07:17:20 server02 heartbeat: [3579]: info: glib: ping heartbeat started.
May 17 07:17:20 server02 heartbeat: [3579]: info: Local status now set to: 'up'
May 17 07:17:21 server02 heartbeat: [3579]: info: Link server02:eth1 up.
May 17 07:17:21 server02 heartbeat: [3579]: WARN: G_CH_dispatch_int: Dispatch function for read child took too long to execute: 160 ms (> 50 ms) (GSource: 0x9bf9c00)
May 17 07:17:36 server02 heartbeat: [3579]: WARN: node server01: is dead
May 17 07:17:36 server02 heartbeat: [3579]: WARN: No STONITH device configured.
May 17 07:17:36 server02 heartbeat: [3579]: WARN: Shared disks are not protected.
May 17 07:17:36 server02 heartbeat: [3579]: info: Resources being acquired from server01.
May 17 07:17:36 server02 heartbeat: [3579]: WARN: node 192.168.211.128: is dead
May 17 07:17:36 server02 heartbeat: [3579]: debug: StartNextRemoteRscReq(): child count 2
May 17 07:17:36 server02 heartbeat: [3579]: info: Comm_now_up(): updating status to active
May 17 07:17:36 server02 heartbeat: [3579]: info: Local status now set to: 'active'
May 17 07:17:36 server02 heartbeat: [3579]: info: Starting child client "/usr/local/heartbeat/lib/heartbeat/ipfail" (501,501)
May 17 07:17:36 server02 heartbeat: [3588]: debug: notify_world: setting SIGCHLD Handler to SIG_DFL
May 17 07:17:36 server02 heartbeat: [3590]: info: Starting "/usr/local/heartbeat/lib/heartbeat/ipfail" as uid 501  gid 501 (pid 3590)
May 17 07:17:36 server02 heartbeat: [3579]: debug: StartNextRemoteRscReq(): child count 1
May 17 07:17:36 server02 heartbeat: [3589]: ERROR: pclose(/usr/local/heartbeat/share/heartbeat/ResourceManager listkeys server02) exited with return code 1
May 17 07:17:36 server02 heartbeat: [3589]: ERROR: [/usr/local/heartbeat/share/heartbeat/ResourceManager listkeys server02] exited with return code 1
May 17 07:17:36 server02 heartbeat: [3589]: info: No local resources [/usr/local/heartbeat/share/heartbeat/ResourceManager listkeys server02] to acquire.
May 17 07:17:36 server02 heartbeat: [3579]: info: Initial resource acquisition complete (T_RESOURCES(us))
May 17 07:17:36 server02 heartbeat: [3602]: debug: notify_world: setting SIGCHLD Handler to SIG_DFL
May 17 07:17:36 server02 ipfail: [3590]: debug: PID=3590
May 17 07:17:36 server02 ipfail: [3590]: debug: Signing in with heartbeat
May 17 07:17:36 server02 ipfail: [3590]: debug: [We are server02]
May 17 07:17:36 server02 ipfail: [3590]: debug: auto_failback -> 0 (off)
May 17 07:17:37 server02 ipfail: [3590]: debug: Setting message filter mode
May 17 07:17:37 server02 ipfail: [3590]: debug: Starting node walk
May 17 07:17:38 server02 ipfail: [3590]: debug: Cluster node: 192.168.211.128: status: dead
May 17 07:17:39 server02 ipfail: [3590]: debug: Cluster node: server02: status: active
May 17 07:17:40 server02 ipfail: [3590]: debug: Cluster node: server01: status: dead
May 17 07:17:40 server02 ipfail: [3590]: debug: [They are server01]
May 17 07:17:40 server02 ipfail: [3590]: debug: Setting message signal
May 17 07:17:41 server02 ipfail: [3590]: debug: Waiting for messages...
May 17 07:17:46 server02 heartbeat: [3579]: info: Local Resource acquisition completed. (none)
May 17 07:17:46 server02 heartbeat: [3579]: info: local resource transition completed.

但是用ifconfig 查看的时候,虚拟的ip没有添加上去,一直都不知道为啥,希望高手赐教,感激不尽。请直接回帖或者e-mail:
260999877@qq.com      谢谢
您需要登录后才可以回帖 登录 | 注册

IT运维专家网感谢您的支持

合作联系: QQ:67888954/MSN:cnseek@msn.com/mail:netseek@linuxtone.org

Archiver|手机版|感谢所有关心和支持过LinuxTone的朋友们 转载本站内容请注明原作者名及出处 ( 京ICP备08103151 )   |

GMT+8, 2019-12-6 03:20 , Processed in 0.019217 second(s), 14 queries , Apc On.

Powered by Discuz! X2 Licensed

© 2001-2011 Comsenz Inc.

回顶部