|
Good afternoon, I am unable to configure HAProxy to write to local logs on the server the process is running on.. I am currently configuring two load-balancers in failover using Common Address Redundancy Protocol (CARP) to service a pair of application servers through ports 8080 and 8443. Aside from writing to log files the system appears to be running well with both http and https traffic passing through to the backend servers. Both proxy servers are configured identically with the following details/settings. The intention is to have a utility parse the logs and send status and/or warning emails as needed. Server OS FreeBSD 7.0-release amd64 with CARP compiled into the kernel. --CARP is used for availability. The interface monitors the ip that is used to connect to the app servers. HAProxy version 1.3.18 from ports/net/haproxy-devel/ --From /etc/syslog.conf +127.0.0.1 local0.* /var/log/haproxy.log --I have tried this with +127.0.0.1, +localhost, both and neither. /var/log/haproxy.log is owned by haproxy user (tested when running process as root but still didn't write to the log when owned by root or haproxy user, root wouldn't be used live of course) --From /etc/rc.conf syslogd_enable="YES" syslogd_flags="-a 127.0.0.1/24:* -4 -b 127.0.0.1" haproxy_enable="YES" --Have tried the -a and -b entries seperately and -b localhost. Also with and without -4 (I doubt this is strictly necessary as ip6 isn't currently configured on any interfaces so there would be no conflict). ps -auxw | grep syslog root 627 0.0 0.1 4684 1380 ?? Ss 1:24PM 0:00.02 /usr/sbin/syslogd -a 127.0.0.1/24:* -4 -b 127.0.0.1 --So the syslogd is running with the appropriate syslogd_flags (-b could also be used as localhost?) PID is different on second server but that is to be expected. --/usr/local/etc/haproxy.conf - only changes from running are any ips, server-names or user/pass. This is a simpler one than I will be using in production. Intention is that the process will be jailed for security and other bits will be tweaked as needed. This is just a start-testing config. global maxconn 4096 pidfile /var/run/haproxy.pid daemon user haproxy group haproxy log 127.0.0.1 local0 info defaults mode http retries 3 option redispatch stats enable stats auth user:password maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000 listen name IP:8080 - this is the ip used by CARP interface log global mode http option httplog cookie name insert balance roundrobin option httpclose option forwardfor server server1 IP:8080 cookie name check server server2 IP:8080 cookie name check listen name-secure IP:8443 - this is the ip used by CARP interface log global option tcplog mode tcp balance roundrobin option httpclose option forwardfor server server1 IP:8443 check server server2 IP:8443 check The ip-address that the CARP interfaces monitor has an appropriate DNS record. I am aware that the FreeBSD version of syslog doesn't support the -r tag that some Linux versions do and was wondering, if I can't get the process communicating over a socket is there an equivalent that I could use. Any ideas as to what I am missing? Kind regards William Angus --
![]() | ||||||||||||||||
- HAProxy not writing to logs. William Angus
- RE: HAProxy not writing to logs. Angelo Höngens
- Re: HAProxy not writing to logs. William Angus
- Re: HAProxy not writing to logs. Willy Tarreau


