Назад | Перейти на главную страницу

Centos 6.5 настройка кластера высокой доступности

Мне нужно настроить HA-кластер на 2 компьютерах. Но у меня проблема, когда я пытаюсь запустить службу Heartbeat, она запускается, но выдает ошибку. Вот сообщение об ошибке:

Starting High-Availability services: ERROR: Cannot locate resource script IPaddr
/usr/share/heartbeat/ResourceManager: line 209: 192.168.1.199: command not found
Done.

Вывод в файл журнала:

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/authkeys

auth 3
3 md5 37a747287238744a7bef7e9d52a53494

Comp1 /etc/ha.d/ha.cf

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

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

srv1 192.168.1.199 httpd

Структура кластера высокой доступности:

Comp1:

имя хоста - srv1

ip - 192.168.1.146

виртуальный ip - 192.168.1.199

Comp2:

имя хоста - srv2

ip - 192.168.1.145

Что я делаю не так? Пожалуйста помоги. Спасибо!

Проверьте, соответствуют ли соответствующие переменные в /etc/ha.d/shellfuncs установлены правильно:

: ${HA_DIR=/etc/ha.d}
: ${HA_RESOURCEDIR=$HA_DIR/resource.d}

и проверяет в /etc/init.d/heartbeat:

. $HA_DIR/shellfuncs

Пытаться

srv1 IPaddr::192.168.1.199/24/eth0 httpd

вместо того

srv1 192.168.1.199 httpd