Dear Mr Huuskonen,
I would like to return the haproxy.cfg as it was, the error now is local@PGSYNCTEST:~$ sudo -u haproxy /etc/init.d/haproxy restart * Restarting haproxy haproxy [WARNING] 078/171401 (1267) : [/usr/local/sbin/haproxy.main()] Cannot raise FD limit to 90034. [ALERT] 078/171401 (1267) : Starting frontend GLOBAL: error when trying to preserve previous UNIX socket [/var/run/haproxy.sock] [ALERT] 078/171401 (1267) : Starting frontend pgdbplatform_frontend_cluster01: cannot bind socket [0.0.0.0:5432] Other tests local@PGSYNCTEST:~$ sudo service rsyslog status rsyslog start/running Hence rsyslog is running well But local@PGSYNCTEST:~$ sudo netstat -aun | grep 514 (nothing output) local@PGSYNCTEST:~$ sudo netstat -napt | grep 514 (nothing output) local@PGSYNCTEST:~$ logger -d -n 127.0.0.1 −p local0.info "Test message" I open /var/log/syslog and we see it here Mar 20 17:06:50 PGSYNCTEST logger: −p local0.info Test message I would like to send you the haproxy.cfg as -------------------- global log 127.0.0.1 local0 log 127.0.0.1 local1 notice maxconn 45000 # Total Max Connections. This is dependent on your limit user haproxy group haproxy daemon chroot /var/lib/haproxy pidfile /var/run/haproxy.pid tune.ssl.default-dh-param 2048 stats socket /var/run/haproxy.sock mode 600 level admin stats timeout 2m defaults log global mode tcp option tcplog #option dontlognull option redispatch retries 3 timeout queue 1m timeout connect 10s timeout client 1m timeout server 1m timeout check 10s maxconn 2000 frontend pgdbplatform_frontend_cluster01 bind *:5432 mode tcp timeout client 168h option tcplog option logasap default_backend pgdbplatform_backend_cluster01 backend pgdbplatform_backend_cluster01 mode tcp option tcplog balance roundrobin # Load Balancing algorithm timeout server 168h server Primary 10.236.49.12:5432 check server HotStandby 172.24.22.68:5432 check server AsyncStandby 10.236.134.187:5432 check ------------------- Please support, Quan Ha Le. ----- Original Message ----- From: "Jarno Huuskonen" <[email protected]> To: "Ha Quan Le" <[email protected]> Cc: [email protected] Sent: Friday, March 20, 2015 12:57:46 PM Subject: Re: Checked: send/accept-proxy over unix socket not working Hi, On Fri, Mar 20, Ha Quan Le wrote: > global > log /var/log local0 > log /var/log local1 notice Are you sure that /var/log is a syslog socket ? Usually it's a directory so that's not going to work. http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-log > frontend pgdbplatform_frontend_cluster01 > #bind *:5432 > bind /var/lib/haproxy/test accept-proxy user haproxy group haproxy > mode tcp > timeout client 168h > option tcplog > option logasap > default_backend pgdbplatform_backend_cluster01 > > backend pgdbplatform_backend_cluster01 > mode tcp > option tcplog > balance roundrobin # Load Balancing algorithm > timeout server 168h > #server Primary 10.236.49.12:5432 check > #server HotStandby 172.24.22.68:5432 check > #server AsyncStandby 10.236.134.187:5432 check > server clear /var/lib/haproxy/test send-proxy user haproxy group haproxy What are you trying to do ? Now you've tried to create a loop: frontend pgdbplatform_frontend_cluster01 listens on the unix socket and backend pgdbplatform_backend_cluster01 tries to send the traffic back over the same socket --> loop ? In another thread (http://marc.info/?l=haproxy&m=142681568229626&w=2) your problem was that rsyslog didn't create haproxy logfiles ? Is your rsyslog listening for udp/port 514 (netstat -aun | grep 514) ? Does your logger command support -n option to send udp packets ? (man logger) if it does then try to send log messages logger -d -n 127.0.0.1 −p local0.info "Test message" and see if you can get rsyslog to accept the log messages. -Jarno -- Jarno Huuskonen

