Re: RabbitMQ-HAProxy raising a exception.
Stupid question, but what ports do you have defined in your “bunnies.config” file? I see you listening on 5678 but I know the default port for Rabbit is 5672. I see 5672 listed in your haproxy config but RabbitMQ might be listening elsewhere. Also, what client are you using to make the connection? I would also check its config file as well to point to port 5678 as most will think you are using 5672. On Feb 6, 2014, at 3:47 PM, Willy Tarreau w...@1wt.eu wrote: Hi, On Thu, Feb 06, 2014 at 02:25:02PM -0600, Ryan O'Hara wrote: On Thu, Feb 06, 2014 at 02:15:31PM -0600, Kuldip Madnani wrote: I have the following setting for HAProxy and no settings in client for connectionFactory: defaults log global modetcp option tcplog option dontlognull retries 3 option redispatch maxconn 4096 timeout connect 5s # default 5 second time out if a backend is not found timeout client 300s timeout server 300s OK. 300s is more than enough. # Entries for rabbitmq_CLUSTER6 Listener #--# listen rabbitmq_CLUSTER6 *:5678 mode tcp maxconn8092 option allbackups balanceroundrobin server LISTENER_rabbitmq_CLUSTER6_zldv3697_vci_att_com_5672 zldv3697.XXX.XXX.com:5672 weight 10 check inter 5000 rise 2 fall 3 ## Do these values impact and throw java.io.EOFException. I have no idea. My first thought was the your connections were timing out and the application didn't handle it well. I don't think this is an haproxy issue. I have haproxy working in front of a RabbitMQ cluster and have not hit any problems. The configuration I am using can be found here: http://openstack.redhat.com/RabbitMQ Do you know if any port information is transported in the protocol ? Since haproxy and the server are on different ports, this could be one possible explanation. Willy
Re: how to force curernt session when active is down
This may more to due with Rabbit (or AMPQ clients) than HAProxy. Do you have Rabbit 01 and 02 in a cluster or are they separate nodes? On Jan 16, 2014, at 11:28 PM, Andrei Chevenkov ache...@gmail.com wrote: Hi, I am pretty new to haproxy and trying to do ha setup for rabbitmq. Setup is pretyt simple: listen rabbitmq 192.168.69.106:5672 modetcp balance leastconn option tcplog option tcpka server rabbit01 192.168.69.107:5672 check inter 1000 downinter 5000 fall 1 on-error mark-down server rabbit02 192.168.69.108:5672 check inter 1000 downinter 5000 fall 1 on-error mark-down backup Everything seems to work well, but I noticed one strange behaviour. If I gracefully shut down rabbit01, message producer (client) connected to 192.168.69.106:5672 notices broken connection pretty much straight away, attempts a reconnect, hits rabbit02 and all is well. However if I simply turn off rabbit01, message producer (client) notices broken connection only in around 30 seconds or so. And while the break is undetected it keeps pushing messages thinking there is still someone on another side. Now, from the statistic report I can see that as soon as I turn off the box, rabbit01 is marked as DOWN, but its Sessions Current is still set to 1? In the logs this comes up pretty much immediately after the hard turn off: Jan 17 17:13:51 prodlb01 haproxy[38459]: Server rabbitmq/rabbit01 is DOWN, reason: Layer4 timeout, check duration: 1008ms. 0 active and 1 backup servers left. Running on backup. 1 sessions active, 0 requeued, 0 remaining in queue. After around 30 seconds, the connection is detected as broken and failover happens successfully. At that time Sessions Current is set to 0 fo rabbit01. Tried option nolinger and option abortonclose, but no luck. Any help would be much appreciated... Cheers, Andrei