LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Mysql cluster ldirector IP Can't connect to MySQL

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Mysql cluster ldirector IP Can't connect to MySQL
From: Bacterie <eu_rau@xxxxxxxxx>
Date: Fri, 16 Apr 2010 02:50:17 -0700 (PDT)
Hello,

Sorry, i replied to the wrong post.

Yes, the http://www.howtoforge.com/loadbalanced_mysql_cluster_debian
is the correct link of the tutorial.

I have configured the lo:0 interfaces with the loadbalancer ip as described in 
page 7.

on node sql1 i have

ip a s lo:0
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet 192.168.201.100/32 scope global lo:0

on node sql2

ip a s lo:0
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet 192.168.201.100/32 scope global lo:0

I have added another host to the VPN network with the IP 192.168.201.14.

>From it, issuing arping gives off the following:

arping 192.168.201.100
ARPING 192.168.201.100
42 bytes from fe:ff:ff:ff:ff:ff (192.168.201.100): index=0 time=1.205 msec
42 bytes from fe:ff:ff:ff:ff:ff (192.168.201.100): index=1 time=1.467 msec
42 bytes from fe:ff:ff:ff:ff:ff (192.168.201.100): index=2 time=1.460 msec
42 bytes from fe:ff:ff:ff:ff:ff (192.168.201.100): index=3 time=1.481 msec

I also ran tcpdump on the load balancer host and i have noticed a strange thing.

When i do tcpdump on the tun0 interface, i get the chatter between the 
management node and the sql nodes but no traffic directed to the VIP.

 tcpdump -i tun0 port 3306
tcpdump: WARNING: arptype 65534 not supported by libpcap - falling back to 
cooked socket
tcpdump: verbose output suppressed, use -v or -vv for full protocol 
decode             
listening on tun0, link-type LINUX_SLL (Linux cooked), capture size 96 
bytes           

09:21:26.929772 IP ip-192-168-201-1.ec2.internal.57553 > 
ip-192-168-201-6.ec2.internal.mysql: S 3517636247:3517636247(0) win 5840 <mss 
1460,sackOK,timestamp 13004102 0,nop,wscale 7>
09:21:26.935957 IP ip-192-168-201-6.ec2.internal.mysql > 
ip-192-168-201-1.ec2.internal.57553: S 1616136901:1616136901(0) ack 3517636248 
win 5792 <mss 1366,sackOK,timestamp 171829194 13004102,nop,wscale 
7>                                                                                                                                                               
 & nbsp;                  
09:21:26.935975 IP ip-192-168-201-1.ec2.internal.57553 > 
ip-192-168-201-6.ec2.internal.mysql: . ack 1 win 46 <nop,nop,timestamp 13004103 
171829194>                                            
09:21:26.936123 IP ip-192-168-201-1.ec2.internal.57553 > 
ip-192-168-201-6.ec2.internal.mysql: F 1:1(0) ack 1 win 46 <nop,nop,timestamp 
13004103 171829194>                                     
09:21:26.936480 IP ip-192-168-201-1.ec2.internal.34946 > 
ip-192-168-201-10.ec2.internal.mysql: S 3505041773:3505041773(0) win 5840 <mss 
1460,sackOK,timestamp 13004103 0,nop,wscale 7>         
09:21:26.936710 IP ip-192-168-201-6.ec2.internal.mysql > 
ip-192-168-201-1.ec2.internal.57553: P 1:128(127) ack 1 win 46 
<nop,nop,timestamp 171829199 13004103>                                 
09:21:26.936723 IP ip-192-168-201-1.ec2.internal.57553 > 
ip-192-168-201-6.ec2.internal.mysql: R 3517636248:3517636248(0) win 
0                                                                 
09:21:26.937079 IP ip-192-168-201-6.ec2.internal.mysql > 
ip-192-168-201-1.ec2.internal.57553: F 128:128(0) ack 1 win 46 
<nop,nop,timestamp 171829199 13004103> 


On the other hand, if i run tcpdump on the lo interface of the loadbalancer and 
from another session on the loadbalancer run a "telnet 192.168.201.100 3306" i 
get:

tcpdump -i lo port 3306
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
09:22:08.367299 IP ip-192-168-201-100.ec2.internal.43644 > 
ip-192-168-201-100.ec2.internal.mysql: S 3556049393:3556049393(0) win 32792 
<mss 16396,sackOK,timestamp 13014460 0,nop,wscale 7>
09:22:08.369408 IP ip-192-168-201-100.ec2.internal.mysql > 
ip-192-168-201-100.ec2.internal.43644: R 0:0(0) ack 3556049394 win 0

So the traffic appears to be directed at lo instead of tun0.

Thanks.


--- On Thu, 4/15/10, L.S. Keijser <leon@xxxxxxxx> wrote:

From: L.S. Keijser <leon@xxxxxxxx>
Subject: Re: [lvs-users] Mysql cluster ldirector IP Can't connect to MySQL
To: "LinuxVirtualServer.org users mailing list." 
<lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thursday, April 15, 2010, 9:43 PM

On Thu, 2010-04-15 at 12:17 -0700, Bacterie wrote:
> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.201.100' (111)

Okay, first of all, the link you pasted was incomplete. I can only
assume you meant
http://www.howtoforge.com/loadbalanced_mysql_cluster_debian

Assuming you configured the loopback adapters on the realservers as lo:0
as described on page 7, could you do an 'ip a s lo:0' and paste the
output?

Could you also do an 'arping VIP' from a client (note: _not_ the
director or any of the realservers) and paste the first couple of lines?

-- 
Léon


_______________________________________________
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


      
_______________________________________________
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

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