关于ipvsadm的中ActiveConn和InActConn显示均为0的问题求助

使用2台lvs服务器+2台真实服务器部署了keepalived+lvs+dr模式,刚开始的时候一切正常
ipvsadm后会有正常的一些连接数,但是过了1-2天再使用ipvsadm的时候
发现ActiveConn InActConn均为0,但实际是有连接进入转发到真实服务器的

软件版本:ipvsadm-1.24.tar.gz keepalived-1.2.1.tar.gz
操作系统:redhat 5.4 x64

想问一下是何原因会造成这种情况,
刚上手keepalived+lvs这种模式,希望大侠帮忙解答一下

Forums:

1) 看下你的keepalived进程是不是3个:
ps -aux| grep keep

2) Real server启动对应端口的进程了吗?

3) 看下/var/log/messages,发出来一起看看。

1.肯定是3个的
2.端口都是启动的,不然ipvsadm后不会显示虚拟服务的
3.只有启动日志,是指定日志写到/var/log/keepalived下,顺便问一下,keepalived启动后能否通过参数打印一些详细日志
目前日志太少,无法帮助分析问题

求助该问题解决没,我的也出现相同问题,只是在ipvsadm -ln 命令下这两项都是0,其他一切正常,不知道是什么原因。

操作系统版本:
[root@M1 /home] uname -a
Linux M1 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@M1 /home] cat /etc/redhat-release
CentOS release 6.4 (Final)

软件版本:
keepalived-1.2.9.tar.gz
ipvsadm-1.26.tar.gz

出现的问题:
[root@M1 /home] ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.10.54.12:80 rr persistent 5
-> 10.10.54.17:3306 Route 1 0 0
-> 10.10.54.18:3306 Route 1 0 0

keepalived运行状况:
[root@M1 /home] ps -ef|grep keep
root 27822 1 0 19:22 ? 00:00:00 keepalived -D
root 27824 27822 0 19:22 ? 00:00:00 keepalived -D
root 27825 27822 0 19:22 ? 00:00:00 keepalived -D
root 27874 1360 0 19:42 pts/0 00:00:00 grep keep

realserver 上运行的是MySQL的主从复制,端口已经打开,主从复制运行良好。

在direct server上 查看日志 cat /var/log/messages|grep error 无任何内容

日志内容:
[root@M1 /home] tail -f /var/log/messages
Apr 14 19:48:49 M1 Keepalived_vrrp[27890]: Using LinkWatch kernel netlink reflector...
Apr 14 19:48:49 M1 Keepalived_vrrp[27890]: VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)]
Apr 14 19:48:49 M1 Keepalived_healthcheckers[27889]: Activating healthchecker for service [10.10.54.17]:3306
Apr 14 19:48:49 M1 Keepalived_healthcheckers[27889]: Activating healthchecker for service [10.10.54.18]:3306
Apr 14 19:48:50 M1 Keepalived_vrrp[27890]: VRRP_Instance(VI_1) Transition to MASTER STATE
Apr 14 19:48:51 M1 Keepalived_vrrp[27890]: VRRP_Instance(VI_1) Entering MASTER STATE
Apr 14 19:48:51 M1 Keepalived_vrrp[27890]: VRRP_Instance(VI_1) setting protocol VIPs.
Apr 14 19:48:51 M1 Keepalived_vrrp[27890]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 10.10.54.12
Apr 14 19:48:51 M1 Keepalived_healthcheckers[27889]: Netlink reflector reports IP 10.10.54.12 added
Apr 14 19:48:56 M1 Keepalived_vrrp[27890]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 10.10.54.12

下面是配置文件,不知道问题是不是出在这个上面:
vim /etc/keepalived/keepalived.conf
! Configuration File for keepalived

global_defs {
notification_email {
acassen@firewall.loc
}
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 192.168.200.1
smtp_connect_timeout 3
router_id LVS_MASTER
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 241
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
10.10.54.12/32 dev eth0 label eth0:1
}
}
virtual_server 10.10.54.12 3306 {
delay_loop 6
lb_algo rr
lb_kind DR
nat_mask 255.255.255.0
persistence_timeout 5
protocol TCP

real_server 10.10.54.17 3306 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 3306
}
}
real_server 10.10.54.18 3306 {
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 3306
}
}
}

求高手帮忙找找错误!

刚又试了一下,我从作为virtual server的主机用telnet 10.10.54.12 3306 , ActiveConn和InActConn都是0,我又从其他主机telnet 10.10.54.12 3306 ,ActiveConn 的值变为了1,但是InActConn仍然是0,这应该算是不正常的状况,求解惑。

Ho ho, who woudla thunk it, right?

You have more useful info than the British had colonies pr-IIWWe.

narrow auto insurance quote insurance sent work only cheap cialis 25mg bulgarian worth car insurance quotes policies

gollum essay writers health topic doing away best essay writing service about how write writing research papers basic draft essay writer noticed did anything within assignment help ought its essay writer then allow

hire portugal advantage car rental public transport availability car rental Valencia airport new year five major car rental deals cultural flavors hire create rental car coupons start finish year car rental friendly than