首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Centos 6.5配置HA集群

Centos 6.5配置HA集群
EN

Server Fault用户
提问于 2014-10-05 15:33:57
回答 1查看 1.9K关注 0票数 1

我需要使用2台计算机配置HA集群。但是我遇到了一个问题,当我试图启动一个心跳服务时,它会启动,但会抛出一个错误。以下是错误消息:

代码语言:javascript
复制
Starting High-Availability services: ERROR: Cannot locate resource script IPaddr
/usr/share/heartbeat/ResourceManager: line 209: 192.168.1.199: command not found
Done.

日志文件中的输出:

代码语言:javascript
复制
Oct  3 20:00:46 localhost heartbeat: [6213]: info: Pacemaker support: false
Oct  3 20:00:46 localhost heartbeat: [6213]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
Oct  3 20:00:46 localhost heartbeat: [6213]: info: **************************
Oct  3 20:00:46 localhost heartbeat: [6213]: info: Configuration validated. Starting heartbeat 3.0.4
Oct  3 20:00:46 localhost heartbeat: [6214]: info: heartbeat: version 3.0.4
Oct  3 20:00:46 localhost heartbeat: [6214]: info: Heartbeat generation: 1411938913
Oct  3 20:00:46 localhost heartbeat: [6214]: info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
Oct  3 20:00:46 localhost heartbeat: [6214]: info: glib: ucast: bound send socket to device: eth0
Oct  3 20:00:46 localhost heartbeat: [6214]: info: glib: ucast: set SO_REUSEPORT(w)
Oct  3 20:00:46 localhost heartbeat: [6214]: info: glib: ucast: bound receive socket to device: eth0
Oct  3 20:00:46 localhost heartbeat: [6214]: info: glib: ucast: set SO_REUSEPORT(w)
Oct  3 20:00:46 localhost heartbeat: [6214]: info: glib: ucast: started on port 694 interface eth0 to 192.168.1.145
Oct  3 20:00:46 localhost heartbeat: [6214]: info: G_main_add_TriggerHandler: Added signal manual handler
Oct  3 20:00:46 localhost heartbeat: [6214]: info: G_main_add_TriggerHandler: Added signal manual handler
Oct  3 20:00:46 localhost heartbeat: [6214]: info: G_main_add_SignalHandler: Added signal handler for signal 17
Oct  3 20:00:46 localhost heartbeat: [6214]: info: Local status now set to: 'up'
Oct  3 20:00:52 localhost heartbeat: [6214]: info: Link srv2:eth0 up.
Oct  3 20:00:52 localhost heartbeat: [6214]: info: Status update for node srv2: status up
Oct  3 20:00:52 localhost heartbeat: [6224]: ERROR: cannot exec /etc/ha.d//harc
Oct  3 20:00:53 localhost heartbeat: [6214]: info: Comm_now_up(): updating status to active
Oct  3 20:00:53 localhost heartbeat: [6214]: info: Local status now set to: 'active'
Oct  3 20:00:53 localhost heartbeat: [6214]: info: Status update for node srv2: status active
Oct  3 20:00:53 localhost heartbeat: [6228]: ERROR: cannot exec /etc/ha.d//harc
Oct  3 20:01:04 localhost heartbeat: [6214]: info: remote resource transition completed.
Oct  3 20:01:04 localhost heartbeat: [6214]: info: remote resource transition completed.
Oct  3 20:01:04 localhost heartbeat: [6214]: info: Initial resource acquisition complete (T_RESOURCES(us))
Oct  3 20:01:04 localhost ResourceManager(default)[6248]: ERROR: Cannot locate resource script IPaddr
Oct  3 20:01:04 localhost heartbeat: [6214]: WARN: 1 lost packet(s) for [srv2] [22:24]
Oct  3 20:01:04 localhost heartbeat: [6214]: info: No pkts missing from srv2!
Oct  3 20:01:04 localhost heartbeat: [6214]: info: remote resource transition completed.
Oct  3 20:01:04 localhost heartbeat: [6229]: info: Local Resource acquisition completed.
Oct  3 20:01:05 localhost heartbeat: [6273]: ERROR: cannot exec /etc/ha.d//harc

这是心跳的配置。Comp1和Comp2 /etc/ha.d/authkey

代码语言:javascript
复制
auth 3
3 md5 37a747287238744a7bef7e9d52a53494

Comp1 /etc/ha.d/ha.cf

代码语言:javascript
复制
logfacility local0
keepalive 1
deadtime 10
ucast eth0 192.168.1.145
auto_failback off
node srv1
node srv2

Comp2 /etc/ha.d/ha.cf

代码语言:javascript
复制
logfacility local0
keepalive 1
deadtime 10
ucast eth0 192.168.1.146
auto_failback off
node srv1
node srv2

Comp1和Comp2 /etc/ha.d/haresources

代码语言:javascript
复制
srv1 192.168.1.199 httpd

HA集群结构:

Comp1:

主机名- srv1

知识产权- 192.168.1.146

虚拟ip - 192.168.1.199

Comp2:

主机名- srv2

知识产权- 192.168.1.145

我做错了什么?拜托救救我。谢谢!

EN

回答 1

Server Fault用户

发布于 2014-10-06 06:27:00

试一试

代码语言:javascript
复制
srv1 IPaddr::192.168.1.199/24/eth0 httpd

而不是

代码语言:javascript
复制
srv1 192.168.1.199 httpd
票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/633677

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档