하트비트 3 바인드 소켓 오류

하트비트 3 바인드 소켓 오류

저는 항상 yum을 통해 CentOS 6.3 64비트에 Heartbeat3.0.5+Pacemaker1.0.12를 설치하고 싶었습니다. 설치는 성공한 것 같은데 하트비트 실행시 문제가 발생합니다.

이 문제와 관련된 몇 가지 정보를 아래에 나열했습니다.

노드 정보

Active  : hm5
Standby : hm6

패키지 정보

[root@hm5 rpm]# rpm -qa | grep -i heartbeat
heartbeat-libs-3.0.5-1.1.el6.x86_64
heartbeat-3.0.5-1.1.el6.x86_64

[root@hm5 rpm]# rpm -qa | grep -i pacemaker
pacemaker-1.0.11-1.2.el6.x86_64
pacemaker-libs-1.0.11-1.2.el6.x86_64

ha.cf 정보

[root@hm5 rpm]# cat /etc/ha.d/ha.cf 
pacemaker on
logfacility local1

debug 1
udpport 694

keepalive 2
warntime 20
deadtime 24
initdead 48

bcast eth1

node hm5
node hm6
watchdog /dev/watchdog

인터페이스 정보

[hm5]
eth0      Link encap:Ethernet  HWaddr 54:52:00:18:DE:97  
          inet addr:192.168.122.35  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1791 errors:0 dropped:0 overruns:0 frame:0
          TX packets:361 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:121033 (118.1 KiB)  TX bytes:58678 (57.3 KiB)

eth1      Link encap:Ethernet  HWaddr 54:52:00:6F:E3:74  
          inet addr:192.168.123.5  Bcast:192.168.123.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1238 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:68171 (66.5 KiB)  TX bytes:126 (126.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          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)

[hm6]
[root@hm6 ~]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 54:52:00:40:7D:BE  
          inet addr:192.168.122.36  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1345 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:77115 (75.3 KiB)  TX bytes:6223 (6.0 KiB)

eth1      Link encap:Ethernet  HWaddr 54:52:00:72:DB:F1  
          inet addr:192.168.123.6  Bcast:192.168.123.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1286 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:70729 (69.0 KiB)  TX bytes:126 (126.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          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)

