Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] ldirectord http monitoring

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


daniel.lemay at ec

May 19, 2009, 12:00 PM

Post #1 of 4 (866 views)
Permalink
[lvs-users] ldirectord http monitoring

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?

Daniel

Thanks



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

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


horms at verge

May 19, 2009, 4:39 PM

Post #2 of 4 (795 views)
Permalink
Re: [lvs-users] ldirectord http monitoring [In reply to]

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 [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


daniel.lemay at ec

May 20, 2009, 12:22 PM

Post #3 of 4 (793 views)
Permalink
Re: [lvs-users] ldirectord http monitoring [In reply to]

Hi Simon,

virtualhost directive was exactly what I needed.

With ngrep (great tool!), I have been able to see that for the wget that
was working, value for Host field was: example1.com:7777,
thus I put:

virtualhost=example1.com:7777 (virtualhost=example1.com was not working)

Thanks for your help

Daniel

Simon Horman wrote:
> 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 [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

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


horms at verge

May 20, 2009, 5:12 PM

Post #4 of 4 (790 views)
Permalink
Re: [lvs-users] ldirectord http monitoring [In reply to]

On Wed, May 20, 2009 at 07:22:35PM +0000, Daniel Lemay wrote:
> Hi Simon,
>
> virtualhost directive was exactly what I needed.
>
> With ngrep (great tool!), I have been able to see that for the wget that
> was working, value for Host field was: example1.com:7777,
> thus I put:
>
> virtualhost=example1.com:7777 (virtualhost=example1.com was not working)
>
> Thanks for your help

Great, glad to hear that things are working.

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

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

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.