LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Update: Null Connection in Service Monitoring

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Update: Null Connection in Service Monitoring
From: Sébastien Bonnet <Sebastien.Bonnet@xxxxxxxxxxx>
Date: Mon, 10 Mar 2003 10:32:50 +0100
Peter,

> I use a test-smtp.sh script as follows to test the appropriate
> existence of smtp port 25 and that it is active on the real
> servers.

I know you're using piranha and shouldn't need an external script for
SMTP. Anyway, let's continue.

> (If I do not give any service monitoring script then LVS uses
> "ipvsadm" to do basic tests of ports.)

You're mixing several things. There's no "ipvsadm" monitoring. IPVS is
*just* a scheduler, it doesn't care about service monitoring. This is
acutally the role of nanny in piranha (can't remember the name of the
equivalent of linuxvirtualserver.org).


> Any ideas on how to fix this simple script to close down the
> connection appropriately???  See below....
> Mar  9 06:46:28 emailserver sendmail[3343]: NOQUEUE:
> [184.186.108.18] did not issue MAIL/EXPN/VRFY/ETRN
> during connection to MTA

It says it all : you did not issue a valid command. So, instead of just
QUIT, issue first MAIL for example, then QUIT. You'll get a warning
message from sendmail, but it won't log anything :)

> TEST=`printf "quit\n" | telnet $1 25 2>/dev/null |grep
> -i "connected"|wc -l` > /dev/null 2>&1

Oh god ! Telnet isn't the right tool here because it takes ages before a
timeout occurs. When you RS is working fine, your test works OK. When
SMTP is down, your script won't return before several tens of seconds :(
There's something call nc (for netcat) which might be way more suitable.

-- 
Sébastien Bonnet
  Centre de contacts - Experian France
<Prev in Thread] Current Thread [Next in Thread>