0

In log of haproxy i see an cD flag. Balancer is in front of rabbitmq nodes. When nagios checking nodes, log looks like this: SD flag

[10/Nov/2014:14:48:01.190] from NAGIOS IP to Rabbitmq:5672 rabbitmq_01 SD req_size=6 resp_size=0

And when client connects, log looks like this: cD flag. Client connects from tomcat.

[10/Nov/2014:14:43:52.692] from  Client to Rabbitmq:5672 rabbitmq_-02 cD req_size=853 resp_size=686

If i change timeout from 200s, to 300s, then message in log looks like:

[10/Nov/2014:15:25:42.576] from  Client to Rabbitmq:5672 rabbitmq_02 SD req_size=937 resp_size=681

Cant understand how to fix timeouts, and avoid this problem about SD, cD flags.

Haproxy conf looks like this

defaults
    log     global
    mode    tcp
    option  tcplog
    option  dontlognull
    option redispatch
    retries 3
    timeout connect 5000
    timeout client  200s
    timeout server  200s

          frontend localnodes    
bind *:5673    
mode tcp    
option tcplog    
log global    
log-format [%t]\ from\ %ci:%cp\ to\ %si:%sp\
    %s\ %ts\ req_size=%U\ resp_size=%B    
default_backend rabbit
    backend rabbit
    mode tcp
    log global
    option tcplog
    option tcpka
    balance roundrobin
    server rabbitmq_01 :5672 check
    server rabbitmq_02 :5672  check
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
user3904465
  • 11
  • 1
  • 2
  • 6
  • This won't address the server disconnects, but on your frontend, can you try enabling keepalives? – Jim G. Nov 10 '14 at 21:11
  • No, nothing... and something strange, log writes only when client was disconnected. Or sometimes even not writing logs at all – user3904465 Nov 11 '14 at 07:13

1 Answers1

1

I have also seen random issues with 'SD--' termination state in haproxy logs while trying to download big file which is served by apache tomcat.

The problem was fixed by increasing connectionTimeout from 5 seconds to 30 seconds in tomcat connector's configuration.

Maybe rabbitmq has some similar tunables also.

Sysadmin
  • 111
  • 1