设为首页 收藏本站

运维网

查看: 325|回复: 0

[求助] 第二个节点老是dead状态

[复制链接]
  • TA的每日心情
    奋斗
    2017-1-5 08:28
  • 签到天数: 10 天

    [LV.3]偶尔看看II

    发表于 2017-1-5 08:51:23 | 显示全部楼层 |阅读模式
    安装步骤如下:
    两个节点
    web1  172.16.100.8
    web2  172.16.100.9
    VIP:172.16.100.100


    web1的配置如下
    [root@web1 ~]# cat /etc/hosts
    hosts        hosts.allow  hosts.deny   
    [root@web1 ~]# cat /etc/hosts
    hosts        hosts.allow  hosts.deny   
    [root@web1 ~]# cat /etc/hosts
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    172.16.100.8 web1.sdzy.cn web1
    172.16.100.9 web2.sdzy.cn web2
    [root@web1 ~]# cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=web1.sdzy.cn
    [root@web1 ~]# uname -n
    web1.sdzy.cn
    [root@web1 ~]# ifconfig
    eth1      Link encap:Ethernet  HWaddr 00:50:56:2A:84:EB  
              inet addr:172.16.100.8  Bcast:172.16.100.255  Mask:255.255.255.0
              inet6 addr: fe80::250:56ff:fe2a:84eb/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1884 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1534 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:341923 (333.9 KiB)  TX bytes:292151 (285.3 KiB)


    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


    web2的配置如下
    [root@web2 ~]# cat /etc/hosts
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    172.16.100.8 web1.sdzy.cn web1
    172.16.100.9 web2.sdzy.cn web2
    [root@web2 ~]# cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=web2.sdzy.cn
    [root@web2 ~]# ifconfig
    eth1      Link encap:Ethernet  HWaddr 00:50:56:34:E7:9B  
              inet addr:172.16.100.9  Bcast:172.16.255.255  Mask:255.255.0.0
              inet6 addr: fe80::250:56ff:fe34:e79b/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:2869 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2469 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:486685 (475.2 KiB)  TX bytes:472672 (461.5 KiB)

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:22 errors:0 dropped:0 overruns:0 frame:0
              TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1166 (1.1 KiB)  TX bytes:1166 (1.1 KiB)

    所有节点安装的heartbeat的软件列表如下
    -rw-r--r--  1 root root   165292 Dec  3  2013 heartbeat-3.0.4-2.el6.x86_64.rpm
    -rw-r--r--  1 root root   269468 Dec  3  2013 heartbeat-libs-3.0.4-2.el6.x86_64.rpm
    -rw-r--r--  1 root root   114888 Sep  2  2014 heat-cfntools-1.2.6-4.el6.noarch.rpm
    web1的ha的配置如下
    [root@web1 ha.d]# cat ha.cf | grep -v "^#.*"
    logfacility     local0
    keepalive 1
    bcast  eth1
    auto_failback on
    node    web1.sdzy.cn
    node    web2.sdzy.cn
    ping 172.16.100.2




    [root@web1 ha.d]# cat haresources | grep -v "^#.*"
    web1.sdzy.cn IPaddr2::172.16.100.4/24/eth1 httpd
    [root@web1 ha.d]# cat authkeys | grep -v "^#.*"
    auth 1
    1 md5 2a8559a2d3c8404fed986b16fbd49cb4
    [root@web1 ha.d]#
    web2 的ha配置

    [root@web1 ha.d]# scp ha.cf authkeys haresources  web2:/etc/ha.d/
    ha.cf                                                                                               100%   10KB  10.3KB/s   00:00   
    authkeys                                                                                            100%  691     0.7KB/s   00:00   
    haresources

    现在的问题为:
    1。web2 经常dead

    heartbeat的日志


    Jan  5 08:49:13 web1 heartbeat: [2738]: info: Pacemaker support: false
    Jan  5 08:49:13 web1 heartbeat: [2738]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
    Jan  5 08:49:13 web1 heartbeat: [2738]: info: **************************
    Jan  5 08:49:13 web1 heartbeat: [2738]: info: Configuration validated. Starting heartbeat 3.0.4
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: heartbeat: version 3.0.4
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: Heartbeat generation: 1483526594
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: glib: UDP Broadcast heartbeat started on port 694 (694) interface eth1
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: glib: UDP Broadcast heartbeat closed on port 694 interface eth1 - Status: 1
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: glib: ping heartbeat started.
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: G_main_add_TriggerHandler: Added signal manual handler
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: G_main_add_TriggerHandler: Added signal manual handler
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: G_main_add_SignalHandler: Added signal handler for signal 17
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: Local status now set to: 'up'
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: Link 172.16.100.2:172.16.100.2 up.
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: Status update for node 172.16.100.2: status ping
    Jan  5 08:49:13 web1 heartbeat: [2739]: info: Link web1.sdzy.cn:eth1 up.
    Jan  5 08:49:44 web1 heartbeat: [2739]: WARN: node web2.sdzy.cn: is dead
    Jan  5 08:49:44 web1 heartbeat: [2739]: info: Comm_now_up(): updating status to active
    Jan  5 08:49:44 web1 heartbeat: [2739]: info: Local status now set to: 'active'
    Jan  5 08:49:44 web1 heartbeat: [2739]: WARN: No STONITH device configured.
    Jan  5 08:49:44 web1 heartbeat: [2739]: WARN: Shared disks are not protected.
    Jan  5 08:49:44 web1 heartbeat: [2739]: info: Resources being acquired from web2.sdzy.cn.
    Jan  5 08:49:44 web1 harc(default)[2750]: info: Running /etc/ha.d//rc.d/status status
    Jan  5 08:49:44 web1 mach_down(default)[2782]: info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
    Jan  5 08:49:44 web1 mach_down(default)[2782]: info: mach_down takeover complete for node web2.sdzy.cn.
    Jan  5 08:49:44 web1 heartbeat: [2739]: info: mach_down takeover complete.
    Jan  5 08:49:44 web1 heartbeat: [2739]: info: Initial resource acquisition complete (mach_down)
    Jan  5 08:49:45 web1 /usr/lib/ocf/resource.d//heartbeat/IPaddr2(IPaddr2_172.16.100.4)[2822]: INFO:  Resource is stopped
    Jan  5 08:49:45 web1 heartbeat: [2751]: info: Local Resource acquisition completed.
    Jan  5 08:49:45 web1 harc(default)[2914]: info: Running /etc/ha.d//rc.d/ip-request-resp ip-request-resp
    Jan  5 08:49:45 web1 ip-request-resp(default)[2914]: received ip-request-resp IPaddr2::172.16.100.4/24/eth1 OK yes
    Jan  5 08:49:45 web1 ResourceManager(default)[2933]: info: Acquiring resource group: web1.sdzy.cn IPaddr2::172.16.100.4/24/eth1 httpd
    Jan  5 08:49:45 web1 /usr/lib/ocf/resource.d//heartbeat/IPaddr2(IPaddr2_172.16.100.4)[2959]: INFO:  Resource is stopped
    Jan  5 08:49:45 web1 ResourceManager(default)[2933]: info: Running /etc/ha.d/resource.d/IPaddr2 172.16.100.4/24/eth1 start
    Jan  5 08:49:45 web1 IPaddr2(IPaddr2_172.16.100.4)[3080]: INFO: Adding inet address 172.16.100.4/24 with broadcast address 172.16.100.255 to device eth1
    Jan  5 08:49:45 web1 IPaddr2(IPaddr2_172.16.100.4)[3080]: INFO: Bringing device eth1 up
    Jan  5 08:49:45 web1 IPaddr2(IPaddr2_172.16.100.4)[3080]: INFO: /usr/libexec/heartbeat/send_arp -i 200 -r 5 -p /var/run/resource-agents/send_arp-172.16.100.4 eth1 172.16.100.4 auto not_used not_used
    Jan  5 08:49:45 web1 /usr/lib/ocf/resource.d//heartbeat/IPaddr2(IPaddr2_172.16.100.4)[3054]: INFO:  Success
    Jan  5 08:49:45 web1 ResourceManager(default)[2933]: info: Running /etc/init.d/httpd  start



    我在web1的ifconfig和ipaddr的信息

    [root@web1 ha.d]# ifconfig
    eth1      Link encap:Ethernet  HWaddr 00:50:56:2A:84:EB  
              inet addr:172.16.100.8  Bcast:172.16.100.255  Mask:255.255.255.0
              inet6 addr: fe80::250:56ff:fe2a:84eb/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4712 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4110 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:836834 (817.2 KiB)  TX bytes:902984 (881.8 KiB)

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

    [root@web1 ha.d]# ip addr show
    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
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
        link/ether 00:50:56:3d:8c:d0 brd ff:ff:ff:ff:ff:ff
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
        link/ether 00:50:56:2a:84:eb brd ff:ff:ff:ff:ff:ff
        inet 172.16.100.8/24 brd 172.16.100.255 scope global eth1
        inet 172.16.100.4/24 brd 172.16.100.255 scope global secondary eth1
        inet6 fe80::250:56ff:fe2a:84eb/64 scope link
           valid_lft forever preferred_lft forever
    [root@web1 ha.d]#



    web2的


    [root@web2 ~]# ifconfig
    eth1      Link encap:Ethernet  HWaddr 00:50:56:34:E7:9B  
              inet addr:172.16.100.9  Bcast:172.16.255.255  Mask:255.255.0.0
              inet6 addr: fe80::250:56ff:fe34:e79b/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4955 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4570 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:899479 (878.3 KiB)  TX bytes:885811 (865.0 KiB)

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:22 errors:0 dropped:0 overruns:0 frame:0
              TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1166 (1.1 KiB)  TX bytes:1166 (1.1 KiB)

    [root@web2 ~]# ip addr show
    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
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
        link/ether 00:50:56:29:d6:a0 brd ff:ff:ff:ff:ff:ff
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
        link/ether 00:50:56:34:e7:9b brd ff:ff:ff:ff:ff:ff
        inet 172.16.100.9/16 brd 172.16.255.255 scope global eth1
        inet 172.16.100.4/24 brd 172.16.255.255 scope global eth1
        inet6 fe80::250:56ff:fe34:e79b/64 scope link
           valid_lft forever preferred_lft forever
    [root@web2 ~]#

    请问,为什么web2老是dead









    运维网声明 1、欢迎大家加入本站运维交流群:群①:263444886群②:197202523群③:485755530群④:201730672群⑤:202807635运维网交流群⑥:281548029
    2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
    3、其他单位或个人使用、转载或引用本文时必须注明原文的出处
    4、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
    5、运维网 - 服务您的运维操作管理专家!
    6、联系人Email:admin@yunvn.com 网址:www.iyunv.com

    点击关注更多内容
    您需要登录后才可以回帖 登录 | 立即注册  

    本版积分规则  允许回帖邮件提醒楼主

    关注运维网官方微信X

    关注运维网官方微信

    扫描二维码关注运维网官方微信,最新一手资源尽在官方微信!快快关注我们吧...

    扫描微信二维码查看详情

    运维网--中国最专业的运维工程师交流社区

    本站由宝德云赞助云主机

    客服 E-mail:kefu@yunvn.com

    京ICP备14039699号-1 Copyright © 2012-2017

    使用手机软件扫描微信二维码

    关注我们可获取更多热点资讯

    Good good study day day up !


    提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


    合作伙伴: 宝德云主机  讯天idc  青云cloud 51idc

    快速回复 返回顶部 返回列表