免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2043 | 回复: 5
打印 上一主题 下一主题

关于heartbeat的一点疑问! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-04 13:23 |只看该作者 |倒序浏览
用heartbeat做双机热备。
系统为centos 5.1   heartbeat-2.1.3-3.el5.centos  lampp
安装配置一切正常。问题如下
1,主服务器如果是网线拔掉。备份服务器会自动启动lampp。当主服务器网络恢复正常的时候备份服务器会自动stop lampp
2,如果主服务器heartbeat stop。备份服务器会自动接替主服务器的工作。直到主heartbeat恢复正常。

[fly]3.如果我主服务器lampp出现故障。备份服务器没有任何反应。也不会接替主服务器的工作。不做任何动作。[/fly]

问题3有解决办法没?

论坛徽章:
0
2 [报告]
发表于 2008-06-04 19:04 |只看该作者

回复 #1 buou199 的帖子

heartbeat 2以上的版本可以真对服务进行failover

论坛徽章:
0
3 [报告]
发表于 2008-06-04 19:13 |只看该作者
具体通过什么方法??是配置:/var/lib/heartbeat/crm/cib.xml 文件然后写个脚本??

论坛徽章:
0
4 [报告]
发表于 2008-06-05 17:27 |只看该作者

回复 #3 buou199 的帖子

参考一下这个吧!这是对服务进行监控,那个脚本可以通过python自动生成的,不用自己写
http://www.chinaunix.net/jh/50/1078945.html

[ 本帖最后由 zdszdszds 于 2008-6-5 17:34 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2008-06-06 10:05 |只看该作者
谢谢。。。我按照这个做了。。可是从在一个问题

主服务器一启动heartbeat后。。lampp不停的重启。。。如果把住服务器的lampp服务器停掉的话。备份服务器的lampp也会不停的启。。。。不知道是什么原因!
我的配置文件内容如下。
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
bcast eth1
keepalive 1
warntime 5
deadtime 10
initdead 60
udpport 694
#ucast eth1 10.1.1.1
auto_failback on
node testapache1
node testapache2
crm on

testapache1 168.150.18.133 lampp



[root@testapache1 ~]# chkconfig --list |grep lampp
lampp           0:关闭  1:关闭  2:关闭  3:关闭  4:关闭  5:关闭  6:关闭

[root@testapache1 ~]# chkconfig --list |grep heartbeat
heartbeat       0:关闭  1:关闭  2:启用  3:启用  4:启用  5:启用  6:关闭


知道的麻烦指点下

论坛徽章:
0
6 [报告]
发表于 2008-06-06 17:21 |只看该作者
crmd[6002]: 2008/06/06_17:12:57 info: process_lrm_event: LRM operation lampp_2_start_0 (call=376, rc=0) complete
crmd[6002]: 2008/06/06_17:12:58 info: do_lrm_rsc_op: Performing op=lampp_2_monitor_120000 key=2:101:344f64a9-f96a-4563-9546-d847859c5d61)
lrmd[5999]: 2008/06/06_17:12:58 debug: RA output [Version: XAMPP for Linux 1.6.6
] didn't match any pattern
crmd[6002]: 2008/06/06_17:12:58 info: process_lrm_event: LRM operation lampp_2_monitor_120000 (call=377, rc=7) complete
crmd[6002]: 2008/06/06_17:13:00 info: do_lrm_rsc_op: Performing op=lampp_2_stop_0 key=3:102:344f64a9-f96a-4563-9546-d847859c5d61)
lrmd[5999]: 2008/06/06_17:13:00 info: rsc:lampp_2: stop
crmd[6002]: 2008/06/06_17:13:00 info: process_lrm_event: LRM operation lampp_2_monitor_120000 (call=377, rc=-2) Cancelled
lrmd[5999]: 2008/06/06_17:13:00 info: RA output: (lampp_2:stop:stdout) Stopping XAMPP for Linux 1.6.6...

lrmd[5999]: 2008/06/06_17:13:00 info: RA output: (lampp_2:stop:stdout) XAMPP: Stopping Apache with SSL...

lrmd[5999]: 2008/06/06_17:13:03 info: RA output: (lampp_2:stop:stdout) XAMPP: Stopping MySQL...

lrmd[5999]: 2008/06/06_17:13:05 info: RA output: (lampp_2:stop:stdout) XAMPP: Stopping ProFTPD...

lrmd[5999]: 2008/06/06_17:13:05 info: RA output: (lampp_2:stop:stdout) XAMPP stopped.

