KEEPALIVED 绑定虚拟ip 失败

yegui1986 发布于 2013/07/26 10:05
阅读 12K+
收藏 0

######配置

global_defs {

   router_id LVS_DEVEL
}


vrrp_instance VI_1 {
      state MASTER
      interface eth1
      track_interface {
         lo
         eth1
      }
      virtual_router_id 51
      #mcast_src_ip 10.40.59.57
      priority 100
      debug
      advert_int 1
      authentication {
        auth_type PASS
        auth_pass 1111
      }


      virtual_ipaddress {
            10.40.59.2
      }

}


########

启动后, log 

Jul 25 22:14:00 dbl-nis-test01 Keepalived[27704]: Starting Keepalived v1.2.7 (07/25,2013)
Jul 25 22:14:00 dbl-nis-test01 Keepalived[27704]: Remove a zombie pid file /var/run/keepalived.pid
Jul 25 22:14:00 dbl-nis-test01 Keepalived[27704]: Remove a zombie pid file /var/run/vrrp.pid
Jul 25 22:14:00 dbl-nis-test01 Keepalived[27704]: Remove a zombie pid file /var/run/checkers.pid
Jul 25 22:14:00 dbl-nis-test01 Keepalived[27705]: Starting Healthcheck child process, pid=27706
Jul 25 22:14:00 dbl-nis-test01 Keepalived[27705]: Starting VRRP child process, pid=27707
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: Interface queue is empty
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: No such interface, eth1
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: Netlink reflector reports IP 10.40.59.57 added
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: Netlink reflector reports IP 10.40.59.57 added
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: Registering Kernel netlink reflector
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: Registering Kernel netlink command channel
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: Interface queue is empty
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: No such interface, eth1
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: Netlink reflector reports IP 10.40.59.57 added
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: Netlink reflector reports IP 10.40.59.57 added
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: Registering Kernel netlink reflector
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: Registering Kernel netlink command channel
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: Registering gratuitous ARP shared channel
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: Configuration is using : 40999 Bytes
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: Configuration is using : 93143 Bytes
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: ------< Global definitions >------
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]:  Router ID = dbl-nis-test01.dbl01.baidu.com
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]:  Smtp server connection timeout = 30
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]:  Email notification from = root@dbl-nis-test01.dbl01.baidu.com
Jul 25 22:14:00 dbl-nis-test01 Keepalived_vrrp[27707]: Using LinkWatch kernel netlink reflector...
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: ------< Global definitions >------
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]:  Router ID = dbl-nis-test01.dbl01.baidu.com
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]:  Smtp server connection timeout = 30
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]:  Email notification from = root@dbl-nis-test01.dbl01.baidu.com
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: ------< SSL definitions >------
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]:  Using autogen SSL context
Jul 25 22:14:00 dbl-nis-test01 Keepalived_healthcheckers[27706]: Using LinkWatch kernel netlink reflector...

################


[root@dbl-nis-test01.dbl01.baidu.com keepalived]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 3c:4a:92:e6:76:1c brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 3c:4a:92:e6:76:1d brd ff:ff:ff:ff:ff:ff
    inet 10.40.59.57/24 brd 10.40.59.255 scope global eth1

why? 绑定会失败呢?thx!


加载中
0
玖零
玖零
我的也是一样。。。。
0
玖零
玖零

执行以下四条命令试试:

service NetworkManager stop

chkconfig NetworkManager  off

service NetworkManager start

chkconfig NetworkManager  on


0
y
yegui1986
问题解决了,配置文件要用绝对路径
billow
billow
确实是要用绝对路径,也是被这个坑了
w
wzgl08
能否具体说下。
0
f
fashionbrot

thank you very very much!!!!

返回顶部
顶部