View Single Post
  #6  
Old 11th January 2007, 00:32
samu samu is offline
Junior Member
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, browsing on google I found a patch to apply to the /etc/init.d/heartbeat file in order to create the directories that heartbeat needs in /var/run.

I've added these lines in file /etc/init.d/heartbeat inside the function StartHA() :
if [ ! -d $RUNDIR/heartbeat ]; then
mkdir -p $RUNDIR/heartbeat/{ccm,crm}
chown -R hacluster:haclient $RUNDIR/heartbeat
chmod -R 750 $RUNDIR/heartbeat
fi

Ok, now restarting heartbeat I get NO ERROR on ha-log file.
root@ron:/home/sam# /etc/init.d/heartbeat start
Starting High-Availability services:
2007/01/10_23:13:17 INFO: IPaddr2 Resource is stopped
Done.

And now running:
root@ron:/home/sam# ps aux | grep heartbeat
root 14866 0.0 2.4 12516 12516 ? SLs 23:13 0:00 heartbeat: master control process
nobody 14869 0.0 1.1 5920 5920 ? SL 23:13 0:00 heartbeat: FIFO reader
nobody 14870 0.0 1.1 5916 5916 ? SL 23:13 0:00 heartbeat: write: bcast eth0
nobody 14871 0.0 1.1 5916 5916 ? SL 23:13 0:00 heartbeat: read: bcast eth0
nobody 14872 0.0 1.1 5916 5916 ? SL 23:13 0:00 heartbeat: write: mcast eth0
nobody 14873 0.0 1.1 5916 5916 ? SL 23:13 0:00 heartbeat: read: mcast eth0
113 14874 0.0 0.2 4196 1424 ? S 23:13 0:00 /usr/lib/heartbeat/ipfail
root@ron:/home/sam# cl_status hbstatus
Heartbeat is running on this machine.

But the problem is still not solved in fact:
root@ron:/home/sam# /etc/ha.d/resource.d/LVSSyncDaemonSwap master eth0 status
master stopped
root@ron:/home/sam# ldirectord ldirectord.cf status
ldirectord is stopped for /etc/ha.d/ldirectord.cf
root@ron:/home/sam# ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:02:3f:be:13:95 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.61/24 brd 192.168.1.255 scope global eth0
inet6 fe80::202:3fff:febe:1395/64 scope link
valid_lft forever preferred_lft forever

And this is the tail -f /var/log/messages:
Jan 10 23:13:17 localhost heartbeat: [14865]: WARN: Core dumps could be lost if multiple dumps occur
Jan 10 23:13:17 localhost heartbeat: [14865]: WARN: Consider setting /proc/sys/kernel/core_uses_pid (or equivalent) to 1 for maximum supportability
Jan 10 23:13:17 localhost heartbeat: [14865]: WARN: Logging daemon is disabled --enabling logging daemon is recommended
Jan 10 23:13:17 localhost heartbeat: [14865]: info: **************************
Jan 10 23:13:17 localhost heartbeat: [14865]: info: Configuration validated. Starting heartbeat 2.0.7
Jan 10 23:13:17 localhost heartbeat: [14866]: info: heartbeat: version 2.0.7
Jan 10 23:13:18 localhost heartbeat: [14866]: info: Heartbeat generation: 23
Jan 10 23:13:18 localhost heartbeat: [14866]: info: G_main_add_TriggerHandler: Added signal manual handler
Jan 10 23:13:18 localhost heartbeat: [14866]: info: G_main_add_TriggerHandler: Added signal manual handler
Jan 10 23:13:18 localhost heartbeat: [14866]: info: Removing /var/run/heartbeat/rsctmp failed, recreating.
Jan 10 23:13:18 localhost heartbeat: [14866]: info: glib: UDP Broadcast heartbeat started on port 694 (694) interface eth0
Jan 10 23:13:18 localhost heartbeat: [14866]: info: glib: UDP Broadcast heartbeat closed on port 694 interface eth0 - Status: 1
Jan 10 23:13:18 localhost heartbeat: [14866]: info: glib: UDP multicast heartbeat started for group 225.0.0.1 port 694 interface eth0 (ttl=1 loop=0)
Jan 10 23:13:18 localhost heartbeat: [14866]: info: G_main_add_SignalHandler: Added signal handler for signal 17
Jan 10 23:13:18 localhost heartbeat: [14866]: info: Comm_now_up(): updating status to active
Jan 10 23:13:18 localhost heartbeat: [14866]: info: Local status now set to: 'active'
Jan 10 23:13:18 localhost heartbeat: [14866]: info: Starting child client "/usr/lib/heartbeat/ipfail" (113,117)
Jan 10 23:13:18 localhost heartbeat: [14866]: info: Local status now set to: 'up'
Jan 10 23:13:18 localhost heartbeat: [14874]: info: Starting "/usr/lib/heartbeat/ipfail" as uid 113 gid 117 (pid 14874)
Jan 10 23:13:19 localhost heartbeat: [14866]: info: Link ron:eth0 up.
Jan 10 23:13:22 localhost ipfail: [14874]: info: Link Status update: Link ron/eth0 now has status up

I can't understand why it does not work...

These are the config files:

ha.cf
****
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
auto_failback off
bcast eth0
mcast eth0 225.0.0.1 694 1 0
node ron
respawn hacluster /usr/lib/heartbeat/ipfail

haresources
*********
ron IPaddr2::192.168.1.65/24/eth0/192.168.1.255 LVSSyncDaemonSwap::master::eth0 ldirectord::ldirectord.cf

ldirectord.cf
*********
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual=192.168.1.65:3306
service=mysql
real=192.168.0.62:3306 gate
real=192.168.0.100:3306 gate
checktype=negotiate
login="root"
passwd="mysqlrootpassword"
database="ldirectord"
request="SELECT * FROM connectioncheck"
scheduler=wrr

Any ideas to make it work?
Reply With Quote