LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] Having problem with load balancing mysql

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] Having problem with load balancing mysql
From: "Pete Kay" <petedao@xxxxxxxxx>
Date: Sun, 15 Jun 2008 00:04:21 +0800
Hi,
I think this should be a very trivial problem but I just don't know how to
solve it.
I have followed the instruction to setup ldirector to load balance on two
sql nodes.  Ldirector thinks that both the sql nodes are down but in fact
they are up.  I can even mysql into those two urls.  Iptables are all turned
off.  Could someone please give me some suggestion?  Any help will be
greatly appreciated.


[root@ldirector1 ha.d]#  ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.1.120:80 <http://192.168.1.120/> rr
  -> 192.168.1.114:80 <http://192.168.1.114/>             Route   1
0          0
  -> 192.168.1.113:80 <http://192.168.1.113/>             Route   1
0          0
TCP  192.168.1.120:3306 rr
  -> 192.168.1.117:3306           Local   0      0          0
  -> 192.168.1.114:3306           Route   0      0          0
[root@ldirector1 ha.d]# /usr/local/mysql/bin/mysql -h 192.168.1.114
-uldirector -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.1.23-ndb-6.2.15 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use ldirectordb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> SELECT * FROM connectioncheck
    -> ;
+------+
| i    |
+------+
|    1 |
+------+
1 row in set (0.00 sec)
mysql>


Here is my ldirector.cf:

checktimeout=3
checkinterval=5
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=yes
virtual=192.168.1.120:80
        fallback=127.0.0.1:80
        real=192.168.1.113:80 gate
        real=192.168.1.114:80 gate
        service=http
        request="test.html"
        receive="Still alive"
        scheduler=rr
        protocol=tcp
        checktype=negotiate
virtual=192.168.1.120:3306
        service=mysql
        real=192.168.1.114:3306 gate
        real=192.168.1.117:3306 gate
        checktype=negotiate
        login="ldirector"
        passwd="ldirectorpassword"
        database="ldirectordb"
        request="SELECT * FROM connectioncheck"
        scheduler=rr

~

~




Regards,
Pete

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