Mailing List Archive

URGENT : HELP NEEDED
Hello...
I have several linux mandrake 7.2 kernel 2.2.17-mdk boxes...
I try to build LVS with VS-NAT forwarding with one director and one
realserver.
I use the LVS mini Howto...

Director : @IP 192.168.1.1 virtual : 10.0.144.240
Realserver : @IP 192.168.1.2

I check for the kernel, all is ok...
I run the configure script (configure_lvs-0.7) with a lvs_nat.conf on
the director, then I run the rc.lvs_nat script : no problem.
When I run the rc.lvs_nat script on the realserver, I have the following
message :

root@cerbere /tmp]# rc.lvs_nat
looking for standard utilities
$IPCHAINS=/sbin/ipchains
$PING=/bin/ping -c 1
$IFCONFIG=/sbin/ifconfig
$NETSTAT=/bin/netstat
$ROUTE=/sbin/route
$AWK=/usr/bin/awk
$AWK=/bin/awk
fping not found, using ping instead
$FPING=/bin/ping -c 1
done
error: not a server, not a director
I'm not a server machine - this machine doesn't have the IP of any of the
servers
I'm not a director - I don't have the DIIP 10.0.144.240
bummer - exiting.
./rc.lvs_nat: return: can only `return' from a function or sourced script

Please find director and realserver configuration.
Thanks for your help.
Regards,
Ravi APPANAH.


----------------------------------------------------------------------------
---------
Ravi APPANAH Consultant Sécurité
CF6 groupe TELiNDUS
E-mail : ravi.appanah@telindus.fr
Phone : +33 1 41 91 39 00 41, rue des Trois Fontanot
Fax : +33 1 41 91 39 99 F-92024 NANTERRE CEDEX
Fax : +33 6 20 78 29 63
----------------------------------------------------------------------------
--------
For more informations about our products and services, please visit our
websites (http://www.cf6.fr/ and http://www.telindus.fr/)
----------------------------------------------------------------------------
----------
Re: URGENT : HELP NEEDED [ In reply to ]
Hello...
Sorry, I make a mistake in the lvs_nat.conf file : realserver wrong IP
adress...
I change it but it does not work...
I have this following errors :

root@cerbere /tmp]# rc.lvs_nat
looking for standard utilities
$IPCHAINS=/sbin/ipchains
$PING=/bin/ping -c 1
$IFCONFIG=/sbin/ifconfig
$NETSTAT=/bin/netstat
$ROUTE=/sbin/route
$AWK=/usr/bin/awk
$AWK=/bin/awk
fping not found, using ping instead
$FPING=/bin/ping -c 1
done


changing default gw to 192.168.1.1
showing routing table
Table de routage IP du noyau
Destination Passerelle Genmask Indic MSS Fenêtre irtt
Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
eth0

checking if DEFAULT_GW 192.168.1.1 is reachable - PING 192.168.1.1
(192.168.1.1): 56 octets data64 octets from 192.168.1.1: icmp_seq=0 ttl=255
time=3.2 ms--- 192.168.1.1 ping statistics ---1 packets transmitted, 1
packets received, 0% packet lossround-trip min/avg/max = 3.2/3.2/3.2 ms,
good
LVS realserver type vs-nat


looking for DIIP 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 octets data
64 octets from 192.168.1.1: icmp_seq=0 ttl=255 time=0.8 ms

--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 0.8/0.8/0.8 ms
found, good
not local, good


looking for VIP on director from realserver
director is accepting packets on network device eth0:240
VIP not on real-server at this stage
VIP will be on director
pinging VIP
PING 10.0.144.240 (10.0.144.240): 56 octets data
64 octets from 10.0.144.240: icmp_seq=0 ttl=255 time=0.9 ms

--- 10.0.144.240 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 0.9/0.9/0.9 ms
10.0.144.240 found, good. It's not on this real-server, assume it's on the
director.

checking default routing for vs-nat realserver
packets to director's default gw should go through director.
(this test will return quickly if the routing is wrong for VS-NAT,)
(will return in about 2 secs if setup correctly,)
(and will hang if the routing is deranged.)
Is director's default gw 2 hops away and is director one hop away on the
path to the director's gw?
YES
error: the path to the director's default gw does not go through the
director.
hops to director's gw 30
hops to director 1
this vs-nat LVS will not work.
you can fix this by changing the IP's, networks and routing of the LVS.
1. the network for the realservers must be private.
2. the default gw for the realservers must be the director.
3. a route to the director is not good enough, it won't work, the director
must be the default gw.
4. the realservers must not have any other routes to the client.
(Some routing problems are fixed by rerunning the script.)

To help debug the problem, here's the output of netstat -rn
Table de routage IP du noyau
Destination Passerelle Genmask Indic MSS Fenêtre irtt
Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
eth0


Thanks for your help...
Regards,
Ravi APPANAH

----- Original Message -----
From: "APPANAH Ravi" <drt.rappanah@anpe.fr>
To: <lvs-users@LinuxVirtualServer.org>
Cc: <wensong@gnuchina.org>; <drt.fbizet@anpe.fr>
Sent: Tuesday, March 27, 2001 11:56 AM
Subject: URGENT : HELP NEEDED


> Hello...
> I have several linux mandrake 7.2 kernel 2.2.17-mdk boxes...
> I try to build LVS with VS-NAT forwarding with one director and one
> realserver.
> I use the LVS mini Howto...
>
> Director : @IP 192.168.1.1 virtual : 10.0.144.240
> Realserver : @IP 192.168.1.2
>
> I check for the kernel, all is ok...
> I run the configure script (configure_lvs-0.7) with a lvs_nat.conf on
> the director, then I run the rc.lvs_nat script : no problem.
> When I run the rc.lvs_nat script on the realserver, I have the
following
> message :
>
> root@cerbere /tmp]# rc.lvs_nat
> looking for standard utilities
> $IPCHAINS=/sbin/ipchains
> $PING=/bin/ping -c 1
> $IFCONFIG=/sbin/ifconfig
> $NETSTAT=/bin/netstat
> $ROUTE=/sbin/route
> $AWK=/usr/bin/awk
> $AWK=/bin/awk
> fping not found, using ping instead
> $FPING=/bin/ping -c 1
> done
> error: not a server, not a director
> I'm not a server machine - this machine doesn't have the IP of any of the
> servers
> I'm not a director - I don't have the DIIP 10.0.144.240
> bummer - exiting.
> ./rc.lvs_nat: return: can only `return' from a function or sourced script
>
> Please find director and realserver configuration.
> Thanks for your help.
> Regards,
> Ravi APPANAH.
>
>
> --------------------------------------------------------------------------
--
> ---------
> Ravi APPANAH Consultant Sécurité
> CF6 groupe TELiNDUS
> E-mail : ravi.appanah@telindus.fr
> Phone : +33 1 41 91 39 00 41, rue des Trois Fontanot
> Fax : +33 1 41 91 39 99 F-92024 NANTERRE CEDEX
> Fax : +33 6 20 78 29 63
> --------------------------------------------------------------------------
--
> --------
> For more informations about our products and services, please visit our
> websites (http://www.cf6.fr/ and http://www.telindus.fr/)
> --------------------------------------------------------------------------
--
> ----------
>
>
Re: routine problem: [Was Re: URGENT : HELP NEEDED] [ In reply to ]
APPANAH Ravi wrote:

1. Please do not post with all uppercase subjects.
Uppercase letters are only for shouting.

2. This is a routine problem. There is nothing
urgent about it. Remember the story about
"The Boy who cried Wolf"


> Is director's default gw 2 hops away and is director one hop away on the
> path to the director's gw?
> YES

where do you get this string "YES" from? There is no string "YES" in the script
the script is executing the block for "no".

> error: the path to the director's default gw does not go through the
> director.
> hops to director's gw 30
> hops to director 1
> this vs-nat LVS will not work.

Thanks for the attached files.

The script appears not to be parsing the output of traceroute correctly.
I assume that the placement of output of your commands is different to
mine.

The command that isn't working as I expect are (from your rc.lvs_nat script)

HOPS_TO_DIRECTOR=`traceroute 10.0.144.32 2>/dev/null | grep "(192.168.1.1)" |
cut -c0-4`

so that I can figure out what is happening,
please run these commands and send the output to me

1. traceroute 10.0.144.32
2. traceroute 10.0.144.32 2>/dev/null
3. traceroute 10.0.144.32 2>/dev/null | grep "(192.168.1.1)"
4. traceroute 10.0.144.32 2>/dev/null | grep "(192.168.1.1)" | cut -c0-4

Joe
--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA