KEEPALIVED 绑定虚拟ip 失败

发布于 2021-12-04 10:39:17 字数 5158 浏览 851 评论 5

######配置

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!


如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

网名女生简单气质 2021-12-05 09:29:45

thank you very very much!!!!

落墨 2021-12-05 09:23:08

能否具体说下。

情绪失控 2021-12-05 08:49:26

问题解决了,配置文件要用绝对路径

瀞厅☆埖开 2021-12-05 07:58:18

执行以下四条命令试试:

service NetworkManager stop

chkconfig NetworkManager  off

service NetworkManager start

chkconfig NetworkManager  on

无法言说的痛 2021-12-04 19:06:32

我的也是一样。。。。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文