Re: Binding by Hostname

From: Hank A. Paulson <hap#spamproof.nospammail.net>
Date: Fri, 16 Apr 2010 22:04:06 -0700


Hi,

A few more troubleshooting ideas:

Also, if you do dig www.wildfalcon.com/wildfalcon.com does it resolve to the IPs on the haproxy box?
If you telnet to www.wildfalcon.com 80 on the haproxy box does it work? If so then if you do tcpdump for port 53 and watch that during the haproxy start up are any queries for www.wildfalcon.com getting resolved correctly? Lastly, if you strace haproxy as it starts do you see resolver lib calls that are being answered correctly? I test both because dig seems to search slightly differently from the c resolver libs on RedHat Linux.

I had a case with boa where it refused to start up because the hostname was not resolvable even though I specified an IP address for it to bind to, so just a thought.

On 4/16/10 8:35 AM, Guillaume Bourque wrote:
> Hi Laurie
>
> are the website ip available on the machine where haproxy run ? What os
> is used for your haproxy server?
>
> Bye
>
>
> Laurie Young a écrit :
>> Hi
>>
>> I hope someone can help me here...
>>
>> I'm trying to set up HAproxy to bind two different listeners to
>> different hostnames.
>> I found this in the docs for the bind command:
>> <address> is optional and can be a host name,
>> so i set up my config file like this
>>
>> defaults
>> mode http
>>
>> frontend www
>> bind wildfalcon.com:80 <http://wildfalcon.com:80>
>> timeout client 5000
>>
>> frontend test
>> bind www.wildfalcon.com:80 <http://www.wildfalcon.com:80>
>> timeout client 86400000
>>
>> And I get the following error message
>>
>> Available polling systems :
>> poll : pref=200, test result OK
>> select : pref=150, test result OK
>> Total: 2 (2 usable), will use poll.
>> Using poll() as the polling mechanism.
>> [ALERT] 105/160114 (10091) : Starting frontend www: cannot bind socket
>> [ALERT] 105/160114 (10091) : Starting frontend test: cannot bind socket
>>
>> Why can the socket not be bound to (i'm starting as sudo to ensure I
>> have permissions)?
>>
>> Thanks in advance
>>
>> Laurie
>>
>> --
>> Dr Laurie Young
>> Scrum Master
>> New Bamboo
>>
>> Follow me on twitter: @wildfalcon
>> Follow us on twitter: @newbamboo
>>
>> Creating fresh, flexible and fast-growing web applications is our
>> passion.
>>
>>
>> 3rd Floor, Gensurco House,
>> 46A Rosebery Avenue, London, EC1R 4RP
>>
>> http://www.new-bamboo.co.uk
>
>
Received on 2010/04/17 07:04

This archive was generated by hypermail 2.2.0 : 2010/04/17 07:15 CEST