루트 사용자가 하트비트를 시작한 후 오류 로그

Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(udpport,694)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(keepalive,2)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(warntime,20)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(deadtime,24)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(initdead,48)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(bcast,eth1)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(node,hm5)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(node,hm6)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(watchdog,/dev/watchdog)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: uid+hacluster, gid+<null>
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: uid+hacluster, gid+<null>
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: uid+<null>, gid+haclient
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: uid+root, gid+<null>
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: uid+<null>, gid+haclient
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: Beginning authentication parsing
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: 16 max authentication methods
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: Keyfile opened
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: Keyfile perms OK
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: 16 max authentication methods
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: Found authentication method [sha1]
Jul 30 19:12:52 hm5 heartbeat: [1448]: info: AUTH: i+1: key + 0x215bf40, auth+0x7fdb7ac89db0, authname+sha1
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: Outbound signing method is 1
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: Authentication parsing complete [1]
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(cluster,linux-ha)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(hopfudge,1)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(baud,19200)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(auto_failback,legacy)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(hbgenmethod,file)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(realtime,true)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(msgfmt,classic)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(conn_logd_time,60)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(log_badpack,true)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(syslogmsgfmt,true)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(coredumps,true)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(autojoin,none)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(uuidfrom,file)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(compression,zlib)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(compression_threshold,2)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(traditional_compression,no)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(max_rexmit_delay,250)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: Setting max_rexmit_delay to 250 ms
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(record_config_changes,on)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(record_pengine_inputs,on)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(enable_config_writes,on)
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: add_option(memreserve,6500)
Jul 30 19:12:52 hm5 heartbeat: [1448]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
Jul 30 19:12:52 hm5 heartbeat: [1448]: info: **************************
Jul 30 19:12:52 hm5 heartbeat: [1448]: info: Configuration validated. Starting heartbeat 3.0.5
Jul 30 19:12:52 hm5 heartbeat: [1448]: debug: HA configuration OK.  Heartbeat starting.
Jul 30 19:12:52 hm5 heartbeat: [1448]: info: Heartbeat Hg Version: node: 7e3a82377fa8c88b4d9ee47e29020d4531f4629a
Jul 30 19:12:52 hm5 heartbeat: [1449]: info: heartbeat: version 3.0.5
Jul 30 19:12:52 hm5 heartbeat: [1449]: info: Heartbeat generation: 1343634035
Jul 30 19:12:52 hm5 heartbeat: [1449]: debug: uuid is:8724b422-87c2-4056-9433-7be507f2efb3
Jul 30 19:12:52 hm5 heartbeat: [1449]: debug: FIFO process pid: 1452
Jul 30 19:12:52 hm5 heartbeat: [1449]: debug: opening bcast eth1 (UDP/IP broadcast)
Jul 30 19:12:52 hm5 heartbeat: [1449]: debug: glib: SO_BINDTODEVICE(r) set for device eth1
Jul 30 19:12:52 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:12:52 hm5 heartbeat: [1452]: debug: pid 1452 locked in memory.
Jul 30 19:12:52 hm5 heartbeat: [1452]: debug: Limiting CPU: 6 CPU seconds every 60000 milliseconds
Jul 30 19:12:53 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:12:54 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:12:55 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:12:56 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:12:57 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:12:58 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:12:59 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:13:00 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:13:01 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:13:02 hm5 heartbeat: [1449]: ERROR: glib: Unable to bind socket (Permission denied). Giving up.
Jul 30 19:13:02 hm5 heartbeat: [1449]: info: glib: UDP Broadcast heartbeat closed on port 694 interface eth1 - Status: 1
Jul 30 19:13:02 hm5 heartbeat: [1449]: ERROR: make_io_childpair: cannot open bcast eth1
Jul 30 19:13:02 hm5 heartbeat: [1449]: debug: Exiting from pid 1449 [rc+4]
Jul 30 19:13:03 hm5 heartbeat: [1452]: CRIT: Emergency Shutdown: Master Control process died.
Jul 30 19:13:03 hm5 heartbeat: [1452]: CRIT: Killing pid 1449 with SIGTERM
Jul 30 19:13:03 hm5 heartbeat: [1452]: CRIT: Emergency Shutdown(MCP dead): Killing ourselves.
Jul 30 19:13:03 hm5 heartbeat: [1452]: debug: Process 1452 processing SIGTERM
Jul 30 19:13:03 hm5 heartbeat: [1452]: debug: Exiting from pid 1452 [rc+15]

가장 큰 문제는 다음과 같습니다.

Jul 30 19:13:01 hm5 heartbeat: [1449]: ERROR: glib: Error binding socket (Permission denied). Retrying.
Jul 30 19:13:02 hm5 heartbeat: [1449]: info: glib: UDP Broadcast heartbeat closed on port 694 interface eth1 - Status: 1

답변1

어쨌든 한번 시도해 보시고 제공하신 정보에 따르면 SELinux 정책 문제가 있는 것으로 보입니다.

SELinux가 활성화되어 있는지 확인하는 방법은 무엇입니까?

[root@ragnarok ~]# getenforce  
Enforcing

명령이 강제 실행을 반환하면 시스템이 SELinux가 활성화된 상태로 실행되고 있는 것입니다. 이 경우 허용 모드로 전환하여 문제가 해결되는지 살펴보겠습니다.

SELinux 모드를 허용 모드로 변경하는 방법은 무엇입니까?

[root@ragnarok ~]# setenforce 0
[root@ragnarok ~]# getenforce 
Permissive

이는 재부팅할 때까지 작동하므로 이제 실패한 서비스를 시작해 볼 차례입니다.

운이 좋게 성공하면 다음과 같은 버그/정오표가 발생할 수 있습니다.

https://bugzilla.redhat.com/show_bug.cgi?id=809746

버그 리포터가 제공하는 명령을 확인하여 결과가 동일한지 확인할 수 있습니다. 이 경우 문제는 6월 이후 업스트림에서 수정된 것으로 보이며 시스템을 업데이트하거나 CentOS가 수정 사항을 적용할 때까지 기다려야 할 수도 있습니다.

조사 결과에 대한 피드백을 보내주세요.

관련 정보