crmd[6002]: 2008/06/06_17:13:05 info: process_lrm_event: LRM operation lampp_2_stop_0 (call=378, rc=0) complete
crmd[6002]: 2008/06/06_17:13:06 info: do_lrm_rsc_op: Performing op=IPaddr_168_150_18_133_start_0 key=9:102:344f64a9-f96a-4563-9546-d847859c5d61)
lrmd[5999]: 2008/06/06_17:13:06 info: rsc:IPaddr_168_150_18_133: start
lrmd[5999]: 2008/06/06_17:13:06 info: RA output: (IPaddr_168_150_18_133:start:stderr) /etc/ha.d/shellfuncs: line 73: /var/log/ha-log: Is a directory

IPaddr[30986]:  2008/06/06_17:13:06 INFO: Using calculated nic for 168.150.18.133: eth0
lrmd[5999]: 2008/06/06_17:13:06 info: RA output: (IPaddr_168_150_18_133:start:stderr) /etc/ha.d/shellfuncs: line 73: /var/log/ha-log: Is a directory

IPaddr[30986]:  2008/06/06_17:13:06 INFO: Using calculated netmask for 168.150.18.133: 255.255.255.0
IPaddr[30986]:  2008/06/06_17:13:06 DEBUG: Using calculated broadcast for 168.150.18.133: 168.150.18.255
crmd[6002]: 2008/06/06_17:13:06 info: process_lrm_event: LRM operation IPaddr_168_150_18_133_start_0 (call=379, rc=0) complete
crmd[6002]: 2008/06/06_17:13:08 info: do_lrm_rsc_op: Performing op=IPaddr_168_150_18_133_monitor_5000 key=1:102:344f64a9-f96a-4563-9546-d847859c5d61)
crmd[6002]: 2008/06/06_17:13:08 info: do_lrm_rsc_op: Performing op=lampp_2_start_0 key=10:102:344f64a9-f96a-4563-9546-d847859c5d61)
lrmd[5999]: 2008/06/06_17:13:08 info: rsc:lampp_2: start
crmd[6002]: 2008/06/06_17:13:08 info: process_lrm_event: LRM operation IPaddr_168_150_18_133_monitor_5000 (call=375, rc=-2) Cancelled
lrmd[5999]: 2008/06/06_17:13:08 info: RA output: (lampp_2:start:stdout) Starting XAMPP for Linux 1.6.6...

crmd[6002]: 2008/06/06_17:13:08 info: process_lrm_event: LRM operation IPaddr_168_150_18_133_monitor_5000 (call=380, rc=0) complete
lrmd[5999]: 2008/06/06_17:13:08 info: RA output: (lampp_2:start:stdout) XAMPP: Starting Apache with SSL (and PHP5)...

lrmd[5999]: 2008/06/06_17:13:10 info: RA output: (lampp_2:start:stdout) XAMPP: Starting MySQL...

lrmd[5999]: 2008/06/06_17:13:10 info: RA output: (lampp_2:start:stdout) XAMPP: Starting ProFTPD...

lrmd[5999]: 2008/06/06_17:13:11 info: RA output: (lampp_2:start:stdout) XAMPP for Linux started.

crmd[6002]: 2008/06/06_17:13:11 info: process_lrm_event: LRM operation lampp_2_start_0 (call=381, rc=0) complete
crmd[6002]: 2008/06/06_17:13:12 info: do_lrm_rsc_op: Performing op=lampp_2_monitor_120000 key=2:102:344f64a9-f96a-4563-9546-d847859c5d61)
lrmd[5999]: 2008/06/06_17:13:12 debug: RA output [Version: XAMPP for Linux 1.6.6
] didn't match any pattern
crmd[6002]: 2008/06/06_17:13:12 info: process_lrm_event: LRM operation lampp_2_monitor_120000 (call=382, rc=7) complete
crmd[6002]: 2008/06/06_17:13:13 info: do_lrm_rsc_op: Performing op=lampp_2_stop_0 key=3:103:344f64a9-f96a-4563-9546-d847859c5d61)
lrmd[5999]: 2008/06/06_17:13:13 info: rsc:lampp_2: stop
crmd[6002]: 2008/06/06_17:13:13 info: process_lrm_event: LRM operation lampp_2_monitor_120000 (call=382, rc=-2) Cancelled
lrmd[5999]: 2008/06/06_17:13:13 info: RA output: (lampp_2:stop:stdout) Stopping XAMPP for Linux 1.6.6...

lrmd[5999]: 2008/06/06_17:13:13 info: RA output: (lampp_2:stop:stdout) XAMPP: Stopping Apache with SSL..


这个是日志内容不停的循环~~~谁知道这个是什么原因?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP