banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix Nhờ giúp đỡ về heartbeat!  XML
  [Discussion]   Nhờ giúp đỡ về heartbeat! 24/11/2011 08:28:49 (+0700) | #1 | 250261
worm86ht
Member

[Minus]    0    [Plus]
Joined: 30/09/2010 02:10:22
Messages: 16
Offline
[Profile] [PM]
Hiện tại e đang config 1 hệ thống 2 web server failover.
Và e lựa chọn sử dụng Heartbeat để giải vấn đề này.
Em đã làm đi làm lại rất nhiều lần nhưng vẫn chưa fix đc, và đã thử đủ nhiều cách.
OS: CentOS 5.4

Server Active : eth0: 10.1.0.22/8
Server Passive: eth0: 10.1.0.21/8
Default gateway : 10.1.0.1
IP Web [Virtual IP] : 10.1.0.23


Đây là file config của em tại 2 server:


file authkeys

Code:
auth 1
1 crc


file ha.cf

Code:
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 10
initdead 15
warntime 5
udpport 694
bcast eth1			#interface connect via another host
auto_failback on
ping 10.1.0.1		#ping gateway for test connection
node active
node passive

file haresources

Code:
active IPaddr::10.1.0.23/8/eth0 httpd

Chỉnh sửa lại chút ít trong file httpd.conf cho nó lắng nghe trên địa chỉ 10.1.0.23
Code:
Listen 10.1.0.23:80

Sau khi chỉnh xong xuôi, start heartbeat OK hết.
Em kiểm tra xem heartbeat nó có tự động tạo IP ảo ở con active ko?
Code:
inet 10.1.0.22/8 brd 10.255.255.255 scope global eth0
inet 10.1.0.23/8 brd 10.255.255.255 scope global secondary eth0:0


Tuy nhiên[b] khi e test lại bằng cách stop service heartbeat ở server active đi thi bên server passive ko tự động đăng ký ip ảo cho eth0 của nó. (web chết luôn)
Sau đó e đã thử start heartbeat lại ở bên con Active nhưng nó cũng ko đăng ký lại ip ảo nữa.
Code:
inet 10.1.0.22/8 brd 10.255.255.255 scope global eth0



Bác nào có kinh nghiệm nhiều về heartbeat xin chỉ giáo giúp em. Em xoay với nó mãi rùi mà ko đc.
[Up] [Print Copy]
  [Discussion]   Nhờ giúp đỡ về heartbeat! 24/11/2011 12:16:53 (+0700) | #2 | 250271
worm86ht
Member

[Minus]    0    [Plus]
Joined: 30/09/2010 02:10:22
Messages: 16
Offline
[Profile] [PM]
Đã tìm ra lỗi.
vấn đề nằm ở heartbeat của con passive.
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|