LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-25-2009, 02:59 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
Question apache2 + ldirectord + heartbeat


Hi!

I'm configuring a loadbalancing web server.

In my previous experiments, I was able to get heartbeat to control a apache2 service directly. Now, I want to go to the next stop: use ldirectord to load balance between 2 apache servers.

It's a 4-host environment. All 4 hosts are connected to the same lan switch. As a matter of fact, it's all working on virtual machines. I have 4 virtual machines (qemu) connected to a bridge that enables connection to my real machine.

Now, I have configured ldirectord so that it recognizes when an apache server goes up or down on both loadbalancers and heartbeat is able to switch the ldirectord service between both nodes.

Now, after i start the whole thing, i just don't see any changes at all in networking in the active ldirectord host (besides the addition of the virtual IP, of course).

Now, I _guess_ there should be a mechanism through which requests arriving at the virtual IP are sent to the real servers, however, I see nothing like that. Nothing with netstat -lntp, nothing with NATting, nothing at all. So I guess I simply skipped something on the ldirectord configuration to finish the whole thing. What could it be?

Here's the ldirectord.cf file:
Code:
checktimeout=3
checkinterval=5
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=yes
virtual=192.168.200.106:80
        fallback=127.0.0.1:80
        real=192.168.200.101:80 gate
        real=192.168.200.102:80 gate
        service=http
        request="ldirector.txt"
        receive="ldirector"
        scheduler=wlc
        protocol=tcp
        checktype=negotiate
What am I missing?

Thanks in advance.
 
Old 08-25-2009, 03:27 PM   #2
Rush_898
Member
 
Registered: Mar 2004
Distribution: debian...
Posts: 31

Rep: Reputation: 16
So I use a similar formula substituting keepalived for ldirector. The functions provided here are:

Apache - Web hosting
Heartbeat - Director Failover
Ldirectord - Configuration frontend for LVS (which is maybe what you are missing? http://www.linuxvirtualserver.org/software/ipvs.html)

If you do have LVS then possibly IP Forwarding is not enabled?
 
Old 08-25-2009, 04:46 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
I got it to work. I'm checking the details and then I'll post what was missing. Thanks for your help... you certainly guided to the place where I had to look.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Heartbeat and Apache2 on Debian eantoranz Linux - Networking 6 05-25-2010 01:22 PM
Heartbeat + ldirectord ptemmerman Linux - Server 1 10-23-2008 05:47 AM
SuSe Apache2 error: cannot adjust 'apache2' service sir_shunt SUSE / openSUSE 14 04-18-2006 11:36 AM
ldirectord initialization error depdiver Linux - Software 0 05-12-2005 04:38 PM
squid with ldirectord---------------- pal Linux - Networking 0 02-22-2005 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration