Re: Source IP not passing through

2012-10-23 Thread Javi Legido
And in the apache server you need to have something like that in your conf (/etc/apache2/apache2.conf in my distro): LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent

Re: Bug in acl_match_ip when IPv6 subnets are used

2012-10-23 Thread Willy Tarreau
Hi Cyril, On Tue, Oct 23, 2012 at 08:58:05AM +0200, Cyril Bonté wrote: > I Willy, > I tracked a bug until late in the night. Working with IPv6 acls, I > discovered that some IPv4 addresses matched IPv6 subnets that shouldn't > (I think it can be the same for IPv6 addresses as well). > > I could

Re: Bug in acl_match_ip when IPv6 subnets are used

2012-10-23 Thread Willy Tarreau
On Tue, Oct 23, 2012 at 09:27:57AM +0200, Willy Tarreau wrote: > > I have to make some more tests today (after work), but I think this can > > be resolved by a 1 line patch in the acl_match_ip function, by calling > > htonl() on the mask : > > v4 &= (~0U) << (32-bits); > > becomes : > > v4 &=

Re: Bug in acl_match_ip when IPv6 subnets are used

2012-10-23 Thread Cyril Bonté
Le 23/10/2012 09:27, Willy Tarreau a écrit : At the moment I'm not certain that this fix is correct because the addresses look in the host order here at first glance. I suspect the issue comes from the v4-to-v6 transformation just above but I may be wrong. Do you have an output of what v4 looked

Re: Bug in acl_match_ip when IPv6 subnets are used

2012-10-23 Thread Cyril Bonté
Le 23/10/2012 09:39, Willy Tarreau a écrit : I feel stupid now. You're obviously right, we're dealing with IPv6 addresses so they're in network order, I was fooled by the name "v4" there. I'm sure your fix is correct then. Please send a patch and I'll apply it. OK, I'll do it before the end of

Re: Source IP not passing through

2012-10-23 Thread Jonathan Matthews
On 23 October 2012 00:21, IT_Contact wrote: > Hi, > My apache access logs on the servers that sit behind my HAproxy server all > show the IP of the HAproxy server as the source/client IP. What am I > missing in my config? Well, despite the fact you haven't shown it to us (!), I can confidently s

Graceful handling of garbage collecting servers?

2012-10-23 Thread Finn Arne Gangstad
Hi, We're running haproxy in front of many services that are written in Java. From time to time, the Java applications need to pause for a while and do garbage collection. It would be extremely beneficial if haproxy could be configured to redispatch all requests that are currently in limbo on a GC

Re: Graceful handling of garbage collecting servers?

2012-10-23 Thread Thomas Heil
Hi, On 23.10.2012 13:55, Finn Arne Gangstad wrote: > Hi, > > We're running haproxy in front of many services that are written in > Java. From time to time, the Java applications need to pause for a > while and do garbage collection. It would be extremely beneficial if > haproxy could be configured

Re: Graceful handling of garbage collecting servers?

2012-10-23 Thread Mariusz Gronczewski
2012/10/23 Thomas Heil : > Hi, > > On 23.10.2012 13:55, Finn Arne Gangstad wrote: >> >> Each request is a reasonably simple GET request that typically takes >> 10-20ms to process. This works great until a server needs to GC, then >> the query will hang for a few seconds. > Iam not quit sure, but I

[PATCH] BUG/MEDIUM: acls using IPv6 subnets patterns incorrectly match IPs

2012-10-23 Thread Cyril Bonté
Some tests revealed that IPs not in the range of IPv6 subnets incorrectly matched (for example "acl BUG src 2804::/16" applied to a src IP "127.0.0.1"). This is caused by the acl_match_ip() function applies a mask in host byte order, whereas it should be in network byte order. --- src/acl.c |

Backends Referencing other Backends?

2012-10-23 Thread Joel Krauska
Hello fellow Haproxy users. Here are some thoughts and example ideas about backend definitions and seeing if anyone has thought of these features or if they're even possible today. Cheers, Joel Krauska 1. 'Stats only backend' I'd like to keep stats for a certain matching condition, but don't

Re: [PATCH] BUG/MEDIUM: acls using IPv6 subnets patterns incorrectly match IPs

2012-10-23 Thread Willy Tarreau
On Tue, Oct 23, 2012 at 09:28:31PM +0200, Cyril Bonté wrote: > Some tests revealed that IPs not in the range of IPv6 subnets incorrectly > matched (for example "acl BUG src 2804::/16" applied to a src IP "127.0.0.1"). > > This is caused by the acl_match_ip() function applies a mask in host byte >

hdr_ip/url_ip/urlp_ip don't support IPv6 values

2012-10-23 Thread Cyril Bonté
Hi Willy, The documentation part from commit ceb4ac9c[1] states that hdr_ip, url_ip and urlp_ip now support IPv6 values, but the code doesn't support it : smp_fetch_hdr_ip() and smp_fetch_url_ip() only accept IPv4 string values. I wonder if it's a documentation bug, or if you have already wri

Path_reg to multiple servers

2012-10-23 Thread Rahul
Hi, If I have URL of the form /q/a/1234 or /q/b/456 or /q/c/987 and /q/x/abc or /q/y/3455 I want to route any URLs of the form /q/[a|b|c]/.* i.e anything which is meant to the queues a or b or c to one backend, and anything which is meant for /q/[x|y]/.* to a different backend, how would

Re: hdr_ip/url_ip/urlp_ip don't support IPv6 values

2012-10-23 Thread Willy Tarreau
Hi Cyril, On Wed, Oct 24, 2012 at 01:19:11AM +0200, Cyril Bonté wrote: > Hi Willy, > > The documentation part from commit ceb4ac9c[1] states that hdr_ip, > url_ip and urlp_ip now support IPv6 values, but the code doesn't support > it : > smp_fetch_hdr_ip() and smp_fetch_url_ip() only accept IPv