LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] setup problems

To: "'lvs-users@xxxxxxxxxxxxxxxxxxxxxx'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] setup problems
From: Nick Allen <NAllen@xxxxxxxxxxx>
Date: Fri, 22 Jun 2001 20:07:07 -0400
Hello Everyone-

I have to say that I am a newcomer to LVS, but am extremely excited in
working with this technology.  I am hoping that someone here can lend a
helping hand.

I am running RH 6.2 with the 2.2.19 linux kernel after having given up on
using the 2.4.x kernel with LVS after a couple failed attempts.  I have had
better success so far with the 2.2 kernel, but have run into some hopefully
small problems.  

I am attempting to setup a test environment using NAT that includes two LVS
directors (LVS1: 10.1.1.101, LVS2: 10.1.1.102) and two real servers (RS1:
10.1.1.110, RS2: 10.1.1.111) that will serve the IP "10.1.1.100".  I have an
externel setup that will route requests from the externel/internet IP to the
internal "10.1.1.100" address.

On the director (LVS1) I have successfully built/patched the 2.2.19 kernel
with "ipvs-1.0.8-2.2.19.tar.gz" and configured it according to the specs.  I
have then installed "ipvsadm-1.15.tar.gz" successfully, I believe.  

I have the two real servers (RS1, RS2) running apache serving pages to their
respective addresses (10.1.1.110 and 10.1.1.111).

At this point I am only trying to get one director up (LVS1) and once I am
successful with this will try and add the backup director (LVS2). 

I then tried to use the supplied ipvsadm script and configuration file
"lvs_nat.conf".  I followed the configuration file according to
specifications, I believe and is as follows.

#------lvs_nat.conf------
LVSCONF_FORMAT=1.0
LVS_TYPE=VS_NAT
INITIAL_STATE=on
CLEAR_IPVS_TABLES=yes
VIP=eth0:110 10.1.1.100 255.255.255.0 10.1.1.255
DIRECTOR_INSIDEIP=eth0 10.1.1.101 10.1.1.0 255.255.255.0 10.1.1.255
DIRECTOR_GW=10.1.1.100
SERVICE=t http rr 10.1.1.110:http 10.1.1.111:http
SERVER_NET_DEVICE=eth0
SERVER_GW=10.1.1.100
#------------------------

I run the following command" "perl ./configure lvs_nat.conf".  I then get
the following error.

#-------------------------
warning ./configure has not been tested with kernel version 2.2.19
error: conf_file syntax error - param array is not empty, contains
LVSCONF_FORMAT n line LVSCONF_FORMAT=1.0
error: conf_file syntax error - param array is not empty, contains
CLEAR_IPVS_TABLES n line CLEAR_IPVS_TABLES=yes
error: conf_file syntax error - param array is not empty, contains
DIRECTOR_GW n line DIRECTOR_GW=10.1.1.100
error: conf_file syntax error - param array is not empty, contains SERVER_GW
n line SERVER_GW=10.1.1.100
print_server_lines error: unknown protocol SERVICE
service t does not give a valid port number in /etc/services
#--------------------------

I then decided to try and configure it by hand using the following series of
commands.  I also load the round robin module before running these commands.

#--------------------------
echo 1 > /proc/sys/net/ipv4/ip_forward
ipfwadm -F -a m -S 10.1.1.0/24 -D 0.0.0.0/0
echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -A forward -j MASQ -s 10.1.1.0/24 -d 0.0.0.0/0
ipvsadm -A -t 10.1.1.100:80 -s rr    
ipvsadm -a -t 10.1.1.100:80 -R 10.1.1.110:80 -m 
ipvsadm -a -t 10.1.1.100:80 -R 10.1.1.111:80 -m 
#--------------------------

I then run the command "ipvsadm" and get the following.

#--------------------------
IP Virtual Server version 0.9.14 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port          Forward Weight ActiveConn InActConn
TCP  10.1.1.100:www rr
  -> 10.1.1.111:www              Masq    1      0          0        
  -> 10.1.1.110:www              Masq    1      0          0        
#--------------------------

The first 4 lines appear immediatly, but the last two lines regarding the
servers each take approximately 45 seconds to a minute to appear.

I then attempt to access "http://10.1.1.100"; but it does not work, as if
that address is not actually getting served by LVS. 

Thanks for staying with me through this long email.  Any help in getting
this one-director system up or advice on later adding the second backup
director would be tremendously appreciated!

Regards,
Nick


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