Reputation: 11
I want to set load balancer for syslog-ng messages, so let say several boxes are sending TCP 514 messages to fronend interface of HAProxy box - 192.168.0.20 and there is one graylog server to which those messages are passed - 10.0.0.2.
Below simplest possible config doesn't work.
defaults mode tcp
frontend main bind 192.168.0.20:514 use_backend graylog
backend graylog server graylog1 10.0.0.2:514
Tcpdump is showing that HAProxy is sending RST flag to incoming messages on 514. I believe I should see HAProxy listening on 514 with netstat?
Upvotes: 1
Views: 3497
Reputation: 3373
Here is a config that should work. You have to be root (or sudo) to bind to port 514 though.
defaults
mode tcp
timeout connect 5000ms
timeout client 50000ms
listen graylog
bind *:514
mode tcp
balance roundrobin
server graylog1 10.0.0.1:514
server graylog2 10.0.0.1:514
timeout connect 20s
timeout server 30s
Upvotes: 0
Reputation: 3541
RST for SYN packet means the port is not open for connection. Use netstat utility to determine if the ports are open. RST can also be sent when the entity wants to close the established connection for good.
Upvotes: 0