忘记密码   免费注册 查看新帖 |

ChinaUnix.net

  平台 论坛 博客 文库 频道自动化运维 虚拟化 储存备份 C/C++ PHP MySQL 嵌入式 Linux系统
最近访问板块 发新帖
查看: 2403 | 回复: 2

keepalived生不成虚拟IP是原因 [复制链接]

论坛徽章:
0
发表于 2018-04-02 15:47 |显示全部楼层
! Configuration File for keepalived

vrrp_instance VI_1 {
    state MASTER
    interface ens33
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.168.136
    }
}

virtual_server 192.168.168.136 80 {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    persistence_timeout 0
    protocol TCP

    real_server 192.168.168.8 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 10
            nb_get_retry 3
            delay_before_retry 3
            # connect_port 80
        }
    }

    real_server 192.168.168.25 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 10
            nb_get_retry 3
            delay_before_retry 3
          # connect_port 8088
        }
    }
}

[root@localhost /]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.168.137  netmask 255.255.255.0  broadcast 192.168.168.255
        inet6 fe80::e0d2:5a93:aa83:5696  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ac:ea:d4  txqueuelen 1000  (Ethernet)
        RX packets 151328  bytes 18307862 (17.4 MiB)
        RX errors 0  dropped 348  overruns 0  frame 0
        TX packets 9049  bytes 758033 (740.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

论坛徽章:
0
发表于 2018-04-02 15:49 |显示全部楼层
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15327) died: Respawning
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(1532 died: Respawning
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15329) died: Respawning
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15330) died: Respawning
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15331) died: Respawning
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15332) died: Respawning
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15333) died: Respawning
Apr  2 14:45:28 localhost kernel: show_signal_msg: 337 callbacks suppressed
Apr  2 14:45:28 localhost kernel: keepalived[15334]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15334) died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15335]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15335) died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15336]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15336) died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15337]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15337) died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15338]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(1533 died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15339]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15339) died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15340]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15340) died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15341]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15341) died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15342]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]
Apr  2 14:45:28 localhost Keepalived[5939]: VRRP child process(15342) died: Respawning
Apr  2 14:45:28 localhost kernel: keepalived[15343]: segfault at 0 ip           (null) sp 00007ffe6f912da8 error 14 in libnss_files-2.17.so[7f0f45841000+c000]

求职 : Linux运维
论坛徽章:
10
丑牛
日期:2013-11-22 14:59:41数据库技术版块每日发帖之星
日期:2016-08-13 06:20:0015-16赛季CBA联赛之山西
日期:2016-08-03 10:35:38数据库技术版块每日发帖之星
日期:2016-07-31 06:20:002016科比退役纪念章
日期:2016-06-27 14:08:14数据库技术版块每日发帖之星
日期:2016-06-02 06:20:0015-16赛季CBA联赛之广东
日期:2016-05-20 15:06:2215-16赛季CBA联赛之深圳
日期:2016-01-29 16:27:402015亚冠之阿尔艾因
日期:2015-09-08 16:35:3615-16赛季CBA联赛之北京
日期:2017-03-28 18:45:36
发表于 2018-04-16 10:20 |显示全部楼层
回复 1# snjatid

我最近搭建MySQL双主互备+Keepalived时也出现过你这个疑问。在我搭建完之后,发现通过ifconfig确实没找到虚拟IP的信息,但我是能够ping通这个IP的。

觉得你可以尝试ping一下这个虚拟IP,如果能ping通,说明虚拟IP能用了。


您需要登录后才可以回帖 登录 | 注册

本版积分规则

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号 北京市公安局海淀分局网监中心备案编号:11010802020122
广播电视节目制作经营许可证(京) 字第1234号 中国互联网协会会员  联系我们:wangnan@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP