- 论坛徽章:
- 1
|
lvs-dr模式对 80 端口做了集群,使用rr算法。在dr上用 ipvsadm 命令查看,一切正常,3台realserver均在其中。
[root@localhost ~]# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress ort Scheduler Flags
-> RemoteAddress ort Forward Weight ActiveConn InActConn
FWM 3 rr
-> x. x. x. x:80 Local 1 0 0
-> x. x. x. x:80 Route 1 0 0
-> x. x. x. x:80 Route 1 0 0
从分配的连接数上可以看出有异常,但其实2台realserver并未有任何连接被分配,所有的连接都被分配到第三台,而且每次都是这样。重启keepalived服务后,恢复正常。keepalived的日志中并未有任何异常信息。
May 6 15:17:55 localhost Keepalived[19816]: Starting Keepalived v1.2.6 (01/22,2013)
May 6 15:17:55 localhost Keepalived[19817]: Starting Healthcheck child process, pid=19818
May 6 15:17:55 localhost Keepalived[19817]: Starting VRRP child process, pid=19819
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Initializing ipvs 2.6
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Interface queue is empty
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: No such interface, eth1
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Netlink reflector reports IP x. x. x. x added
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Netlink reflector reports IP fe80::2e:4fff:fec:436 added
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Registering Kernel netlink reflector
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Interface queue is empty
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Registering Kernel netlink command channel
May 6 15:17:55 localhost Keepalived_vrrp[19819]: No such interface, eth1
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Netlink reflector reports IP x. x. x. x added
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Netlink reflector reports IP fe80::2e:4fff:fec:436 added
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Registering Kernel netlink reflector
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Registering Kernel netlink command channel
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Registering gratuitous ARP shared channel
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Initializing ipvs 2.6
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Opening file '/etc/keepalived/keepalived.conf'.
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Configuration is using : 34487 Bytes
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Opening file '/etc/keepalived/keepalived.conf'.
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Configuration is using : 62292 Bytes
May 6 15:17:55 localhost Keepalived_vrrp[19819]: Using LinkWatch kernel netlink reflector...
May 6 15:17:55 localhost Keepalived_vrrp[19819]: VRRP sockpool: [ifindex(2), proto(112), fd(11,12)]
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Using LinkWatch kernel netlink reflector...
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Activating healthchecker for service [x. x. x. x]:80
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Activating healthchecker for service [x. x. x. x]:80
May 6 15:17:55 localhost Keepalived_healthcheckers[19818]: Activating healthchecker for service [x. x. x. x]:80
May 6 15:17:56 localhost Keepalived_vrrp[19819]: VRRP_Instance(VI_1) Transition to MASTER STATE
May 6 15:17:57 localhost Keepalived_vrrp[19819]: VRRP_Instance(VI_1) Entering MASTER STATE
May 6 15:17:57 localhost Keepalived_vrrp[19819]: VRRP_Instance(VI_1) setting protocol VIPs.
May 6 15:17:57 localhost Keepalived_vrrp[19819]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for x. x. x. x
May 6 15:17:57 localhost Keepalived_healthcheckers[19818]: Netlink reflector reports IP x. x. x. x added
May 6 15:18:02 localhost Keepalived_vrrp[19819]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for x. x. x. x
求解 |
|