LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] CentOS-5 VLS doesn't virtual httpd doesnt failover when

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] CentOS-5 VLS doesn't virtual httpd doesnt failover when httpd dies
From: Nick Stephens <nick@xxxxxxxxxxxxx>
Date: Mon, 2 Jul 2007 15:45:56 -0700 (PDT)
NS> Joseph Mack NA3T (jmack@xxxxxxxx) JMN wrote today:

JMN> On Mon, 2 Jul 2007, Nick Stephens wrote:
JMN> 
JMN> > Hi all,
JMN> >
JMN> > I have setup a test environment for determining if VLS would be a good
JMN> 
JMN> LVS

My apologies, my brain was in the wrong spot ;)

JMN> 
JMN> > CentOS 5 server setup [weblb.domain.com] as primary VLS router (no backup
JMN> > in the lab yet) with one external IP address (no internal) using Direct
JMN> > routing with IPTables marking port 80/443 traffic with "80"
JMN> 
JMN> hmm don't know what this last line means. Are you scheduling 
JMN> LVS with fwmarks?

Yes, using fwmarks.  from the LVS router: 
-A PREROUTING -d x.x.x.x -p tcp -m tcp --dport 80 -j MARK --set-mark 0x50 
-A PREROUTING -d x.x.x.x -p tcp -m tcp --dport 443 -j MARK --set-mark 0x50

and from the Real Servers:
-A PREROUTING -d x.x.x.x -p tcp -m tcp --dport 80 -j REDIRECT

JMN> 
JMN> > 2 CentOS 5 webservers setup [web01 and web02] with one external IP each
JMN> > and IPTables setup for PREROUTING information.
JMN> 
JMN> it's best to try setting up an LVS without iptables, then 
JMN> add the rules after it's working.

Yah, when reading through the RHEL setup guide I went with IPTables and 
direct routing because it was what I wanted as an end result.  I'd been 
tossing around the idea of using a NAT solution just to test, but it felt 
like somewhat of a circular motion since that isn't what I want in the 
end.

JMN> 
JMN> > When I create my intial connection to the VIP, it passes me correctly to
JMN> > one of the machines.  However, if I shutdown apache on that box, or
JMN> > poweroff the machine entirely, I am never redirected to the online box,
JMN> > nor do any alarms go off.
JMN> >
JMN> > I am using the default monitoring script included,
JMN> 
JMN> there's a million distros out there and you must excuse me 
JMN> if I have no idea what the default script for yours is.

I apologize, CentOS = RHEL, and the default monitoring script is simply 
and http get:

     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "1.3.37"
     use_regex = 0

JMN> 
JMN> > and I can see it opening port 80 on both web01 and web02 
JMN> > (by looking at apache access logs), but it doesn't seem to 
JMN> > want to fail over.  Furthermore, if I manually go in and 
JMN> > deactivate a Real Server, it still continues to try to 
JMN> > send traffic to it.
JMN> >
JMN> > I have looked around on Redhat's site and the web for 
JMN> > general debugging and troubleshooting guides, but I am at 
JMN> > a bit of a loss.  Does anyone have any suggestions on 
JMN> > where to start looking?
JMN> 
JMN> How about in the LVS HOWTOs

I actually just found this website thbis morning, so I am heading there 
now :)  I was just curious if it was a common issue that people experience 
with the router not being properly notified that a machine is down.


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