免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7483 | 回复: 15
打印 上一主题 下一主题

hearbeat问题,服务无效? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-27 16:08 |只看该作者 |倒序浏览
[root@linuxone ~]# hostname
linuxone.com
[root@linuxone ~]# service httpd restart  #启动正常


配置文件:
vi /etc/ha.d/haresources
linuxone.com 192.168.0.194/25/192.168.0.255 httpd

vi /etc/ha.d/ha.cf
logfile /var/log/ha_log
bcast eth1
keepalive 2
warntime 10
deadtime 30
initdead 120
hopfudge 1
udpport 694
auto_failback on
node linuxone.com
node linuxtwo.com
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=root uid=root

vi /etc/ha.d/authkeys
auth 1
1 crc
#2 sha1 HI!
#3 md5 Hello!




#/etc/init.d/heartbeat start
Starting High-Availability services:
2006/07/26_04:58:24 INFO:  Resource is stopped
                                                           [  OK  ]
[root@linuxone ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:53:96:83
          inet addr:192.168.0.192  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe53:9683/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5604 errors:0 dropped:0 overruns:0 frame:0
          TX packets:630 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:538403 (525.7 KiB)  TX bytes:78743 (76.8 KiB)
          Interrupt:185 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:0C:29:53:96:8D
          inet addr:1.1.1.1  Bcast:1.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fe53:968d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6307 errors:1 dropped:1 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:604224 (590.0 KiB)  TX bytes:2977 (2.9 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:760 (760.0 b)  TX bytes:760 (760.0 b)


没有出现传说中的eth0:0,httpd服务也没有起来,这是什么原因呢,请指教!

论坛徽章:
0
2 [报告]
发表于 2007-07-27 16:12 |只看该作者
heartbeat[3854]: 2006/07/26_04:20:11 info: Version 2 support: false
heartbeat[3854]: 2006/07/26_04:20:12 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[3854]: 2006/07/26_04:20:12 info: **************************
heartbeat[3854]: 2006/07/26_04:20:12 info: Configuration validated. Starting heartbeat 2.1.1
heartbeat[3855]: 2006/07/26_04:20:12 info: heartbeat: version 2.1.1
heartbeat[3855]: 2006/07/26_04:20:12 info: Heartbeat generation: 1153851240
heartbeat[3855]: 2006/07/26_04:20:12 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[3855]: 2006/07/26_04:20:12 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[3855]: 2006/07/26_04:20:12 info: Removing /var/run/heartbeat/rsctmp failed, recreating.
heartbeat[3855]: 2006/07/26_04:20:12 info: glib: UDP Broadcast heartbeat started on port 694 (694) interface eth1
heartbeat[3855]: 2006/07/26_04:20:12 info: glib: UDP Broadcast heartbeat closed on port 694 interface eth1 - Status: 1
heartbeat[3855]: 2006/07/26_04:20:12 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[3855]: 2006/07/26_04:20:12 info: Local status now set to: 'up'
heartbeat[3855]: 2006/07/26_04:20:13 info: Link linuxone.com:eth1 up.
heartbeat[3855]: 2006/07/26_04:20:25 info: Link linuxtwo.com:eth1 up.
heartbeat[3855]: 2006/07/26_04:20:25 info: Status update for node linuxtwo.com: status up
harc[3862]:     2006/07/26_04:20:25 info: Running /etc/ha.d/rc.d/status status
heartbeat[3855]: 2006/07/26_04:20:26 info: Comm_now_up(): updating status to active
heartbeat[3855]: 2006/07/26_04:20:26 info: Local status now set to: 'active'
heartbeat[3855]: 2006/07/26_04:20:26 info: Starting child client "/usr/lib/heartbeat/ipfail" (500,500)
heartbeat[3855]: 2006/07/26_04:20:26 info: Status update for node linuxtwo.com: status active
heartbeat[3878]: 2006/07/26_04:20:26 info: Starting "/usr/lib/heartbeat/ipfail" as uid 500  gid 500 (pid 387
heartbeat[3855]: 2006/07/26_04:20:26 WARN: Client [ipfail] pid 3878 failed authorization [client failed authorization]
heartbeat[3855]: 2006/07/26_04:20:26 ERROR: api_process_registration_msg: cannot add client(ipfail)
heartbeat[3855]: 2006/07/26_04:20:26 WARN: Exiting /usr/lib/heartbeat/ipfail process 3878 returned rc 100.
harc[3879]:     2006/07/26_04:20:26 info: Running /etc/ha.d/rc.d/status status
heartbeat[3855]: 2006/07/26_04:20:36 info: remote resource transition completed.
heartbeat[3855]: 2006/07/26_04:20:36 info: remote resource transition completed.
heartbeat[3855]: 2006/07/26_04:20:36 info: Initial resource acquisition complete (T_RESOURCES(us))
heartbeat[3894]: 2006/07/26_04:20:36 ERROR: pclose(/usr/lib/heartbeat/ResourceManager listkeys linuxone.com) exited with retur
n code 127
heartbeat[3894]: 2006/07/26_04:20:36 ERROR: [/usr/lib/heartbeat/ResourceManager listkeys linuxone.com] exited with return code
127
heartbeat[3894]: 2006/07/26_04:20:36 info: No local resources [/usr/lib/heartbeat/ResourceManager listkeys linuxone.com] to ac
quire.
heartbeat[3855]: 2006/07/26_04:20:55 info: Received shutdown notice from 'linuxtwo.com'.
heartbeat[3855]: 2006/07/26_04:20:55 info: Resources being acquired from linuxtwo.com.
heartbeat[3896]: 2006/07/26_04:20:55 info: acquire local HA resources (standby).
heartbeat[3896]: 2006/07/26_04:20:55 ERROR: pclose(/usr/lib/heartbeat/ResourceManager ourkeys) exited with return code 127
heartbeat[3896]: 2006/07/26_04:20:55 info: local HA resource acquisition completed (standby).
heartbeat[3855]: 2006/07/26_04:20:55 info: Standby resource acquisition done [all].
heartbeat[3897]: 2006/07/26_04:20:55 ERROR: pclose(/usr/lib/heartbeat/ResourceManager listkeys linuxone.com) exited with retur
n code 127
heartbeat[3897]: 2006/07/26_04:20:55 ERROR: [/usr/lib/heartbeat/ResourceManager listkeys linuxone.com] exited with return code
127
heartbeat[3897]: 2006/07/26_04:20:55 info: No local resources [/usr/lib/heartbeat/ResourceManager listkeys linuxone.com] to ac
quire.
harc[3900]:     2006/07/26_04:20:55 info: Running /etc/ha.d/rc.d/status status
heartbeat[3855]: 2006/07/26_04:20:59 WARN: Shutdown delayed until current resource activity finishes.
heartbeat[3855]: 2006/07/26_04:21:26 WARN: node linuxtwo.com: is dead
heartbeat[3855]: 2006/07/26_04:21:26 info: Link linuxtwo.com:eth1 dead.
heartbeat[3855]: 2006/07/26_04:21:44 WARN: Gmain_timeout_dispatch: Dispatch function for send local status took too long to ex
ecute: 210 ms (> 50 ms) (GSource: 0x865fb70)
heartbeat[3855]: 2006/07/26_04:21:44 WARN: G_CH_prepare_int: working on write child took 170 ms (> 100 ms)
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: glib: Unable to send bcast [-1] packet(len=181): No such device
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG: Dumping message with 12 fields
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[0] : [t=status]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[1] : [st=active]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[2] : [dt=7530]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[3] : [protocol=1]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[4] : [src=linuxone.com]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[5] : [(1)srcuuid=0x8660350(36 27)]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[6] : [seq=47]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[7] : [hg=44c65f68]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[8] : [ts=44c67d62]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[9] : [ld=0.32 0.54 0.35 3/37 4468]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[10] : [ttl=3]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: MSG[11] : [auth=1 1ba75687]
heartbeat[3859]: 2006/07/26_04:21:54 ERROR: write failure on bcast eth1.: No such device
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: glib: Unable to send bcast [-1] packet(len=181): No such device
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG: Dumping message with 12 fields
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[0] : [t=status]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[1] : [st=active]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[2] : [dt=7530]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[3] : [protocol=1]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[4] : [src=linuxone.com]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[5] : [(1)srcuuid=0x865bce0(36 27)]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[6] : [seq=48]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[7] : [hg=44c65f68]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[8] : [ts=44c67d63]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[9] : [ld=0.32 0.54 0.35 3/39 4495]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[10] : [ttl=3]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: MSG[11] : [auth=1 3f6c2527]
heartbeat[3859]: 2006/07/26_04:21:55 ERROR: write failure on bcast eth1.: No such device
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: glib: Unable to send bcast [-1] packet(len=181): No such device
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG: Dumping message with 12 fields
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[0] : [t=status]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[1] : [st=active]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[2] : [dt=7530]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[3] : [protocol=1]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[4] : [src=linuxone.com]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[5] : [(1)srcuuid=0x8660580(36 27)]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[6] : [seq=49]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[7] : [hg=44c65f68]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[8] : [ts=44c67d64]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[9] : [ld=0.29 0.53 0.35 1/39 4495]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[10] : [ttl=3]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: MSG[11] : [auth=1 e2f218c8]
heartbeat[3859]: 2006/07/26_04:21:56 ERROR: write failure on bcast eth1.: No such device
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: glib: Unable to send bcast [-1] packet(len=181): No such device
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG: Dumping message with 12 fields
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[0] : [t=status]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[1] : [st=active]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[2] : [dt=7530]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[3] : [protocol=1]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[4] : [src=linuxone.com]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[5] : [(1)srcuuid=0x865ffb0(36 27)]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[6] : [seq=4a]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[7] : [hg=44c65f68]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[8] : [ts=44c67d66]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[9] : [ld=0.29 0.53 0.35 1/39 4495]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[10] : [ttl=3]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: MSG[11] : [auth=1 3756c4a9]
heartbeat[3859]: 2006/07/26_04:21:58 ERROR: write failure on bcast eth1.: No such device
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: glib: Unable to send bcast [-1] packet(len=181): No such device
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG: Dumping message with 12 fields
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[0] : [t=status]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[1] : [st=active]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[2] : [dt=7530]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[3] : [protocol=1]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[4] : [src=linuxone.com]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[5] : [(1)srcuuid=0x8660430(36 27)]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[6] : [seq=4b]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[7] : [hg=44c65f68]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[8] : [ts=44c67d68]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[9] : [ld=0.29 0.53 0.35 1/39 4495]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[10] : [ttl=3]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: MSG[11] : [auth=1 f171e7d7]
heartbeat[3859]: 2006/07/26_04:22:00 ERROR: write failure on bcast eth1.: No such device
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: glib: Unable to send bcast [-1] packet(len=181): No such device
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG: Dumping message with 12 fields
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[0] : [t=status]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[1] : [st=active]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[2] : [dt=7530]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[3] : [protocol=1]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[4] : [src=linuxone.com]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[5] : [(1)srcuuid=0x8660468(36 27)]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[6] : [seq=4c]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[7] : [hg=44c65f68]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[8] : [ts=44c67d6a]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[9] : [ld=0.27 0.52 0.34 1/39 4495]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[10] : [ttl=3]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: MSG[11] : [auth=1 de99e40b]
heartbeat[3859]: 2006/07/26_04:22:02 ERROR: write failure on bcast eth1.: No such device
heartbeat[3827]: 2006/07/26_04:58:24 info: Version 2 support: false
heartbeat[3827]: 2006/07/26_04:58:24 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[3827]: 2006/07/26_04:58:24 info: **************************
heartbeat[3827]: 2006/07/26_04:58:24 info: Configuration validated. Starting heartbeat 2.1.1
heartbeat[3828]: 2006/07/26_04:58:24 info: heartbeat: version 2.1.1
heartbeat[3828]: 2006/07/26_04:58:24 info: Heartbeat generation: 1153851241
heartbeat[3828]: 2006/07/26_04:58:24 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[3828]: 2006/07/26_04:58:24 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[3828]: 2006/07/26_04:58:24 info: Removing /var/run/heartbeat/rsctmp failed, recreating.
heartbeat[3828]: 2006/07/26_04:58:24 info: glib: UDP Broadcast heartbeat started on port 694 (694) interface eth1
heartbeat[3828]: 2006/07/26_04:58:24 info: glib: UDP Broadcast heartbeat closed on port 694 interface eth1 - Status: 1
heartbeat[3828]: 2006/07/26_04:58:24 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[3828]: 2006/07/26_04:58:24 info: Local status now set to: 'up'
heartbeat[3828]: 2006/07/26_04:58:25 info: Link linuxone.com:eth1 up.
heartbeat[3828]: 2006/07/26_04:58:26 info: Link linuxtwo.com:eth1 up.
heartbeat[3828]: 2006/07/26_04:58:26 info: Status update for node linuxtwo.com: status active
harc[3835]:     2006/07/26_04:58:26 info: Running /etc/ha.d/rc.d/status status
heartbeat[3828]: 2006/07/26_04:58:26 info: Comm_now_up(): updating status to active
heartbeat[3828]: 2006/07/26_04:58:26 info: Local status now set to: 'active'
heartbeat[3828]: 2006/07/26_04:58:26 info: Starting child client "/usr/lib/heartbeat/ipfail" (500,500)
heartbeat[3851]: 2006/07/26_04:58:26 info: Starting "/usr/lib/heartbeat/ipfail" as uid 500  gid 500 (pid 3851)
heartbeat[3828]: 2006/07/26_04:58:26 WARN: Client [ipfail] pid 3851 failed authorization [client failed authorization]
heartbeat[3828]: 2006/07/26_04:58:26 ERROR: api_process_registration_msg: cannot add client(ipfail)
heartbeat[3828]: 2006/07/26_04:58:26 WARN: Exiting /usr/lib/heartbeat/ipfail process 3851 returned rc 100.
heartbeat[3828]: 2006/07/26_04:58:27 info: remote resource transition completed.
heartbeat[3828]: 2006/07/26_04:58:27 info: remote resource transition completed.
heartbeat[3828]: 2006/07/26_04:58:27 info: Local Resource acquisition completed. (none)
heartbeat[3828]: 2006/07/26_04:58:27 info: linuxtwo.com wants to go standby [foreign]
heartbeat[3828]: 2006/07/26_04:58:28 info: standby: acquire [foreign] resources from linuxtwo.com
heartbeat[3853]: 2006/07/26_04:58:28 info: acquire local HA resources (standby).
heartbeat[3853]: 2006/07/26_04:58:28 ERROR: pclose(/usr/lib/heartbeat/ResourceManager ourkeys) exited with return code 127
heartbeat[3853]: 2006/07/26_04:58:28 info: local HA resource acquisition completed (standby).
heartbeat[3828]: 2006/07/26_04:58:28 info: Standby resource acquisition done [foreign].
heartbeat[3828]: 2006/07/26_04:58:28 info: Initial resource acquisition complete (auto_failback)
heartbeat[3828]: 2006/07/26_04:58:29 info: remote resource transition completed.
heartbeat[3952]: 2006/07/26_04:58:36 info: Version 2 support: false
heartbeat[3952]: 2006/07/26_04:58:36 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[3952]: 2006/07/26_04:58:36 info: **************************
heartbeat[3952]: 2006/07/26_04:58:36 info: Configuration validated. Starting heartbeat 2.1.1
heartbeat[3952]: 2006/07/26_04:58:36 info: heartbeat: already running [pid 3828].
[root@linuxone ~]# vi /var/log/ha_log
heartbeat[3952]: 2006/07/26_04:58:36 info: heartbeat: already running [pid 3828].

论坛徽章:
0
3 [报告]
发表于 2007-07-28 20:35 |只看该作者
原帖由 doking2008 于 2007-7-27 16:08 发表
[root@linuxone ~]# hostname
linuxone.com
[root@linuxone ~]#


没有出现传说中的eth0:0,httpd服务也没有起来,这是什么原因呢,请指教!


httpd服务没启动起来, eth0:0就不会出现,httpd服务没启动,是你本机的问题,先把你httpd启起来再说。

不过你上面又说" service httpd restart  #启动正常" ,这个估计是RH给的错误提示吧。

Note: httpd and smb are the name of startup scripts for Apache and Samba, respectively. Heartbeat will look for startup scripts of the same name in the following paths:

/etc/ha.d/resource.d
/etc/init.d


我在Debian下apache的服务名是/etc/init.d/apache,开始我用httpd也不行,
后来修改配置文件:
vi /etc/ha.d/haresources
linuxone.com 192.168.0.194/25/192.168.0.255 httpd ->把httpd 换成apache就可以了。
你看看你机上的服务名叫什么再说吧

论坛徽章:
0
4 [报告]
发表于 2007-07-30 08:56 |只看该作者
我装的是httpd-2.2.4.tar.gz,
httpd我手工是可以起来的
/usr/local/apache2/bin/apachect1 start
netstat -utln
出现80端口

论坛徽章:
0
5 [报告]
发表于 2007-07-30 09:05 |只看该作者
[root@linuxtwo ~]# service httpd start
[root@linuxtwo ~]# netstat -utln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:821                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:631                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 :::80                       :::*                        LISTEN            
tcp        0      0 :::22                       :::*                        LISTEN
udp        0      0 0.0.0.0:815                 0.0.0.0:*                       
udp        0      0 0.0.0.0:818                 0.0.0.0:*                       
udp        0      0 0.0.0.0:111                 0.0.0.0:*                       
udp        0      0 0.0.0.0:631                 0.0.0.0:*                       
[root@linuxtwo ~]# service httpd stop
[root@linuxtwo ~]# netstat -utln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:821                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:631                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 :::22                       :::*                        LISTEN
udp        0      0 0.0.0.0:815                 0.0.0.0:*                       
udp        0      0 0.0.0.0:818                 0.0.0.0:*                       
udp        0      0 0.0.0.0:111                 0.0.0.0:*                       
udp        0      0 0.0.0.0:631                 0.0.0.0:*  

这上面可以看出80端口是可以起来的

论坛徽章:
0
6 [报告]
发表于 2007-07-30 09:51 |只看该作者
原帖由 doking2008 于 2007-7-30 08:56 发表
我装的是httpd-2.2.4.tar.gz,
httpd我手工是可以起来的
/usr/local/apache2/bin/apachect1 start
netstat -utln
出现80端口


我上一帖子指出的这个,你怎么不看。
Note: httpd and smb are the name of startup scripts for Apache and Samba, respectively. Heartbeat will look for startup scripts of the same name in the following paths:

/etc/ha.d/resource.d
/etc/init.d

论坛徽章:
0
7 [报告]
发表于 2007-07-30 10:58 |只看该作者
简单的用中文说就是,ha会到/etc/ini.d/目录下找指定的服务,用于与之配合,这样启动后才行,不然你手动启动的,不行。

可以试试,手动启动apache,再手动重启ha,这样在我机上实验可以(服务可以维持大约10秒,10秒内集群IP可对外服务,过一会集群IP就被自动释放了)。

想永久解决问题,还是得处理上面帖子指出的问题。

[ 本帖最后由 qintel 于 2007-7-30 11:06 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2007-07-30 11:04 |只看该作者
强烈建议你,先别搞的那么复杂,先走一遍过程再说,搞个rpm的先试试.
还有,刚才看了日志,authkey这个文件配置对了吗.

论坛徽章:
0
9 [报告]
发表于 2007-07-30 13:01 |只看该作者
为了搞清楚原因,我重新安装了系统和软件,步骤如下:
操作系统:centos4.4

虚拟机1:
eth0:192.168.0.192
eth1:1.1.1.1
虚拟机2:
eth0:192.168.0.193
eth1:1.1.1.2

#hostname
linuxone.com

#vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=linuxone.com

#vi /etc/hosts
127.0.0.1               localhost.localdomain localhost
192.168.0.192           linuxone.com
192.168.0.193           linuxtwo.com
1.1.1.1                 linuxone.com
1.1.1.2                 linuxtwo.com

安装软件包:
httpd-2.2.4.tar.gz
heartbeat-2.0.2.tar.gz
libnet.tar.gz

步骤1:
tar -zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-so
make
make install
完成后,
/usr/local/apache2/bin/apachect1 start
cp /usr/local/apache2/bin/apachect1 /etc/init.d/httpd
service httpd restart
可以看到80端口起来

步骤2:
tar -zxvf libnet.tar.gz
cd libnet
./configure
make
make install

步骤3:
tar -zxvf heartbeat-2.0.2.tar.gz
cd heartbeat-2.0.2
./ConfigureMe configure
make
make install

配置文件:
vi /etc/ha.d/haresources
linuxone.com 192.168.0.194/25/192.168.0.255 httpd

vi /etc/ha.d/ha.cf
logfile /var/log/ha_log
bcast eth1
keepalive 2
warntime 10
deadtime 30
initdead 120
hopfudge 1
udpport 694
auto_failback on
node linuxone.com
node linuxtwo.com
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=root uid=root

/etc/ha.d/authkeys文件的内容如下:
auth 1
1 sha1 key-for-sha1-any-text-you-want

更改文件的权限:
chmod 600 /etc/ha.d/authkeys

useradd -g root hacluster
groupadd -g root haclient  #没有的话会报用户ID错误。


启动服务:
/etc/init.d/heartbeat start
[root@localhost ha.d]# /etc/init.d/heartbeat start
logd is already running
Starting High-Availability services:
                                                           [  OK  ]


没有发现80端口,也没有eht0:0

论坛徽章:
0
10 [报告]
发表于 2007-07-30 13:09 |只看该作者
附上日志:
vi /etc/log/ha_log
heartbeat[24178]: 2007/08/05_01:20:26 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[24178]: 2007/08/05_01:20:26 info: **************************
heartbeat[24178]: 2007/08/05_01:20:26 info: Configuration validated. Starting heartbeat 2.0.2
heartbeat[24179]: 2007/08/05_01:20:26 info: heartbeat: version 2.0.2
heartbeat[24179]: 2007/08/05_01:20:26 info: Heartbeat generation: 6
heartbeat[24179]: 2007/08/05_01:20:26 info: Removing /var/run/heartbeat/rsctmp failed, recreating.
heartbeat[24179]: 2007/08/05_01:20:26 info: glib: UDP Broadcast heartbeat started on port 694 (694) interface eth1
heartbeat[24179]: 2007/08/05_01:20:26 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[24179]: 2007/08/05_01:20:26 info: pid 24179 locked in memory.
heartbeat[24179]: 2007/08/05_01:20:26 info: Local status now set to: 'up'
heartbeat[24181]: 2007/08/05_01:20:27 info: pid 24181 locked in memory.
heartbeat[24183]: 2007/08/05_01:20:27 info: pid 24183 locked in memory.
heartbeat[24182]: 2007/08/05_01:20:27 info: pid 24182 locked in memory.
heartbeat[24179]: 2007/08/05_01:20:27 info: Link linuxone.com:eth1 up.
heartbeat[24179]: 2007/08/05_01:20:48 WARN: Shutdown delayed until Communication is up.
heartbeat[24179]: 2007/08/05_01:21:04 WARN: Shutdown delayed until Communication is up.
heartbeat[24181]: 2007/08/05_01:21:32 CRIT: Emergency Shutdown: Master Control process died.
heartbeat[24181]: 2007/08/05_01:21:32 CRIT: Killing pid 24179 with SIGTERM
heartbeat[24181]: 2007/08/05_01:21:32 CRIT: Killing pid 24182 with SIGTERM
heartbeat[24181]: 2007/08/05_01:21:32 CRIT: Killing pid 24183 with SIGTERM
heartbeat[24181]: 2007/08/05_01:21:32 CRIT: Emergency Shutdown(MCP dead): Killing ourselves.
heartbeat[24277]: 2007/08/05_01:21:43 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[24277]: 2007/08/05_01:21:43 info: **************************
heartbeat[24277]: 2007/08/05_01:21:43 info: Configuration validated. Starting heartbeat 2.0.2
heartbeat[24278]: 2007/08/05_01:21:43 info: heartbeat: version 2.0.2
heartbeat[24278]: 2007/08/05_01:21:43 info: Heartbeat generation: 7
heartbeat[24278]: 2007/08/05_01:21:43 info: Removing /var/run/heartbeat/rsctmp failed, recreating.
heartbeat[24278]: 2007/08/05_01:21:43 info: glib: UDP Broadcast heartbeat started on port 694 (694) interface eth1
heartbeat[24281]: 2007/08/05_01:21:43 info: pid 24281 locked in memory.
heartbeat[24278]: 2007/08/05_01:21:43 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[24278]: 2007/08/05_01:21:43 info: pid 24278 locked in memory.
heartbeat[24278]: 2007/08/05_01:21:43 info: Local status now set to: 'up'
heartbeat[24282]: 2007/08/05_01:21:44 info: pid 24282 locked in memory.
heartbeat[24283]: 2007/08/05_01:21:44 info: pid 24283 locked in memory.
heartbeat[24278]: 2007/08/05_01:21:44 info: Link linuxone.com:eth1 up.
heartbeat[24278]: 2007/08/05_01:23:43 WARN: node linuxtwo.com: is dead
heartbeat[24278]: 2007/08/05_01:23:43 info: Local status now set to: 'active'
heartbeat[24278]: 2007/08/05_01:23:43 info: Starting child client "/usr/lib/heartbeat/ipfail" (500,0)
heartbeat[24278]: 2007/08/05_01:23:43 WARN: No STONITH device configured.
heartbeat[24278]: 2007/08/05_01:23:44 WARN: Shared disks are not protected.
heartbeat[24278]: 2007/08/05_01:23:44 info: Resources being acquired from linuxtwo.com.
heartbeat[24289]: 2007/08/05_01:23:44 info: Starting "/usr/lib/heartbeat/ipfail" as uid 500  gid 0 (pid 24289)
harc[24290]:    2007/08/05_01:23:44 info: Running /etc/ha.d/rc.d/status status
mach_down[24308]:       2007/08/05_01:23:44 info: /usr/lib/heartbeat/mach_down: nice_failback: foreign resources acquired
heartbeat[24278]: 2007/08/05_01:23:44 info: mach_down takeover complete.
heartbeat[24278]: 2007/08/05_01:23:44 info: Initial resource acquisition complete (mach_down)
mach_down[24308]:       2007/08/05_01:23:44 info: mach_down takeover complete for node linuxtwo.com.
heartbeat[24291]: 2007/08/05_01:23:45 info: Local Resource acquisition completed.
harc[24364]:    2007/08/05_01:23:45 info: Running /etc/ha.d/rc.d/ip-request-resp ip-request-resp
ip-request-resp[24364]: 2007/08/05_01:23:45 received ip-request-resp 192.168.0.194/25/192.168.0.255 OK yes
ResourceManager[24377]: 2007/08/05_01:23:45 info: Acquiring resource group: linuxone.com 192.168.0.194/25/192.168.0.255 httpd
ResourceManager[24377]: 2007/08/05_01:23:45 info: Running /etc/ha.d/resource.d/IPaddr 192.168.0.194/25/192.168.0.255 start
IPaddr[24432]:  2007/08/05_01:23:46 info: /sbin/ifconfig eth0:0 192.168.0.194  netmask 255.255.255.128  broadcast 192.168.0.25
5
IPaddr[24432]:  2007/08/05_01:23:46 info: Sending Gratuitous Arp for 192.168.0.194 on eth0:0 [eth0]
IPaddr[24432]:  2007/08/05_01:23:46 /usr/lib/heartbeat/send_arp -i 500 -r 10 -p /var/run/heartbeat/rsctmp/send_arp/send_arp-19
2.168.0.194 eth0 192.168.0.194 auto 192.168.0.194 ffffffffffff
ResourceManager[24377]: 2007/08/05_01:23:47 info: Running /etc/ha.d/resource.d/httpd  start
heartbeat[24278]: 2007/08/05_01:23:55 info: Local Resource acquisition completed. (none)
heartbeat[24278]: 2007/08/05_01:23:55 info: local resource transition completed.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP