redhat-list Digest, Vol 60, Issue 10

lakshmana swamy klakshman03 at hotmail.com
Wed Feb 11 11:49:58 UTC 2009



 
> Message: 3
> Date: Tue, 10 Feb 2009 20:26:40 +0530
> From: lakshmana swamy <klakshman03 at hotmail.com>
> Subject: LVS-NAT problem
> To: <redhat-list at redhat.com>
> Cc: klakshman03 at hotmail.com
> Message-ID: <BAY115-W3330A0BBA30DB32E32EE40B8BD0 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> 
> 
>  Dear All
> 
> I have setup LVS setup of apache with 3 machines (RHEL-5.2). One is LVS and two are Real servers. I have configured through piranha.I have been facing the following problems.
> 
> 
> * when Iam trying to  When Iam trying to telnet on port 80, It gives following error
> 
> #telnet 10.129.150.160 80
> 
> Trying 10.129.150.160...
> telnet: connect to address 10.129.150.160: Connection timed out
> 
> * If Iam trying to browse the 10.129.150.60, following error occured
> 
> "The connection has timed out
>  The server at 10.129.150.160 is taking too long to respond."
> 
> 
> 
> > Here Iam giving my complete setup details. Please help me out.
> 
> 
> LVS1
> ----
> 
> eth0      inet addr:10.129.150.158  Bcast:10.129.150.255  Mask:255.255.255.0  (Public)
>         
> eth0:1    inet addr:10.129.150.160  Bcast:10.129.150.255  Mask:255.255.255.0  (VIP-Public)
>          
> eth1      inet addr:192.168.89.10  Bcast:192.168.89.255  Mask:255.255.255.0   (Private)
>           
> eth1:1    inet addr:192.168.89.15  Bcast:192.168.89.255  Mask:255.255.255.0    (VIP-Private or NAT gateway)
> 
> 
> Real Server rs1 
> -----------
> 
> Interface:eth1
> IP:192.168.89.1
> Mask:255.255.255.0
> Gw: 192.168.89.15  
> 
>        
> Real Server rs2
> -----------
> 
> Interface:eth1
> IP:192.168.89.2
> Mask:255.255.255.0
> Gw: 192.168.89.15     
> 
> LVS configurational file
> -------------------------
> 
> [root at lvs1 ~]# cat /etc/sysconfig/ha/lvs.cf 
> serial_no = 84
> primary = 10.129.150.158
> service = lvs
> backup = 0.0.0.0
> heartbeat = 1
> heartbeat_port = 539
> keepalive = 6
> deadtime = 18
> network = nat
> nat_router = 192.168.89.15 eth1:1
> nat_nmask = 255.255.255.0
> debug_level = NONE
> virtual vrs {
>      active = 1
>      address = 10.129.150.160 eth0:1
>      vip_nmask = 255.255.255.0
>      port = 80
>      send = "GET / HTTP/1.0\r\n\r\n"
>      expect = "HTTP"
>      use_regex = 0
>      load_monitor = none
>      scheduler = wrr
>      protocol = tcp
>      timeout = 6
>      reentry = 15
>      quiesce_server = 0
>      server rs1 {
>          address = 192.168.89.1
>          active = 1
>          weight = 1
>      }
>      server rs2 {
>          address = 192.168.89.2
>          active = 1
>          weight = 1
>      }
> }
> 
> 
>  The following commands has been executed on LVS
>  ------------------------------------------------
>  
> # /sbin/iptables -t mangle -A PREROUTING -p tcp -d 10.129.150.160/32 --dport 80 -j MARK --set-mark 80
> # /sbin/iptables -t nat -A POSTROUTING -p tcp -s 192.168.89.0/24 --sport 80 -j MASQUERADE
> 
> ipvsadm output
> -----------------
> 
> [root at lvs1 ~]# ipvsadm -l
> IP Virtual Server version 1.2.1 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  lvs1pp.locuz.org:http wrr
>   -> rs2.locuz.org:http           Masq    1      0          0         
>   -> rs1.locuz.org:http           Masq    1      0          1         
> 
> 
> 
> 
>  Thanks 
> 
> Laxman
> 
> _________________________________________________________________
> For the freshest Indian Jobs Visit MSN Jobs
> http://www.in.msn.com/jobs
> 
> ------------------------------
> 
> Message: 4
> Date: Tue, 10 Feb 2009 09:10:00 -0600
> From: Barry Brimer <lists at brimer.org>
> Subject: Re: LVS-NAT problem
> To: General Red Hat Linux discussion list <redhat-list at redhat.com>
> Message-ID: <1234278600.499198c8c1364 at mail.toucanhost.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Quoting lakshmana swamy <klakshman03 at hotmail.com>:
> 
> >
> >
> >  Dear All
> >
> > I have setup LVS setup of apache with 3 machines (RHEL-5.2). One is LVS and
> > two are Real servers. I have configured through piranha.I have been facing
> > the following problems.
> >
> >
> > * when Iam trying to  When Iam trying to telnet on port 80, It gives
> > following error
> >
> > #telnet 10.129.150.160 80
> >
> > Trying 10.129.150.160...
> > telnet: connect to address 10.129.150.160: Connection timed out
> >
> > * If Iam trying to browse the 10.129.150.60, following error occured
> >
> > "The connection has timed out
> >  The server at 10.129.150.160 is taking too long to respond."
> >
> >
> >
> > > Here Iam giving my complete setup details. Please help me out.
> 
> <snip>
> 
> I would remove the 2 iptables rules :
> 
> # /sbin/iptables -t mangle -A PREROUTING -p tcp -d 10.129.150.160/32 --dport 80
> -j MARK --set-mark 80
> 
> You are setting a mark, but you are not using it.  This shouldn't be causing a
> problem, but is not needed.
> 
> 
> # /sbin/iptables -t nat -A POSTROUTING -p tcp -s 192.168.89.0/24 --sport 80 -j
> MASQUERADE
> 
> LVS does all of the NATing that you need for LVS connections.  You will need
> similar rules to get to other network services such as DNS, to work from behind
> LVS to outside network services but not for your LVS itself.
> 
> Make sure that on your LVS in /etc/sysctl.conf you have:
> "net.ipv4.ip_forward = 1" .. if you do not, set that and then run "sysctl -p" as
> root to enable IP forwarding.
> 
> Do not expect to be able to connect to your LVS address from behind the LVS.  It
> doesn't work that way.
> 
> Hope this helps,
> Barry
> 
> 
     Thanks Barry
 
   I did what you suggested

1. Removed that two iptables rules.
2. IP Forwarding was already enabled.

 But still Its giving same error.

 In this  case Iam trying to connect the IP of virtual server.

 

  Is ther any thing wrong in my configuration. ?
  The way Iam testing is not correct, If it is So.. What is the correct way to test the setup

 Please Help me out


 Thanking You

Laxman
  



 
_________________________________________________________________
Wish to Marry Now? Join MSN Matrimony FREE!
http://www.in.msn.com/matrimony


More information about the redhat-list mailing list