LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: setting up ldirectord.cf : subnet for real servers

To: Vijay K <vijay_k@xxxxxxxxxxxxx>
Subject: Re: setting up ldirectord.cf : subnet for real servers
Cc: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 23 Aug 2005 20:06:13 +0900
On Tue, Aug 23, 2005 at 12:51:19PM +0530, Vijay K wrote:
> 
> Hi,
> I have copied the ldirectord.cf file into a file named www in
> /etc/ha.d/conf/. and added ldirectord::ww in haresources.
> Now i have some wierd statements and also some issues
> i)Earlier i used to invoke ldirectord with /usr/sbin/ldirectord
> /etc/ha.d/ldirectord.cf ........ now when i use this command for checking
> teh status it says exiting.
> the log file looks like this :

It seems that you are trying to start ldirectord twice with the same
configuration, and thus the second invocation is failing.
This is what the logs are trying to tell you.
If you want to check its status, try:

/usr/sbin/ldirectord /etc/ha.d/ldirectord.cf status

If you want to start it in debugging mode, first stop it

/usr/sbin/ldirectord /etc/ha.d/ldirectord.cf stop

Then start it in debugging mode

/usr/sbin/ldirectord -d /etc/ha.d/ldirectord.cf status

> Tue Aug 23 11:06:35 2005|www] ldirectord is stopped for /etc/ha.d/conf/www
> [Tue Aug 23 11:06:35 2005|www] Exiting with exit_status 1: Initialisation
> Error
> [Tue Aug 23 11:06:44 2005|www] ldirectord for /etc/ha.d/conf/www is already
> running with pid: 22736
> [Tue Aug 23 11:06:44 2005|www] Exiting with exit_status 1: Initialisation
> Error
> [Tue Aug 23 11:11:42 2005|ldirectord.cf] ldirectord is stopped for
> /etc/ha.d/ldirectord.cf
> [Tue Aug 23 11:11:42 2005|ldirectord.cf] Exiting with exit_status 1:
> Initialisation Error
> [Tue Aug 23 11:14:44 2005|www] ldirectord is stopped for /etc/ha.d/conf/www
> [Tue Aug 23 11:14:44 2005|www] Exiting with exit_status 1: Initialisation
> Error
> [Tue Aug 23 11:14:53 2005|www] ldirectord for /etc/ha.d/conf/www is already
> running with pid: 23690
> [Tue Aug 23 11:14:53 2005|www] Exiting with exit_status 1: Initialisation
> Error
> [Tue Aug 23 11:39:50 2005|www] ldirectord is stopped for /etc/ha.d/conf/www
> [Tue Aug 23 11:39:50 2005|www] Exiting with exit_status 1: Initialisation
> Error
> [Tue Aug 23 11:39:58 2005|www] ldirectord for /etc/ha.d/conf/www is already
> running with pid: 24946
> [Tue Aug 23 11:39:58 2005|www] Exiting with exit_status 1: Initialisation
> Error
> [Tue Aug 23 11:42:48 2005|ldirectord] ldirectord is stopped for
> /etc/ha.d/ldirectord.cf
> [Tue Aug 23 11:42:48 2005|ldirectord] Exiting with exit_status 1:
> Initialisation Error
> [Tue Aug 23 11:43:16 2005|ldirectord] ldirectord is stopped for
> /etc/ha.d/ldirectord.cf
> [Tue Aug 23 11:43:16 2005|ldirectord] Exiting with exit_status 1:
> Initialisation Error
> [Tue Aug 23 11:52:27 2005|www] ldirectord is stopped for /etc/ha.d/conf/www
> [Tue Aug 23 11:52:27 2005|www] Exiting with exit_status 1: Initialisation
> Error
> [Tue Aug 23 11:52:34 2005|www] ldirectord is stopped for /etc/ha.d/conf/www
> [Tue Aug 23 11:52:34 2005|www] Exiting with exit_status 1: Initialisation
> Error
> 
> 
> ii)Also when i give ip adress range for realservers in the director
> configuration file the ldirectord sevice is getting stopped.I mean i am
> giving teh range like real = 10.10.33.11-10.10.33.15:80 masq
> if i again change teh real entries into diff lines it is working fine :
> real= 10.10.33.11:80 masq
> real=10.10.33.12:80 masq
> What is teh rpoblem?Am i not giving the real server range in a correct
> fashion?

Sorry, my previous advice was slightly inacuatre.
As per the documentation, the syntax is:

real=10.10.33.11->10.10.33.15:80 masq

> And when i start the www in debug mode with -d it shows as follows:
> 
>  EBUG2: Added virtual server: 10.10.30.30:80
> Added virtual server: 10.10.30.30:80
> DEBUG2: Running system(./ipvsadm -a -t 10.10.30.30:80 -r 127.0.0.1:80 -g -w
> 1)
> Running system(./ipvsadm -a -t 10.10.30.30:80 -r 127.0.0.1:80 -g -w 1)
> Usage: ipvsadm
>           {start|stop|restart|status|panic|save|reload|reload-force}
> DEBUG2: system(./ipvsadm -a -t 10.10.30.30:80 -r 127.0.0.1:80 -g -w 1)
> failed
> system(./ipvsadm -a -t 10.10.30.30:80 -r 127.0.0.1:80 -g -w 1) failed
> DEBUG2: Added fallback server: 127.0.0.1:80 ( x 10.10.30.30:80) (Weight set
> to 1)
> Added fallback server: 127.0.0.1:80 ( x 10.10.30.30:80) (Weight set to 1)
> DEBUG2: Disabled server=10.10.33.12
> DEBUG2: Disabled server=10.10.33.11
> DEBUG2: Checking connect: real
> server=connect:tcp:10.10.33.11:80:::\/index\.html:vFortress\ Enterprise\
> Server (virtual=tcp:1
> 0.10.30.30:80)
> DEBUG3: Connected to  (port 80)
> 
> When i start the ldirector service without -d the ps command shows taht
> ldirectord is working.

It looks like you are running this command from within the
/etc/initr.d directory. One of the properties of debuging mode
is that if there is an ipvsadm programme present in the local
working directory it uses that instead of looking for one
in /sbin and then /usr/sbin.

The reason for this is that it is useful to be able to have a local
version of ipvsadm executed by ldirectord during development and
testing. However, it just so happens that in /etc/initr.d there
is a script called ipvsadm which can be used to initialise
LVS at boot (not usually used if you run ldirectord). This isn't
however the ipvsadm binary that configures your LVS, and thus the
failure.

Try running ldirectord from another directory, that doesn't have
a programme called ipvsadm there, say /root


> iii)Thinking that there is a problem with the request i have changed teh
> check type to connect and teh problem is still there

The best way to work out what is going wrong, regardless of the check
type is to use the debuging output. Hopefully this mail should iron
out the problems you had getting that up and running.

-- 
Horms

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