How To Set Up A Load-Balanced MySQL Cluster =>problem with virtual address
I have followed the tutorial "How To Set Up A Load-Balanced MySQL Cluster".
I encountered problems with connection to Data cluster from the load balancer :
My configuration :
load-balancer1 = 192.168.1.11
load-balancer2 = 192.168.1.12
datacluster1 = 192.168.1.21
datacluster2 = 192.168.1.22
virtual address of data cluster = 192.168.1.100
lb1:/home#mysql -h 192.168.1.100 -u ldirector
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.100'
lb1:/home# mysql -h 192.168.1.21 -u ldirector
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4882
Server version: 5.0.32-Debian_7etch5 Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
This is my /etc/ha.d/ldirectord.cf :
# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual = 192.168.1.100:3306
service = mysql
real = 192.168.1.21:3306 gate
real = 192.168.1.22:3306 gate
checktype = negotiate
login = "ldirector"
database = "ldirectordb"
request = "SELECT * FROM connectioncheck"
scheduler = wrr
This is my /etc/ha.d/haresources :
lb2 \
ldirectord::ldirectord.cf \
LVSSyncDaemonSwap::master \
IPaddr2::192.168.1.100/24/eth0/192.168.1.255
OUTput of command ip addr :
lb2:/etc/ha.d# ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 42:82:4e:d1:ac:56 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.12/24 brd 192.168.1.255 scope global eth0
inet 192.168.1.100/24 brd 192.168.1.255 scope global secondary eth0
Can you help me, please? Thank you
|
Recent comments
2 hours 21 min ago
11 hours 49 min ago
12 hours 38 min ago
16 hours 11 min ago
20 hours 35 min ago
20 hours 57 min ago
23 hours 7 min ago
1 day 9 hours ago
1 day 14 hours ago
1 day 15 hours ago