Hi to all,
I'm a student of Computer Science at University of Pisa, Italy.
I'm doing an apprenticeship, to setup a four tier cluster, with the balancer at
the top, the apache, the tomcat and database at the end.
I have only two machine available, so I have to to setup a cluster with only
this requirements, where each machine have to be at same time real server and
director (one in master state, and the other in backup state).
Each machine have it's own IP on eth0, and an ip alias on lo:0 (the VIP) for
the purpose of LVS. I use Direct Routing as forwarding method.
If I start keepalived on one machine, the director own the VIP on eth0, and the
cluster work correctly (but without failover).
When I start the second keepalived on the other machine, initially all seems to
work correctly, but after some time (about one minute) the entire network go
down and I have to stop the services to recover the network. Seem that
something (I think vrrp packets) go in loop and block the network devices.
The VRRP VIPs are:
VIP: 146.48.90.45
DIP1 and realServer1: 146.48.90.219
DIP2 and realServer2: 146.48.90.221
The configuration of keepalived are the follow:
On DIP1:
global_defs {
notification_email {
#tranisalvatore@xxxxxxxxx
}
notification_email_from director_1@xxxxxx
smtp_server 127.0.0.1
smtp_connect_timeout 30
lvs_id LVS_DIRECTOR_1
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 150
advert_int 30
authentication {
auth_type PASS
auth_pass xxxx
}
virtual_ipaddress {
146.48.90.45
}
}
virtual_server 146.48.90.45 80 {
delay_loop 3
lb_algo wlc
lb_kind DR
persistence_timeout 50
protocol TCP
real_server 146.48.90.219 80 {
weight 1
HTTP_GET {
url {
path /
status_code 200 # Can only specify a HTTP status_code
}
connect_timeout 2
nb_get_retry 2
delay_before_retry 2
}
}
real_server 146.48.90.221 80 {
weight 1
HTTP_GET {
url {
path /
status_code 200 # Can only specify a HTTP status_code
}
connect_timeout 2
nb_get_retry 2
delay_before_retry 2
}
}
}
virtual_server 146.48.90.45 443 {
delay_loop 3
lb_algo wlc
lb_kind DR
persistence_timeout 50
protocol TCP
real_server 146.48.90.219 443 {
weight 1
SSL_GET {
url {
path /
status_code 200 # Can only specify a HTTP status_code
}
connect_timeout 2
nb_get_retry 2
delay_before_retry 2
}
}
real_server 146.48.90.221 443 {
weight 1
SSL_GET {
url {
path /
status_code 200 # Can only specify a HTTP status_code
}
connect_timeout 2
nb_get_retry 2
delay_before_retry 2
}
}
}
On DIP2, symmetrically:
...
vrrp_instance VI_1 {
state BACKUP
interface eth0
virtual_router_id 51
priority 100
advert_int 30
authentication {
auth_type PASS
auth_pass xxxx
}
virtual_ipaddress {
146.48.90.45
}
}
...
Can you please help me to solve this problem? I don't know where is the
mistake...
Thanks in advance
Salvatore Trani
|