Graeme, Michael thanks for the replies.
I have posted some ldirectord logs in debug mode at the end of this email.
I can connect from lb1 and lb2 to sql1 and sql2 using the mysql client
with the same credentials in the ldirector.cf:
>From ldirector.cf:
...
login="ldirector"
passwd="<hidden>"
database="ldirectordb"
request="SELECT * FROM connectioncheck"
...
root@lb1:~# 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.243:3306 wrr
-> 192.168.1.246:3306 Route 0 0 0
-> 192.168.1.247:3306 Route 0 0 0
root@lb1:~# mysql -u ldirector -p -h 192.168.1.246
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2822
Server version: 5.1.22-rc 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> quit
root@lb1:~# mysql -u ldirector -p -h 192.168.1.247
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.22-rc 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.01 sec)
mysql> quit
I also did exactly the same on lb2, with the same results.
The following information was logged in the ldirector log file:
[Fri May 30 12:35:41 2008|ldirectord|5781] Invoking ldirectord invoked
as: /usr/sbin/ldirectord restart
[Fri May 30 12:35:42 2008|ldirectord|5781] Starting Linux Director
v1.186-ha-2.1.2 as daemon
[Fri May 30 12:35:42 2008|ldirectord|5790] Added virtual server:
192.168.1.243:3306
[Fri May 30 12:35:42 2008|ldirectord|5790] Quiescent real server:
192.168.1.247:3306 (192.168.1.243:3306) (Weight set to 0)
[Fri May 30 12:35:42 2008|ldirectord|5790] Quiescent real server:
192.168.1.246:3306 (192.168.1.243:3306) (Weight set to 0)
Also, my ha.cf contains:
logfacility local0
bcast eth0
mcast eth0 225.0.0.1 694 1 0
auto_failback off
node lb1
node lb2
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
And haresources contains:
lb1 \
ldirectord::ldirectord.cf \
LVSSyncDaemonSwap::master \
IPaddr2::192.168.1.243/24/eth0/192.168.1.255
Both of these files are the same on both lb1 and lb2
I also tried running ldirectord in debug mode, and this is the output:
root@lb1:/var/log# ldirectord -d /etc/ha.d/ldirectord.cf start
DEBUG2: Running exec(/usr/sbin/ldirectord -d /etc/ha.d/ldirectord.cf start)
Running exec(/usr/sbin/ldirectord -d /etc/ha.d/ldirectord.cf start)
DEBUG2: Invoking ldirectord invoked as: /usr/sbin/ldirectord
/etc/ha.d/ldirectord.cf start
Invoking ldirectord invoked as: /usr/sbin/ldirectord
/etc/ha.d/ldirectord.cf start
DEBUG2: Starting Linux Director v1.186-ha-2.1.2 with pid: 5857
Starting Linux Director v1.186-ha-2.1.2 with pid: 5857
DEBUG2: Running system(/sbin/ipvsadm -A -t 192.168.1.243:3306 -s wrr )
Running system(/sbin/ipvsadm -A -t 192.168.1.243:3306 -s wrr )
DEBUG2: Added virtual server: 192.168.1.243:3306
Added virtual server: 192.168.1.243:3306
DEBUG2: Running system(/sbin/ipvsadm -a -t 192.168.1.243:3306 -r
192.168.1.247:3306 -g -w 0)
Running system(/sbin/ipvsadm -a -t 192.168.1.243:3306 -r
192.168.1.247:3306 -g -w 0)
DEBUG2: Quiescent real server: 192.168.1.247:3306 (192.168.1.243:3306)
(Weight set to 0)
Quiescent real server: 192.168.1.247:3306 (192.168.1.243:3306) (Weight set to 0)
DEBUG2: Disabled real
server=negotiate:mysql:tcp:192.168.1.247:3306:::1:gate:\/SELECT\ \*\
FROM\ connectioncheck: (virtual=tcp:192.168.1.243:3306)
DEBUG2: Running system(/sbin/ipvsadm -a -t 192.168.1.243:3306 -r
192.168.1.246:3306 -g -w 0)
Running system(/sbin/ipvsadm -a -t 192.168.1.243:3306 -r
192.168.1.246:3306 -g -w 0)
DEBUG2: Quiescent real server: 192.168.1.246:3306 (192.168.1.243:3306)
(Weight set to 0)
Quiescent real server: 192.168.1.246:3306 (192.168.1.243:3306) (Weight set to 0)
DEBUG2: Disabled real
server=negotiate:mysql:tcp:192.168.1.246:3306:::1:gate:\/SELECT\ \*\
FROM\ connectioncheck: (virtual=tcp:192.168.1.243:3306)
DEBUG2: Checking negotiate: real
server=negotiate:mysql:tcp:192.168.1.246:3306:::1:gate:\/SELECT\ \*\
FROM\ connectioncheck: (virtual=tcp:192.168.1.243:3306)
DEBUG2: Checking 192.168.1.243 server=192.168.1.246 port=3306
Use of uninitialized value in split at /usr/sbin/ldirectord line 2642.
DEBUG2: Disabled real
server=negotiate:mysql:tcp:192.168.1.246:3306:::1:gate:\/SELECT\ \*\
FROM\ connectioncheck: (virtual=tcp:192.168.1.243:3306)
DEBUG2: Checking negotiate: real
server=negotiate:mysql:tcp:192.168.1.247:3306:::1:gate:\/SELECT\ \*\
FROM\ connectioncheck: (virtual=tcp:192.168.1.243:3306)
DEBUG2: Checking 192.168.1.243 server=192.168.1.247 port=3306
Use of uninitialized value in split at /usr/sbin/ldirectord line 2642.
....
Regards,
Paul
|