LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] ldirectord http monitoring

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] ldirectord http monitoring
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Wed, 20 May 2009 09:39:14 +1000
On Tue, May 19, 2009 at 07:00:44PM +0000, Daniel Lemay wrote:
> Hi,
> 
> I have a service like the following:
> 
> virtual=x.x.x.x:7777
>    real=192.168.58.1:7777 masq
>    real=192.168.58.2:7777 masq
>    service=http
>    request="index.html"
>    receive="Test page"
>    scheduler=rr
>    protocol=tcp
> 
> 
> The url I want to monitor is: http://example1:7777/index.html
> 
> The following wget works: wget http://example1.com:77777/index.html,
> but http://example1:7777/index.html  and 
> http://192.168.58.1:7777/index.html doesn't (the address is resolved, 
> but the server (oracle stack)) doesn't return the page (Bad request).
> 
> 
> In my /etc/hosts I have the following line:
> 192.168.58.1 exemple1.com example1
> 
> I suppose the Oracle stack is "badly configured" (only works with FQDN) 
> but I have no control on this.
> 
> My questions:
> 
> 1) Is ldirectord creating the url with the IP or it gets the name in 
> /etc/hosts? I supposed the IP since it doesn't work and the FQDN is the 
> first in my /etc/hosts file.
> 
> 2) Is there a way for me to "force" ldirectord to used the FQDN in the url?

Hi Daniel,

In all cases ldirectory will connect to 192.168.58.1 port 7777.
I suspect that oracle is expecting the HTTP client to specify
a virtual host inside the HTTP request, which would explain the
behaviour that you have obverved with wget. You should be able to
observe this using a tool like ngrep.

Could you try adding the virtualhost directive to your configuration?
Something like the following:

virtual=x.x.x.x:7777
   real=192.168.58.1:7777 masq
   real=192.168.58.2:7777 masq
   service=http
   request="index.html"
   receive="Test page"
   scheduler=rr
   protocol=tcp
   virtualhost=example1.com

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

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