LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] Ultramonkey heartbeat not starting ldirectord automatically

To: ultramonkey-users@xxxxxxxxxxxxxxx, "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] Ultramonkey heartbeat not starting ldirectord automatically
From: "j j" <rampeters@xxxxxxxxx>
Date: Tue, 4 Sep 2007 19:38:47 -0400
When heartbeat is started at bootup, it's not starting ldirectord.
Any idea why?
I do not have a stand by linux director.  All the setup was done
following the instructions on
http://www.ultramonkey.org/3/topologies/hc-ha-lb-eg.html and
http://www.howtoforge.com/loadbalanced_mysql_cluster_debian.

My linux director files are set as follows and I have only 1 node:

vi /etc/ha.d/ha.cf

logfacility        local0
bcast        eth0
mcast eth0 225.0.0.1 694 1 0
auto_failback off
node        a
#node        loadb2
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster

vi /etc/ha.d/haresources

        a        \
        ldirectord::ldirectord.cf \
        LVSSyncDaemonSwap::master \
        IPaddr2::192.168.0.240/24/eth0/192.168.0.255

vi /etc/ha.d/ldirectord.cf

# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual = 192.168.0.240:3306
        service = mysql
        real = 192.168.0.4:3306 gate
        real = 192.168.0.5:3306 gate
        checktype = negotiate
        login = "ldirector"
        passwd = "somepassword"
        database = "ldirectordb"
        request = "SELECT * FROM connectioncheck"
        scheduler = wrr

On the main Linux Director, after starting heartbeat, ldirectord is
not automatically started by heartbeat. I get this:

[root@a me]# ps aux| grep heartbeat
root      3249  0.0  2.0  5204 5204 ?        SLs  22:37   0:00
heartbeat: heartbeat: master control process
nobody    3263  0.0  1.6  4256 4256 ?        SL   22:37   0:00
heartbeat: heartbeat: FIFO reader
nobody    3264  0.0  1.6  4252 4252 ?        SL   22:37   0:00
heartbeat: heartbeat: write: serial /dev/ttyS0
nobody    3265  0.0  1.6  4252 4252 ?        SL   22:37   0:00
heartbeat: heartbeat: read: serial /dev/ttyS0
nobody    3266  0.0  1.6  4252 4252 ?        SL   22:37   0:00
heartbeat: heartbeat: write: mcast eth0
nobody    3267  0.0  1.6  4252 4252 ?        SL   22:37   0:00
heartbeat: heartbeat: read: mcast eth0
nobody    3268  0.0  1.6  4252 4252 ?        SL   22:37   0:00
heartbeat: heartbeat: write: ping 192.168.0.1
nobody    3269  0.0  1.6  4252 4252 ?        SL   22:37   0:00
heartbeat: heartbeat: read: ping 192.168.0.1
1001      3294  0.0  0.3  3224  968 ?        S    22:37   0:00
/usr/lib/heartbeat/ipfail
root      4016  0.0  0.2  4164  628 pts/0    S+   22:46   0:00 grep heartbeat

[root@a me]# /sbin/ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:04:5a:6e:f0:dc brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::204:5aff:fe6e:f0dc/64 scope link
       valid_lft forever preferred_lft forever

[root@a me]# /usr/sbin/ldirectord ldirectord.cf status
ldirectord is stopped for /etc/ha.d/ldirectord.cf

[root@a me]# /sbin/ipvsadm -L -n
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn

[root@a me]# /etc/ha.d/resource.d/LVSSyncDaemonSwap master status
master stopped



============
After stopping heartbeat:

[root@a me]# ps aux| grep heartbeat
root      3967  0.0  0.2  4752  616 pts/0    S+   23:02   0:00 grep heartbeat

[root@a me]# /sbin/ipvsadm -L -n
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn

[root@a me]# /etc/init.d/ldirectord start
Starting ldirectord                                        [  OK  ]

[root@a me]# /sbin/ipvsadm -L -n
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.0.240:3306 wrr
  -> 192.168.0.5:3306             Route   0      0          0
  -> 192.168.0.4:3306             Route   0      0          0

[root@a me]# /etc/ha.d/resource.d/LVSSyncDaemonSwap master status
master stopped

[root@a me]# /usr/sbin/ldirectord ldirectord.cf status
ldirectord is stopped for /etc/ha.d/ldirectord.cf


[me@dev ~]$ mysql -h 192.168.0.240 -u ldirector -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.240' (113)



Even with heartbeat stopped and ldirectord running, I can't connect to
mysql server.


<Prev in Thread] Current Thread [Next in Thread>