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
1 day 16 hours ago
1 day 18 hours ago
2 days 6 hours ago
2 days 9 hours ago
2 days 13 hours ago
2 days 19 hours ago
3 days 5 hours ago
3 days 6 hours ago
3 days 15 hours ago
3 days 16 hours ago