Nothing useful in the logs?


#1

I’ve installed HAProxy on a 3 node cluster running Ubuntu 14.04 LTS. I’m having issues and I’m hampered in my troubleshooting by the lack of any useful logging to /var/log/haproxy.log. My log file currently looks like:

root@ClusterNode003:~# tail /var/log/haproxy.log
Mar 17 16:11:11 ClusterNode003 haproxy(haproxy)[42381]: INFO: haproxy daemon running
Mar 17 16:11:26 ClusterNode003 haproxy(haproxy)[42456]: INFO: haproxy daemon running
Mar 17 16:11:41 ClusterNode003 haproxy(haproxy)[42503]: INFO: haproxy daemon running
Mar 17 16:11:56 ClusterNode003 haproxy(haproxy)[42581]: INFO: haproxy daemon running
Mar 17 16:12:11 ClusterNode003 haproxy(haproxy)[42628]: INFO: haproxy daemon running
Mar 17 16:12:26 ClusterNode003 haproxy(haproxy)[42703]: INFO: haproxy daemon running
Mar 17 16:12:41 ClusterNode003 haproxy(haproxy)[42750]: INFO: haproxy daemon running
Mar 17 16:12:56 ClusterNode003 haproxy(haproxy)[42825]: INFO: haproxy daemon running
Mar 17 16:13:11 ClusterNode003 haproxy(haproxy)[42874]: INFO: haproxy daemon running
Mar 17 16:13:26 ClusterNode003 haproxy(haproxy)[42950]: INFO: haproxy daemon running

That’s it. That’s all that’s in the log file. Over and over and over again. Nothing but those INFO message that the daemon is (or sometimes, isn’t) running.

My haproxy.cfg file is:

    root@ClusterNode003:~# cat /etc/haproxy/haproxy.cfg
    global
      log 127.0.0.1 local1 info #added
      chroot  /var/lib/haproxy
      daemon
      group  haproxy
      maxconn  4000
      pidfile  /var/run/haproxy.pid
      user  haproxy

    defaults
      log  global
      maxconn  4000
      option  redispatch
      retries  3
      timeout  http-request 10s
      timeout  queue 1m
      timeout  connect 10s
      timeout  client 1m
      timeout  server 1m
      timeout  check 10s

    listen mysqlchk
      bind 10.0.0.10:3306
      balance  roundrobin
      option  httpchk
      server ClusterNode001 10.0.0.11:3306 check port 9200 inter 2000 rise 2 fall 5
      server ClusterNode002 10.0.0.12:3306 check port 9200 inter 2000 rise 2 fall 5
      server ClusterNode003 10.0.0.13:3306 check port 9200 inter 2000 rise 2 fall 5

I’m finding that I can stop the mySQL service on one of the nodes and nothing seems to happen… certainly, nothing is logged. My attempts to connect to the database also aren’t being logged.

I’m certain that HAProxy is trying to log more useful information but I don’t have my server configured correctly. Any help would be appreciated.


#2

This is likely a syslog misconfiguration - you’re probably suppressing the logs somehow. First check /var/log/syslog to see if there’s anything in there, then also try removing local1 info and see if that’s your problem.

best of luck!

  • Andrew