为什么只有配置文件里的第一个realserver被添加了?
[root@DR1 keepalived]# vi keepalived.conf
! Configuration File for keepalived
global_defs {
notification_email {
acassen@firewall.loc
failover@firewall.loc
sysadmin@firewall.loc
}
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 172.16.10.1
smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_instance VI_1 {
state MASTER
interface eth2
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
172.16.10.8
}
}
virtual_server 172.16.10.8 80 {
delay_loop 6
lb_algo wlc
lb_kind DR
# nat_mask 255.255.255.0
persistence_timeout 50
protocol TCP
real_server 172.16.10.11 80 {
weight 2
TCP_CHECK{
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
real_server 172.16.10.12 80 {
weight 4
TCP_CHECK{
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
"keepalived.conf" 56L, 1074C written
[root@DR1 keepalived]# ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 172.16.10.8:80 wlc persistent 50
-> 172.16.10.11:80 Route 1 0 0
启动keepalived后,为什么只有第一个realserver被添加了啊?
日志如下:
Jan 14 22:17:11 dr1 Keepalived[13310]: Starting Keepalived v1.2.6 (01/14,2013)
Jan 14 22:17:11 dr1 Keepalived[13311]: Starting Healthcheck child process, pid=13313
Jan 14 22:17:11 dr1 Keepalived[13311]: Starting VRRP child process, pid=13314
Jan 14 22:17:11 dr1 Keepalived_healthcheckers[13313]: Interface queue is empty
Jan 14 22:17:11 dr1 Keepalived_healthcheckers[13313]: Netlink reflector reports IP 172.16.10.10 added
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Interface queue is empty
Jan 14 22:17:11 dr1 Keepalived_healthcheckers[13313]: Netlink reflector reports IP fe80::20c:29ff:feca:3a0b added
Jan 14 22:17:11 dr1 Keepalived_healthcheckers[13313]: Registering Kernel netlink reflector
Jan 14 22:17:11 dr1 Keepalived_healthcheckers[13313]: Registering Kernel netlink command channel
Jan 14 22:17:11 dr1 Keepalived_healthcheckers[13313]: Opening file '/etc/keepalived/keepalived.conf'.
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Netlink reflector reports IP 172.16.10.10 added
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Netlink reflector reports IP fe80::20c:29ff:feca:3a0b added
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Registering Kernel netlink reflector
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Registering Kernel netlink command channel
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Registering gratuitous ARP shared channel
Jan 14 22:17:11 dr1 Keepalived_healthcheckers[13313]: Configuration is using : 9696 Bytes
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Opening file '/etc/keepalived/keepalived.conf'.
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Configuration is using : 37189 Bytes
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: Using LinkWatch kernel netlink reflector...
Jan 14 22:17:11 dr1 Keepalived_healthcheckers[13313]: Using LinkWatch kernel netlink reflector...
Jan 14 22:17:11 dr1 Keepalived_vrrp[13314]: VRRP sockpool: [ifindex(2), proto(112), fd(11,12)]
Jan 14 22:17:12 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Transition to MASTER STATE
Jan 14 22:17:13 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Received lower prio advert, forcing new election
Jan 14 22:17:14 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Received lower prio advert, forcing new election
Jan 14 22:17:15 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Received lower prio advert, forcing new election
Jan 14 22:17:16 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Received lower prio advert, forcing new election
Jan 14 22:17:17 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Entering MASTER STATE
Jan 14 22:17:17 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) setting protocol VIPs.
Jan 14 22:17:17 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth2 for 172.16.10.8
Jan 14 22:17:17 dr1 Keepalived_healthcheckers[13313]: Netlink reflector reports IP 172.16.10.8 added
Jan 14 22:17:17 dr1 avahi-daemon[1321]: Registering new address record for 172.16.10.8 on eth2.IPv4.
Jan 14 22:17:17 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Received lower prio advert, forcing new election
Jan 14 22:17:17 dr1 Keepalived_vrrp[13314]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth2 for 172.16.10.8
cooper
周一, 2013-02-04 09:48
Permalink
其实问题很雷人
其实解决这个问题很简单
你把TCP_CHECK{的{前价格空格
dxw_gundam
周五, 2014-01-03 09:31
Permalink
太感谢了! 同样的错
太感谢了!
同样的错误!