LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

routing problem with lvs?

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: routing problem with lvs?
From: Martin.Zehetmayer@xxxxxxxxxxx
Date: Wed, 8 Sep 2004 20:02:04 +0200
Hi, 

I have a problem in setting up a piranha load balancer with 2 real servers
(http). I've set up the 
configuration below which contains one load balancing server and two real
servers. pulse is 
starting all processes correctly and all interface come up and are pingable.
When I connect to the virtual ip on port 80  (telnet 192.168.0.50 80) there
is no connection refused
but I also get no prompt from one of the webservers. 

Do I have to configure some external routing via iptables? What can I do to
check if the
routing from ipvs works? 


Thanks in advance, 


 Martin Zehetmayer




Here is my configuration:
----------------------------------------------------------------------------
--
ipvsadm-1.21-9.ipvs108
piranha-0.7.6-1

Linux version 2.4.21-15.0.2.ELsmp


lvs.conf:
-----------
serial_no = 57
primary = 192.168.0.10
primary_private = 172.24.158.10
service = lvs
backup = 0.0.0.0
heartbeat = 0
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = nat
nat_router = 192.168.1.11 eth2:1
nat_nmask = 255.255.255.0
debug_level = NONE
virtual wwwgroup {
     active = 1
     address = 192.168.0.50 eth1:2
     vip_nmask = 255.255.255.0
     port = 80
     send = "GET /test.html\r\n"
     expect = "statusok"
     use_regex = 1
     load_monitor = none
     scheduler = wlc
     protocol = tcp
     timeout = 6
     reentry = 15
     quiesce_server = 0
     server www1 {
         address = 192.168.1.30
         active = 1
         weight = 1
     }
     server www2 {
         address = 192.168.1.31
         active = 1
         weight = 1
     }
}

from the loadbalancer (192.168.0.10)
ping to 192.168.1.30 and 192.168.1.31 works (real servers)
ping to 192.168.0.10 works (primary)
ping to 192.168.1.11 works (nat router)
ping to 192.168.0.50 works (vip ip wwwgroup)

standard gateway for all real server is the nat router ip (192.168.1.11)

No iptable or ipchain module loaded

/etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1


[root@mucillbq ha]# ipvsadm -L
IP Virtual Server version 1.0.8 (size=65536)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.0.50:http wlc
  -> 192.168.1.31:http            Masq    1      0          1         
  -> 192.168.1.30:http            Masq    1      0          0         




[root@mucillbq ha]# ps -ef | grep lvs
root      4863  4860  0 18:45 ?        00:00:00 /usr/sbin/lvs --nofork -c
/etc/sysconfig/ha/lvs.cf
root      4873  4863  0 18:45 ?        00:00:00 /usr/sbin/nanny -c -h
192.168.1.30 -p 80 -s GET /test.html\r\n -x statusok --regex -a 15 -I
/sbin/ipvsadm -t 6 -w 1 -V 192.168.0.50 -M m -U none --lvs
root      4874  4863  0 18:45 ?        00:00:00 /usr/sbin/nanny -c -h
192.168.1.31 -p 80 -s GET /test.html\r\n -x statusok --regex -a 15 -I
/sbin/ipvsadm -t 6 -w 1 -V 192.168.0.50 -M m -U none --lvs
----------------------------------------------------------------------------
--


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