I've configured my HAProxy server to run in a chroot jail logging messages to syslog socket. My problem is that the only messsages currently being logged are for when haproxy is starting up.

May 26 10:42:37 dev haproxy[13986]: Proxy my_listener started.

I've created a user and group called haproxy and then done the following:

su -l haproxy
mkdir jail
mkdir -m 2750 jail/dev
chmod a-w jail

Relevant lines from my haproxy configuration are:

    chroot          /home/haproxy/jail
    group           haproxy
    node            haproxy
    log             /home/haproxy/jail/dev/log local0

    log             global
    option          tcplog

syslogd is being started with the option -a /home/haproxy/jail/dev/log and I've added the following line to /etc/syslog.conf

local0.*            -/var/log/haproxy.log

ls -la on jail/dev gives

drwxrws--- 2 haproxy haproxy 4096 May 26 11:07 .
dr-xr-x--x 3 haproxy haproxy 4096 May 26 11:01 ..
srw-rw-rw- 1 root    haproxy    0 May 26 11:07 log

Running Centos 5.5 and HAProxy 1.4.21. As I said I only see the listener start-up messages in haproxy.log and nothing else.

up vote 1 down vote accepted

The problem here was that the path to the syslog socket needed to be specified from the chroot jail directory. The following fixes the issue for me

    log             /home/haproxy/jail/dev/log local0

    log             /dev/log local0

One slight issue is that the started messages appear before the stopping messages if you do a reload but I can live with that.

  • I would've thought that was a good thing, you want the new process to start handling new connections, then shut the old one down! I assume 'restart' works differently in your init(?) script. – PriceChild Sep 27 '12 at 11:54

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.