Hi,
On Thu, Jun 19, 2008 at 10:30:10AM +0200, Mads Johansen wrote:
> Hello there.
>
> The idea is this: Get a reverse proxy sat up in America to send traffic to our main website.
> So all it needs to do is this:
>
> Client <-> HAproxy <-> Backend
>
> How do I make that happen with the least configuration?
>
> What I have done so far:
> Installed Ubuntu 8.04
> Apt-get update/upgrade
> Apt-get install haproxy (gives me version 1.3.12 2007/06/17): The installer made a new user and a new user group (both named haproxy)
> Edited the /etc/haproxy.cfg: Commented out everything that I didn't think I should use:
>
> So I'm down to this
> Global:
> Maxconn 16384
> User haproxy
> Group haproxy
>
> Defaults
> log global
> mode tcp
you should use "mode http" here if you use "option httpclose below".
> maxconn 4000
>
> listen HOSTNAME 0.0.0.0:80 (To make it listen to all interfaces on port 80)
> balance roundrobin (kind of useless as it's only sending the traffic on to one server (which does load balancing on to other servers. And no, that cannot be changed)
> server SERVERNAME x.x.x.x:80 (Do I need to have a weight on this?)
> option httpclose (Useful in tcp mode? OR should I make it http mode and that way throw KeepAlive away?)
>
> The problem then (assuming nothing is wrong with my logic in putting this together) is that I can't get any response from the backend server.
>
> To debug I've started haproxy with this command (as per recommended by people on IRC): haproxy -f /etc/haproxy.cfg -d
> Available polling systems :
> select : pref=150, test result OK
> sepoll : disabled, test result OK
> epoll : disabled, test result OK
> poll : disabled, test result OK
> Total: 4 (1 usable), will use select.
> Using select() as the polling mechanism.
>
> 00000001:HOSTNAME.accept(0003)=0005 from [MY.IP.x.x:58789]
> 00000001:HOSTNAME.srvcls[0005:ffff]
> 00000001:HOSTNAME.clicls[0005:ffff]
> 00000001:HOSTNAME.srvcls[0005:ffff]
> 00000001:HOSTNAME.closed[0005:ffff]
>
>
> What I get in the client is this:
>
> 10:09:51.168[251ms][total 297ms] Status: 200[OK]
> GET http://IP.OF.WEB.SERVER/ Load Flags[VALIDATE_ALWAYS LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Content Size[-1] Mime Type[application/x-unknown-content-type]
>
> Request Headers:
> Host[IP.OF.WEB.SERVER]
> User-Agent[Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14]
> Accept[text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5]
> Accept-Language[en-us,en;q=0.5]
> Accept-Encoding[gzip,deflate]
> Accept-Charset[ISO-8859-1,utf-8;q=0.7,*;q=0.7]
> Keep-Alive[300]
> Connection[keep-alive]
> Cache-Control[max-age=0]
> Response Headers:
> Status=OK - 200
>
>
> Which means: It only gets the OK header, not the actual content.
>
> So, any ideas?
There's no reason for this. Either there is a communication problem between your two sites (eg: reduced MTU due to a VPN), or there is simply a bug in this version of haproxy (1.3.12 is quite old now).
Please retry with 1.3.14.5 or 1.3.15.1. You may also want to enable logging and consult the logs.
Regards,
willy
Received on 2008/06/20 06:58
This archive was generated by hypermail 2.2.0 : 2008/06/20 07:00 CEST