Solved haproxy 1.8 doesn't go into background during boot on FreeBSD 11.2

Simple as that. Version 1.7 worked fine in FreeBSD 10.3. Now 1.8 with the same config blocks indefinitely when I run service haproxy start. The command run (from its rc.d script) is
haproxy -f /usr/local/etc/haproxy.conf -p /var/run/haproxy.pid

Which worked before. If I add -D it will detach and run in the background. But this wasn't necessary in FreeBSD 10.3 and/or version 1.7.x.
The worst thing is that if you reboot your computer with haproxy enabled in /etc/rc.conf you will never be able to access it via ssh again since haproxy runs before sshd (in rcorder).

I'm wondering if this is a misconfiguration issue (-D not being used in port's rc script, but then again, it wasn't required in previous FreeBSD and/or haproxy), or if FreeBSD changed how it loads scripts (but other daemons from ports like nginx come up fine).
 
FreeBSD 10.3 is End-of-Life since April 2018 and is not supported any more.

Topics about unsupported FreeBSD versions

It works just fine on 11.2:
Code:
root@p1:~# pkg version -vR | grep haproxy
haproxy-1.8.19                     =   up-to-date with remote
root@p1:~# ps -ax | grep haproxy
35796  -  Ss         6:59.38 /usr/local/sbin/haproxy -q -f /usr/local/etc/haproxy.conf -p /var/run/haproxy.pid -sf 377
27428  0  S+         0:00.00 grep haproxy
root@p1:~# uname -a
FreeBSD p1.example.com 11.2-RELEASE-p9 FreeBSD 11.2-RELEASE-p9 #0: Tue Feb  5 15:30:36 UTC 2019     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
 
Thanks, your post encouraged me to dig further and I found the reason. The configuration had nbproc 1 but it didn't have daemon. Although both 1.7 & 1.8 docs state that nbproc 1 requires daemon mode, the presence of daemon (or -D command line option) was optional in 1.7 and daemon mode was probably implied. Not so in 1.8. Adding daemon fixed it.
 
Back
Top