It might be clearer if I explain the end goal. I have 1 host, answering on two different host names. lets call them * shorttimeout.wildfalcon.com * longtimeout.wildfalcon.com
and I need to set different client timeouts for each one. I thought about doing it as: frontend shorttimeout.wildfalcon.com bind shorttimeout.wildfalcon.com:80 timeout client 5000 frontend longtimeout.wildfalcon.com bind longtimeout.wildfalcon.com:80 timeout client 86400000 But could not make this work, first because the hostname was not resolvable - but then only one fronted could bind. (is this because only one socket to port 80 can be opened) Then I tried something like frontend all bind :80 acl is_long hdr_dom(Host) -i longtimeout timeout client 5000 timeout client 86400000 if is_long but this also didn't seem to work (all connections had a timeout of 5000) On 17 April 2010 06:04, Hank A. Paulson <[email protected]>wrote: > 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 >>> >> >> >> > -- 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

