title: HAProxy not running stats socket
body: <p>I installed haproxy from aur in Arch Linux and modified the config file a bit:</p>
  
  <pre><code>global
      maxconn     20000
      log         127.0.0.1 local0
      user        haproxy
      stats socket /run/haproxy/haproxy.sock mode 660 level admin
      stats timeout 30s
      chroot      /usr/share/haproxy
      pidfile     /run/haproxy.pid
      daemon
  
  defaults
      mode    http
      stats   enable
      stats   uri /stats
      stats   realm Haproxy\ Statistics
  
  frontend www-http
      bind 127.0.0.1:80
      default_backend www-backend
  
  backend www-backend
      mode        http
      balance     roundrobin
      timeout     connect 5s
      timeout     server  30s
      timeout     queue   30s
      server  app1 127.0.0.1:5001 check
      server  app2 127.0.0.1:5002 check
  </code></pre>
  
  <p>I have made sure that the directory <code>/run/haproxy</code> exists and has permissions for the user <code>haproxy</code> to write to it:</p>
  
  <pre><code> ツ ls -al /run/haproxy
  total 0
  drwxr-xr-x  2 haproxy root  40 May 13 21:37 .
  drwxr-xr-x 27 root    root 720 May 13 22:00 ..
  </code></pre>
  
  <p>When I launch haproxy using <code>systemctl start haproxy.service</code>, it loads fine. I can even go to the <code>/stats</code> page and view stats, however, <code>socat</code> reports the following error:</p>
  
  <pre><code>ツ sudo socat unix-connect:/run/haproxy/haproxy.sock stdio
  2016/05/13 22:04:11 socat[24202] E connect(5, AF=1 "/run/haproxy/haproxy.sock", 27): No such file or directory
  </code></pre>
  
  <p>I am at wits end and not able to understand what is happening. This is what I get from <code>journalctl -xe</code>:</p>
  
  <pre><code>May 13 21:56:31 rohanarch.local systemd[1]: Starting HAProxy Load Balancer...
  May 13 21:56:31 rohanarch.local systemd[1]: Started HAProxy Load Balancer.
  May 13 21:56:31 rohanarch.local haproxy-systemd-wrapper[20454]: haproxy-systemd-wrapper: executing /usr/bin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
  May 13 21:56:31 rohanarch.local haproxy-systemd-wrapper[20454]: [WARNING] 133/215631 (20456) : config : missing timeouts for frontend 'www-http'.
  May 13 21:56:31 rohanarch.local haproxy-systemd-wrapper[20454]:    | While not properly invalid, you will certainly encounter various problems
  May 13 21:56:31 rohanarch.local haproxy-systemd-wrapper[20454]:    | with such a configuration. To fix this, please ensure that all following
  May 13 21:56:31 rohanarch.local haproxy-systemd-wrapper[20454]:    | timeouts are set to a non-zero value: 'client', 'connect', 'server'.
  </code></pre>
  
  <p>Basically, no errors/warnings or not even so much as an indication about the stats socket. Others who have faced a problem with the stats socket fail to get haproxy started. In my case, it starts up fine, but the socket just isn't creating.</p>