LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] LVS-NAT issue

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] LVS-NAT issue
From: Cristi <cere@xxxxxxxxxx>
Date: Sun, 08 Jul 2007 21:36:33 +0300
Hello again,

I installed heartbeat an ran into some trouble. I run 2 services on the 
2 real servers : httpd using LVS-NAT and sql using DR. I rely onto 
hearbeat to do the NAT part, but it doesn't seem to work. I setup the 
nat manually like so:

ipvsadm -A -t PUBLIC_VIP:www -s rr
ipvsadm -a -t PUBLIC_VIP:www -r 192.168.100.3:www -m -w 1
ipvsadm -a -t PUBLIC_VIP:www -r 192.168.100.4:www -m -w 1

and it worked like a charm, so no FW issues.

The listing looks pretty much the same on both instances, the problem 
being that i get a connection refused when i try telnetting on 80 while 
running heartbeat.


[manual]

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  82-76-67-159.rdsnet.ro:http rr
  -> 192.168.100.4:http           Masq    1      0          0
  -> 192.168.100.3:http           Masq    1      0          0


-------

[heartbeat]

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP PUBLIC_VIP:http rr
  -> 192.168.100.4:http           Masq    0      0          0
  -> 192.168.100.3:http           Masq    0      0          0
  -> LB1:http                     Local   1      0          4
TCP  192.168.100.5:mysql wrr
  -> 192.168.100.4:mysql          Route   0      0          0
  -> 192.168.100.3:mysql          Route   0      0          0

 From what i understood, using heartbeat i don't get forwarded to the 
real servers, instead being directed to the local (the director) services.

However, with heartbeat active, if i run the NAT manually, all is 
working fine.
/etc/ha.d/ldirectord.cf
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes


#MySQL

virtual = 192.168.100.5:3306
        service = mysql
        real = 192.168.100.3:3306 gate
        real = 192.168.100.4:3306 gate
        checktype = negotiate
        login = "ldirector"
        passwd = "ldirectorpassword"
        database = "ldirectordb"
        request = "SELECT * FROM connectioncheck"
        scheduler = wrr

#HTTP

virtual=PUBLIC_VIP:80
        real=192.168.100.3:80 masq
        real=192.168.100.4:80 masq
        #fallback=127.0.0.1:80
        service=http
        request="ldirector.html"
        receive="Test Page"
        scheduler=rr
        protocol=tcp
        checktype=negotiate

I appologise for this long message, but this issue is clearly out of my 
league and i wanted to present all relevant information.

Regards,

Cristi




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