Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HAProxy local syslog not working

    Scheduled Pinned Locked Moved Cache/Proxy
    haproxy
    4 Posts 3 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vynce
      last edited by

      pfSense Plus 23.05.1
      HAProxy package 0.63_1

      Setting the syslog host to /var/run/log in the HAProxy settings doesn't produce any entries in the pfSense system logs.

      Following the suggestion in this post fixes the issue by making syslogd listen to a UDP socket:

      1. Edit /etc/defaults/rc.conf (Diagnostics -> Edit File).
      2. Change syslogd_flags="-s" to syslogd_flags="-s -b localhost -C"
      3. Restart the syslogd service (Status -> Services).

      They also reference this forum post with more details:
      https://forums.freebsd.org/threads/haproxy-not-logging.76876/#post-477067

      BismarckB 1 Reply Last reply Reply Quote 3
      • BismarckB
        Bismarck @vynce
        last edited by

        @vynce Thanks, works like a champ!

        I've made a patch for this:

        --- rc.conf	2023-06-28 06:37:17.000000000 +0200
        +++ rc.conf.new	2023-11-10 09:28:40.000000000 +0100
        @@ -302,7 +302,7 @@
         hostapd_enable="NO"		# Run hostap daemon.
         syslogd_enable="YES"		# Run syslog daemon (or NO).
         syslogd_program="/usr/sbin/syslogd" # path to syslogd, if you want a different one.
        -syslogd_flags="-s"		# Flags to syslogd (if enabled).
        +syslogd_flags="-s -b localhost -C"	# Flags to syslogd (if enabled).
         syslogd_oomprotect="YES"	# Don't kill syslogd when swap space is exhausted. 
         altlog_proglist=""		# List of chrooted applicatioins in /var
         inetd_enable="NO"		# Run the network daemon dispatcher (YES/NO).
        

        System > Patches > Add New Patch

        Description: haproxy syslog fix
        Patch Contents: c&p code from above
        Base Directory: /etc/default
        Auto Apply: check
        Save
        +Apply

        Restart syslogd service > Status > Services

        1 Reply Last reply Reply Quote 1
        • V
          vynce
          last edited by vynce

          Nice!

          I forgot to link to the issue ticket: https://redmine.pfsense.org/issues/14764

          1 Reply Last reply Reply Quote 0
          • T
            travisboult
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.