Re: "observe layer7" acceptable response codes

2012-03-15 Thread Willy Tarreau
On Sun, Mar 11, 2012 at 05:11:10PM +, Jonathan Matthews wrote: > On 10 March 2012 07:20, Willy Tarreau wrote: > > On Wed, Mar 07, 2012 at 02:40:20PM +, Jonathan Matthews wrote: > >> It seems to me that there's a trivial DoS available whenever "observe > >> layer7" is enabled if, as I'm ima

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Carlo Flores
Hey Michele. I'm confused as to how "show stat" is correct... >According to the statistics I have retrieved by means of "show stat" after enabling disabling servers, it looks like the socket is working as expected. But your script does not correspond to this even though it uses "show stat"... >

Re: hdr_end(host) not matching?

2012-03-15 Thread Willy Tarreau
Hi, On Sun, Mar 11, 2012 at 07:36:42PM +, Jonathan Matthews wrote: > On 6 February 2012 19:19, Jonathan Bond-Caron wrote: > > frontend gde_mtl *:80 > >     acl host_static hdr_end(host) mvdd.net > >     use_backend static if host_static > >     default_backend dyna

Re: Re: How to select a server based on client ip ?

2012-03-15 Thread wsq003
Thanks, Carlo. It works. But can it be simpler? such as: frontend http bind :80 mode http default_backend pool backend pool server s01 2.3.4.1:80 server s02 2.3.4.2:80 server s03 2.3.4.3:80 use_server s01 if { src 217.192.7.0/24 } We have many servers for different developers, the rul

Re: Crash with ss-20120310 and ss-20120311

2012-03-15 Thread Sander Klein
Hey Willy, On 15.03.2012 07:53, Willy Tarreau wrote: Hi, On Tue, Mar 13, 2012 at 07:05:36PM +0100, Baptiste wrote: Hey, I guess Willy would be keen to get the core dump and the haproxy binary with its configuration. You should try to reach him directly. Yes Sander, please can you send me a

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Michele Mazzucco
Hello Willy, I have just upgraded HAProxy from 1.4.18 to 1.4.20 and it looks like the problem occurs when enabling servers only. 2012-03-15 08:13:55,191 Disabling reserves 2012-03-15 08:13:55,191 disable server www/i-95f89df1 ; disable server www/i-8bf89def ; disable server www/i-97f89df3

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Michele Mazzucco
Hi Carlo, On Mar 15, 2012, at 9:04 AM, Carlo Flores wrote: > Hey Michele. > > I'm confused as to how "show stat" is correct... > > >According to the statistics I have retrieved by means of "show stat" after > >enabling disabling servers, it looks like the socket is working as expected. > >

Re: Crash with ss-20120310 and ss-20120311

2012-03-15 Thread Willy Tarreau
Hi Sander, On Thu, Mar 15, 2012 at 08:44:43AM +0100, Sander Klein wrote: > Of course we are using it in production ;-) But I do have a fail-over > situation so I think I dare running it again. It can take some time > before crashing. OK, so be careful anyway! > >If you could send me your confi

custom check in checks.c

2012-03-15 Thread Anton Kiryushkin
Hello all. I'm try to write custom check my MsSQL servers. Now I can check they by network ip and port. But maybe situation, then same MsSQL server is alive, but database is down. So, I add my check in proxy.h, cfgparse.c, and checks.c in event_srv_chk_r. After compile HAProxy is started, but my c

Balancing based on cookie from URL

2012-03-15 Thread Kamil Gorlo
Hi guys, I want to use HAproxy as a LB to my HTTP API, but I want to balance requests based on some route_id provided either in cookie or in URI (flash apps cannot set headers in requests). It looks that only appsession supports reading URI,. Is there any way to do this with cookie option? Or how

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Willy Tarreau
Hi Michele, On Thu, Mar 15, 2012 at 10:16:36AM +0200, Michele Mazzucco wrote: > Hello Willy, > > I have just upgraded HAProxy from 1.4.18 to 1.4.20 and it looks like the > problem occurs when enabling servers only. Then you got me lost. Could you please detail exactly what you observe after you

Re: Crash with ss-20120310 and ss-20120311

2012-03-15 Thread Sander Klein
On 15.03.2012 10:10, Willy Tarreau wrote: Do you care which snapshot I run? Ideally the first one which exhibited the issue. BTW, do you know which most recent one you used without the issue ? Eg: do you know if 20120306 has the same issue ? I'm currently running 20120207 which doesn't gi

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Michele Mazzucco
Hi Willy, I apologize if I wasn't clear. The comment in my previous email means that the servers were enabled, as expected. In other words, disabling servers seems to work fine ALL the times, while enabling servers works from time to time only. In the scenario described by those logs (see my pr

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Willy Tarreau
Hi again, On Thu, Mar 15, 2012 at 11:42:24AM +0200, Michele Mazzucco wrote: > Hi Willy, > > I apologize if I wasn't clear. The comment in my previous email means that > the servers were enabled, as expected. > In other words, disabling servers seems to work fine ALL the times, while > enabling

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Michele Mazzucco
Hello Willy, when the 'enable' command fails, it ignores ALL the servers in the list, e.g., see line 2 and line 4 of the logs below. The command is exactly the same, however it fails at the first attempt. For testing purposes, I have now added a small sleep (40 ms) between the enable/disable c

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Willy Tarreau
On Thu, Mar 15, 2012 at 12:03:02PM +0200, Michele Mazzucco wrote: > Hello Willy, > > when the 'enable' command fails, it ignores ALL the servers in the list, > e.g., see line 2 and line 4 of the logs below. The command is exactly the > same, however it fails at the first attempt. I have rechecked

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Jonathan Matthews
On 15 March 2012 08:21, Michele Mazzucco wrote: > I don't think it's a problem related to the web interface -- socat behaves > like my script, i.e., it fails to enable servers from time to time. Michele - I think the most useful thing you can do is to provide a socat invocation that causes the

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Michele Mazzucco
Hello, the attached Python script can be used to reproduce the problem. No external library is necessary. Cheers, Michele ''' Created on Mar 15, 2012 @author: Michele Mazzucco ''' import sys, time, subprocess, string # backend backend = 'www' # list of servers servers_list = ['i-932dbef7', '

Re: problems with enabling/disabling servers via socket

2012-03-15 Thread Michele Mazzucco
Hello Jonathan, I have already sent Willy the strace logs. Cheers, Michele On Mar 15, 2012, at 4:59 PM, Jonathan Matthews wrote: > On 15 March 2012 08:21, Michele Mazzucco wrote: >> I don't think it's a problem related to the web interface -- socat behaves >> like my script, i.e., it fails to

Re: custom check in checks.c

2012-03-15 Thread Baptiste
Hi, I'm currently working on HAProxy's health check: reordering and updating the documentation, renaming some checks and adding new onses (IMAP and POP for now). You have to update 2 files, cfgparse.c and checks.c. The best is to look a t the code for smtpchk, for example, and to try to reproduce