Re: Bug report for latest dev release, 1.5.21, segfault when using http expect string x and large 404 page (includes GDB output)
Willy, Can you take me off of this list? Unsubscribing doesn't work. I have no idea why. I've tried many times. The last time I tried, I got back a message that gmail was identified as a spammer. Here is a sample of my unsubscribe message: - snip MIME-Version: 1.0 Received: by 10.140.86.244 with HTTP; Thu, 9 Jan 2014 19:38:56 -0800 (PST) Date: Thu, 9 Jan 2014 22:38:56 -0500 Delivered-To: timprepsc...@gmail.com Message-ID: CAAJ3AvX7XuqRAQkDGZ4k8DqVDsp2Mt=2mnwsyrhsvnb_bwh...@mail.gmail.com Subject: unsubscribe From: Tim Prepscius timprepsc...@gmail.com To: haproxy+unsubscr...@formilux.org Content-Type: text/plain; charset=ISO-8859-1 unsubscribe - snip Thank you, -tim On 1/13/14, Willy Tarreau w...@1wt.eu wrote: Hi again Steve, On Mon, Jan 13, 2014 at 08:44:08AM +0100, Willy Tarreau wrote: Hi Steve, On Fri, Jan 10, 2014 at 02:16:48PM -0800, Steve Ruiz wrote: I'm experimenting with haproxy on a centos6 VM here. I found that when I specified a health check page (option httpchk GET /url), and that page didn't exist, we have a large 404 page returned, and that causes haproxy to quickly segfault (seems like on the second try GET'ing and parsing the page). I couldn't figure out from the website where to submit a bug, so I figure I'll try here first. Steps to reproduce: - setup http backend, with option httpchk and httpcheck expect string x. Make option httpchk point to a non-existent page - On backend server, set it up to serve large 404 response (in my case, the 404 page is 186kB, as it has an inline graphic and inline css) - Start haproxy, and wait for it to segfault I wasn't sure exactly what was causing this at first, so I did some work to narrow it down with GDB. The variable values from gdb led me to the cause on my side, and hopefully can help you fix the issue. I could not make this work with simply a large page for the http response - in that case, it seems to work as advertised, only inspecting the response up to tune.chksize (default 16384 as i've left it). But if I do this with a 404, it seems to kill it. Let me know what additional information you need if any. Thanks and kudos for the great bit of software! Thanks for all these details. I remember that the http-expect code puts a zero at the end of the received buffer prior to looking up the string. But it might be possible that there would be some cases where it doesn't do it, or maybe it dies after restoring it. Another thing I'm thinking about is that we're using the trash buffer for many operations and I'm realizing that the check buffer's size might possibly be larger :-/ I'm a bit puzzled, not only I cannot reproduce the issue, but also I do not see in the code how this could happen, so I must be missing something. Could you please post the output of strace -tt on haproxy when it does this ? Especially the last checks ? I'm suspecting an anomaly in the receive buffer size calculation but all I read here seems fine, which puzzles me. Thanks! Willy
Re: example of agent-check ?
I have tried to unsubscribe from this list through Unsubscribe from the list : haproxy+unsubscr...@formilux.org many times. does this unsubscribe work? Also, I tried to send this message to the ha-proxy news group, but it got bounced back claiming google's ip is a spam bot. Something is not right with this new group. -tim On 1/11/14, Malcolm Turnbull malc...@loadbalancer.org wrote: Sorry only just got around to looking at this and updating my blog entry: Yes the important bit missing was agent-check But my testing with Dev21 seems to bring the servers back fine with any percentage reading i.e. 10% 75% etc. Please let me know if anyone else is having an issue, thanks. server Win2008R2 192.168.64.50:3389 weight 100 check agent-check agent-port inter 2000 rise 2 fall 3 minconn 0 maxconn 0 on-marked-down shutdown-sessions On 27 December 2013 22:44, PiBa-NL piba.nl@gmail.com wrote: Simon Drake schreef op 27-12-2013 17:07: Would it be possible to post an example showing the correct haproxy config to use with the agent-check. By the way I saw the mailing list post recently about the changes to the agent-check, using state and percentage, and I think that the right way to go. For me this config works: serverMyServer 192.168.0.40:80 check inter 5000 agent-check agent-inter agent-port 2123 weight 32 I've tried a few small tests with it, and while bringing a server to 'down' or 'drain' seemed to work, i was missing the 'up' keyword, only 100% seems to bring a server back alive. So if your monitoring 100-%CPUusage and sending that 1on1 back to the agent on a server with 99% cpu capacity available wont come back up.. -- Regards, Malcolm Turnbull. Loadbalancer.org Ltd. Phone: +44 (0)870 443 8779 http://www.loadbalancer.org/
Re: using haproxy with tcp as a router
Thank you for this response. -tim On 11/12/13, Baptiste bed...@gmail.com wrote: Hi Tim, Solution 1 can't work as you want it. HAProxy can look in the payload for an ID, it could match it in a stick table you would have to fill up, but it can't forward the payload on an already established TCP connection. Solution 2 may work, since HAProxy only analyzes HTTP headers. It does not care to what happens in the body. Baptiste On Mon, Nov 11, 2013 at 9:25 PM, Tim Prepscius timprepsc...@gmail.com wrote: I'm wondering if I can use haproxy for my problem: Is it possible for haproxy to: 1. read the first line of a tcp connection 2. in that line will be an ID. 3a. use the ID to lookup in a mem db what server to forward the TCP connection to. 3b. use the ID to lookup in a mem db what server to forward data to through an existing TCP connection. (1 connection per server to ha proxy) Or: Is it possible for haproxy to: 1. read an http request for a http connection. 2. determine what server to foward to based on the page requested. 3. then allow generic tcp data (both upstream/downstream) on that connection (after the headers). I'm also entertaining the possibility of sticking a load balancer in front of multiple instances of a custom router process I create. So that the header inspection doesn't need to take place on the load balancer. I've also described the problem in more detail here: http://stackoverflow.com/questions/19914209/a-load-balancer-for-tcp-with-an-id-to-server-lookup-similar-to-a-chat-room-load -tim
using haproxy with tcp as a router
I'm wondering if I can use haproxy for my problem: Is it possible for haproxy to: 1. read the first line of a tcp connection 2. in that line will be an ID. 3a. use the ID to lookup in a mem db what server to forward the TCP connection to. 3b. use the ID to lookup in a mem db what server to forward data to through an existing TCP connection. (1 connection per server to ha proxy) Or: Is it possible for haproxy to: 1. read an http request for a http connection. 2. determine what server to foward to based on the page requested. 3. then allow generic tcp data (both upstream/downstream) on that connection (after the headers). I'm also entertaining the possibility of sticking a load balancer in front of multiple instances of a custom router process I create. So that the header inspection doesn't need to take place on the load balancer. I've also described the problem in more detail here: http://stackoverflow.com/questions/19914209/a-load-balancer-for-tcp-with-an-id-to-server-lookup-similar-to-a-chat-room-load -tim