歡迎您光臨本站 註冊首頁

heartbeat產生大量nodename日誌,這正常嗎?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

heartbeat產生大量nodename日誌,這正常嗎?

用虛擬機測試,兩台伺服器heartbeat服務都起來后,情況如下:
看了下日誌,發現大量的 nodename linuxtwo.com uuid changed to linuxone.com,這個正常嗎?
伺服器一:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:D4:5C:EC
          inet addr:192.168.0.192  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed4:5cec/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2902 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2360 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:325739 (318.1 KiB)  TX bytes:531793 (519.3 KiB)
          Interrupt:185 Base address:0x2000

eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:D4:5C:EC
          inet addr:192.168.0.194  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:185 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:0C:29:D4:5C:F6
          inet addr:1.1.1.1  Bcast:1.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed4:5cf6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1179 errors:0 dropped:0 overruns:0 frame:0
          TX packets:500 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:214414 (209.3 KiB)  TX bytes:84002 (82.0 KiB)
          Interrupt:177 Base address:0x2080

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:55 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4746 (4.6 KiB)  TX bytes:4746 (4.6 KiB)

伺服器二:# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:0F:02:B9
          inet addr:192.168.0.193  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0f:2b9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1552 errors:0 dropped:0 overruns:0 frame:0
          TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:233684 (228.2 KiB)  TX bytes:9706 (9.4 KiB)
          Interrupt:185 Base address:0x2000

eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:0F:02:B9
          inet addr:192.168.0.194  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:185 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:0C:29:0F:02:C3
          inet addr:1.1.1.2  Bcast:1.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0f:2c3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1189 errors:0 dropped:0 overruns:0 frame:0
          TX packets:362 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:157319 (153.6 KiB)  TX bytes:76340 (74.5 KiB)
          Interrupt:177 Base address:0x2080

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:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:728 (728.0 b)  TX bytes:728 (728.0 b)




日誌:
heartbeat: 2006/07/14_10:08:04 WARN: nodename linuxtwo.com uuid changed to linuxone.com
heartbeat: 2006/07/14_10:08:04 WARN: nodename linuxone.com uuid changed to linuxtwo.com
heartbeat: 2006/07/14_10:08:04 ERROR: should_drop_message: attempted replay attack ?
heartbeat: 2006/07/14_10:08:04 WARN: nodename linuxtwo.com uuid changed to linuxone.com
heartbeat: 2006/07/14_10:08:05 WARN: nodename linuxone.com uuid changed to linuxtwo.com
heartbeat: 2006/07/14_10:08:05 ERROR: should_drop_message: attempted replay attack ?
heartbeat: 2006/07/14_10:08:06 WARN: nodename linuxtwo.com uuid changed to linuxone.com
heartbeat: 2006/07/14_10:08:07 WARN: nodename linuxone.com uuid changed to linuxtwo.com
《解決方案》

/etc/ha.d/resoource.d/LVSSyncDaemonSwap master status
應該是一台機器為stop 一台為running
你的兩台機器 eth0:0都為92.168.0.194 ?
《解決方案》

問題出在這裡啊,我兩台伺服器都有eth0:0
我也絕的不對,但是可以使用。
我用http://192.168.0.194刷網頁,可以看到
this is 192.168.0.192
然後我關閉192.168.0.192
等兩分鐘,我再用http://192.168.0.194刷網頁,可以看到
this is 192.168.0.193
《解決方案》

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:D4:5C:EC
          inet addr:192.168.0.192  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed4:5cec/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10453 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7111 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1397744 (1.3 MiB)  TX bytes:1014259 (990.4 KiB)
          Interrupt:185 Base address:0x2000

eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:D4:5C:EC
          inet addr:192.168.0.194  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:185 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:0C:29:D4:5C:F6
          inet addr:1.1.1.1  Bcast:1.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed4:5cf6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4821 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1897 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:818788 (799.5 KiB)  TX bytes:386853 (377.7 KiB)
          Interrupt:177 Base address:0x2080

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:55 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4746 (4.6 KiB)  TX bytes:4746 (4.6 KiB)

# /etc/ha.d/resource.d/LVSSyncDaemonSwap master status
master stopped



# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:0F:02:B9
          inet addr:192.168.0.193  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0f:2b9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7288 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1990 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1092195 (1.0 MiB)  TX bytes:253846 (247.8 KiB)
          Interrupt:185 Base address:0x2000

eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:0F:02:B9
          inet addr:192.168.0.194  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:185 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:0C:29:0F:02:C3
          inet addr:1.1.1.2  Bcast:1.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0f:2c3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4144 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1633 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:619078 (604.5 KiB)  TX bytes:351888 (343.6 KiB)
          Interrupt:177 Base address:0x2080

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:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:728 (728.0 b)  TX bytes:728 (728.0 b)

# /etc/ha.d/resource.d/LVSSyncDaemonSwap master status
master stopped

