LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: one ldirector LVS-DR

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: one ldirector LVS-DR
From: "Osvaldo Alvarez Pozo" <nebano@xxxxxxxxx>
Date: Thu, 17 May 2007 16:13:47 +0200
Hi
I made a seconf test.
this time i use vmware, the three servers have debian etch , kernel
2.6.18 , they are in the same network and the client too.
server load-balancer: 192.168.0.3
server node1:             192.168.0.4
server node2:             192.168.0.5

I decided to do direct routing using the redirect option on iptables.
my virtual ip address will be 192.168.0.105
the service is mysql, i have a running cluster in wich 192.168.0.3 is
the manager, and 192.168.0.4 & 192.168.0.5 are the nodes.

So in the load-balancer(192.168.0.3) i set up ldirectord.cf as:

# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual = 192.168.0.105:3306
       service = mysql
       real = 192.168.0.4:3306 gate
       real = 192.168.0.5:3306 gate
       checktype = negotiate
       login = "ldirector"
       passwd = "*********"
       database = "ldirectordb"
       request = "SELECT * FROM connectioncheck"
       scheduler = wrr
#>/etc/inid.d/ldirectord restart
in the node1(192.168.0.4) I did

#>iptables -t nat -A PREROUTING -p TCP -d 192.168.0.4 --dport 3306 -j
REDIRECT --to-port 3306
#>echo 1 >/proc/sys/net/ipv4/ip_forward
in the node2(192.168.0.5) i set

#>iptables -t nat -A PREROUTING -p TCP -d 192.168.0.5 --dport 3306 -j
REDIRECT --to-port 3306
#>echo 1 >/proc/sys/net/ipv4/ip_forward
but
ipvsadm -L always give:


#>ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=1048576)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.0.105:3306 wrr
-> 192.168.0.4:3306                   Route      1           0            0
-> 192.168.0.5:3306                   Route      1           0            0

imposible to connect:
error  2003 (HY000) Cannot connect to mysql server on 192.168.0.105
thanks in advance
Osvaldo

On 5/16/07, Osvaldo Alvarez Pozo <nebano@xxxxxxxxx> wrote:
Thanks for all the informations.

ps:Si yo soy del caiman barbudo

Osvaldo

On 5/16/07, Manuel Abian etch, kernel 2.6.18 rostegui Ramirez 
<manuel@xxxxxxxxxxxxxx> wrote:
> On Wednesday 16 May 2007 13:46:05 Joseph Mack NA3T wrote:
> > On Wed, 16 May 2007, Osvaldo Alvarez Pozo wrote:
> > > how do i do  to make the load balancer using ipsvadm?
> >
> > look at the mini-HOWTO
> >
> > Joe
>
> Osvaldo, hopefully that mini howto Joe pointed you to, will be available in
> spanish in a few days :-)
>
> See you later, alligator
>
> Manuel
> --
> Manuel Arostegui Ramirez.
>
> Electronic Mail is not secure, may not be read every day, and should not
> be used for urgent or sensitive issues.
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>


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