ipvsadm增加主从服务器,关于ipvsadm的中ActiveConn和InActConn显示均为0的问题求助

求助该问题解决没,我的也出现相同问题,只是在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

}

}

}

求高手帮忙找找错误!

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值