網頁訪問正常。
《解決方案》

配置錯誤吧應該是
主要是參考http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html
安裝環境centos4.4

1>下在安裝必要的軟體包
  rpm -ivh http://dev.centos.org/centos/4/testing/i386/RPMS/heartbeat-pils-2.0.8-2.el4.centos.i386.rpm
yum install net-snmp-libs
rpm -ivh http://dev.centos.org/centos/4/testing/i386/RPMS/heartbeat-stonith-2.0.8-2.el4.centos.i386.rpm
yum install gnutls
rpm -ivh http://dev.centos.org/centos/4/testing/i386/RPMS/heartbeat-gui-2.0.8-2.el4.centos.i386.rpm
yum install perl-Crypt-SSLeay
yum install perl-HTML-Parser
yum install perl-LDAP
yum install perl-Net-DNS
yum install perl-libwww-perl
yum install perl-Net-IMAP-Simple-SSL
yum install perl-Net-IMAP-Simple
yum install perl-MailTools
rpm -ivh http://ftp.riken.go.jp/pub/Linux/dag/packages/perl-Data-HexDump/perl-Data-HexDump-0.02-1.2.el4.rf.noarch.rpm
rpm -ivh http://ftp.riken.go.jp/pub/Linux/dag/packages/perl-Authen-Radius/perl-Authen-Radius-0.13-1.rh9.rf.noarch.rpm
rpm -ivh http://dev.centos.org/centos/4/testing/i386/RPMS/heartbeat-2.0.8-2.el4.centos.i386.rpm
rpm -ivh http://mirror.centos.org/centos/4.4/csgfs/i386/RPMS/ipvsadm-1.24-6.i386.rpm
rpm -ivh http://dev.centos.org/centos/4/testing/i386/RPMS/heartbeat-ldirectord-2.0.8-2.el4.centos.i386.rpm
yum install arptables_jf
yum install libnet

2>配置幾個主要文件
################## /etc/ha.d/ldirectord #######################
nod1  ldirectord::ldirectord.cf       LVSSyncDaemonSwap::master       IPaddr2::192.168.1.2/24/eth0/192.168.1.255
###############################################################

################## /etc/ha.d/ldirectord.cf ####################
checktimeout=3
checkinterval=1
#fallback=127.0.0.1:80
autoreload=yes
logfile="/var/log/ldirectord.log"
#logfile="local0"
emailalert="**@**.com"
emailalertfreq=7200
#emailalertstatus=all
quiescent=yes

# Sample for an http virtual service
virtual=192.168.1.2:80
        real=192.168.1.3:80 gate
        real=192.168.1.4:80 gate
        fallback=127.0.0.1:80
        service=http
        request="hbtest.html"
        receive="hello"
        #virtualhost=www.***.com
        scheduler=rr
        #persistent=600
        #netmask=255.255.255.255
        protocol=tcp
        checktype=negotiate
        checkport=80
###############################################################

################### /ect/ha.d/ha.cf ###########################
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 694
ucast Internal_IP_Address
auto_failback on
node    nod1
node    nod2
###############################################################

##############/etc/sysconfig/network-scripts/ifcfg-lo:0#############
DEVICE=lo:0
IPADDR=192.168.1.2
NETMASK=255.255.255.255
NETWORK=192.168.1.255
BROADCAST=192.168.1.255
ONBOOT=yes
NAME=loopback
#################################################################

3>啟動
/etc/init.d/heartbeat stop
service ldirectord stop
/etc/ha.d/resource.d/LVSSyncDaemonSwap master stop
/etc/init.d/arptables_jf stop
/usr/sbin/arptables-noarp-addr 192.168.1.2 start
/etc/init.d/arptables_jf save
/etc/init.d/arptables_jf start
/etc/init.d/heartbeat/start
ifup lo

4>注意事項
*ip addr sh  檢查IP分配是否正確

*ipvsadm  -L -n   檢查服務情況

*/etc/ha.d/resource.d/LVSSyncyncDaemonSwap master status   檢查均衡情況,正確應該是master上為on, Slave上為off

*特別注意認真閱讀文檔!!!
  Note that a netmask of 255.255.255.255 on the lo:0 interface indicates that this interface will only accept traffic 192.168.6.240.
《解決方案》

/etc/ha.d/ldirectord 在參考中一個只也沒有提過,不知道ls講是的什麼
我的heartbeat 用命令yum安裝的,
只有一條安裝命令yum install heartbeat*
沒有發現/etc/ha.d/ldirectord這個文件,我聲明下,我模擬的只是ha,不包括lvs的。
我的參考資料是:
http://www.clusting.com/cluster/HA/heartbeat_1.html

[火星人 ] heartbeat產生大量nodename日誌,這正常嗎?已經有955次圍觀

http://coctec.com/docs/service/show-post-8136.html