Hello,
First, let me thank you for the great work that you are doing.
I'm trying to set up a Mysql Cluster over AWS instances, but due to the
limitations of Amazon(single ip /instance) i cannot use a virtual IP.
So, i decided to setup a VPN network first so i can have all the IP that i need.
I set up the VPN, all works fine regarding it.
I followed the instructions in
http://www.howtoforge.com/loadbalanc...cluster_debian in order to set up the
cluster.
I used debian lenny for the setup.
The following IP addresses are used:
192.168.201.1 -load balancer
192.168.201.6 -sql1
192.168.201.10-sql2
192.168.201.100- Virtual IP
On the load balacer node (only one, which is also the OpenVPN server ) i have
the following:
ha.cf
Quote:
logfacility local0
bcast tun0
mcast tun0 225.0.0.1 694 1 0
auto_failback off
node <name provided by uname -n for this amazon instance>
node loadb2
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
haresources
Quote:
<name provided by uname -n for this amazon
instance> \
ldirectord::ldirectord.cf \
LVSSyncDaemonSwap::master \
IPaddr2::192.168.201.100/24/tun0/192.168.201.255
ldirectord.cf
Quote:
# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual = 192.168.201.100:3306
service = mysql
real = 192.168.201.6:3306 gate
real = 192.168.201.10:3306 gate
checktype = negotiate
login = "ldirector"
passwd = "ldirectorpassword121"
database = "ldirectordb"
request = "SELECT * FROM connectioncheck"
scheduler = wrr
A few checks reveal:
ip addr sh tun0
Quote:
3: tun0:
<POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UNKNOWN qlen 100
link/[65534]
inet 192.168.201.1 peer 192.168.201.2/32 scope global tun0
inet 192.168.201.100/24 brd 192.168.201.255 scope global tun0
ipvsadm -L -n
Quote:
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.201.100:3306 wrr
-> 192.168.201.6:3306 Route 1 0 0
-> 192.168.201.10:3306 Route 1 0 0
/etc/ha.d/resource.d/LVSSyncDaemonSwap master status
master running
(ipvs_syncmaster pid: 1474)
ldirectord ldirectord.cf status
ldirectord for /etc/ha.d/ldirectord.cf is running with pid: 1391
However, when i try to connect to the virtual ip i get the following
Quote:
mysql -h 192.168.201.100 -u ldirector -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.201.100' (111)
What am i doing wrong? Is The fact that i'm running it over VPN?
Thanks,
Catalin
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
|