opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
846 stars 642 forks source link

net/haproxy: not starting after boot/reboot #4314

Open TheHellSite opened 4 weeks ago

TheHellSite commented 4 weeks ago

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug HAProxy fails to start after cold boot and/or reboot of OPNsense.

To Reproduce Steps to reproduce the behavior:

  1. Install and configure HAProxy (with auto start) so the service is able to start and run.
  2. Reboot OPNsense.
  3. After reboot, HAProxy will be stopped instead of running, but can easily be started from the dashboard service widget or plugin config page.

Expected behavior Auto start of HAProxy after reboot.

Screenshots n/a

Relevant log files

2024-10-20T16:53:49 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-20T16:53:48 Notice  kernel   <118>/usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-20T16:53:48 Notice  root     /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-20T16:52:55 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-20T16:52:50 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-20T16:35:03 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-20T16:35:02 Notice  kernel   <118>Starting haproxy.
2024-10-20T16:16:20 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-20T16:16:19 Notice  kernel   <118>/usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-20T16:16:19 Notice  root     /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-20T16:13:11 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-20T10:44:02 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-20T10:44:01 Notice  kernel   <118>/usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-20T10:44:01 Notice  root     /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-20T10:39:58 Notice  kernel   <118>>>> Error in stop script '50-haproxy'
2024-10-20T10:39:58 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-20T10:39:58 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-20T10:33:54 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-20T10:33:52 Notice  kernel   <118>/usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-20T10:33:52 Notice  root     /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-20T10:29:48 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-18T20:49:50 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-18T20:49:49 Notice  kernel   <118>/usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-18T20:49:49 Notice  root     /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-18T20:44:37 Notice  kernel   <118>>>> Error in stop script '50-haproxy'
2024-10-18T20:44:37 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-18T20:44:37 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-18T17:03:25 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-18T17:03:24 Notice  kernel   <118>/usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-18T17:03:24 Notice  root     /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-18T16:56:09 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-11T03:29:13 Notice  config   AcmeClient: running automation (configd): Restart HAProxy
2024-10-01T22:06:14 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-01T22:06:12 Notice  kernel   <118>Starting haproxy.
2024-10-01T22:02:59 Notice  kernel   <118>>>> Error in stop script '50-haproxy'
2024-10-01T22:02:59 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-01T22:02:59 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-01T21:41:15 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-01T21:41:14 Notice  kernel   <118>/usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-01T21:41:13 Notice  root     /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy
2024-10-01T21:40:20 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-01T21:40:20 Notice  kernel   <118>>>> Error in stop script '50-haproxy'
2024-10-01T21:40:20 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-01T21:40:20 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-01T19:41:32 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-01T19:41:25 Notice  kernel   <118>Starting haproxy.
2024-10-01T19:40:37 Notice  kernel   <118>Reloading template OPNsense/HAProxy: OK
2024-10-01T19:40:35 Notice  kernel   <118>[204/206] Extracting os-haproxy-4.3_1: .......... done
2024-10-01T19:40:35 Notice  kernel   <118>[204/206] Reinstalling os-haproxy-4.3_1...
2024-10-01T19:40:30 Notice  kernel   <118>[157/206] Extracting py311-haproxy-cli-0.6.1: .......... done
2024-10-01T19:40:30 Notice  kernel   <118>[157/206] Reinstalling py311-haproxy-cli-0.6.1...
2024-10-01T19:40:30 Notice  kernel   <118>[153/206] Extracting haproxy28-2.8.10: ........ done
2024-10-01T19:40:30 Notice  kernel   <118>[153/206] Reinstalling haproxy28-2.8.10...
2024-10-01T19:40:30 Notice  kernel   <118>  py311-haproxy-cli-0.6.1 (ABI changed: 'freebsd:13:*' -> 'freebsd:14:*')
2024-10-01T19:40:30 Notice  kernel   <118>  os-haproxy-4.3_1
2024-10-01T19:40:30 Notice  kernel   <118>  haproxy28-2.8.10 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64')
2024-10-01T19:40:30 Notice  kernel   <118>py311-haproxy-cli-0.6.1: already unlocked
2024-10-01T19:40:30 Notice  kernel   <118>os-haproxy-4.3_1: already unlocked
2024-10-01T19:40:30 Notice  kernel   <118>haproxy28-2.8.10: already unlocked
2024-10-01T19:35:03 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-01T19:35:02 Notice  kernel   <118>Starting haproxy.
2024-10-01T19:34:15 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-01T19:34:09 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-01T19:29:29 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-01T19:29:27 Notice  kernel   <118>Starting haproxy.
2024-10-01T19:28:27 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-01T19:28:23 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-10-01T19:26:08 Notice  kernel   <118>>>> Invoking start script 'haproxy'
2024-10-01T19:26:07 Notice  kernel   <118>Starting haproxy.
2024-10-01T19:25:17 Notice  kernel   <118>haproxy not running? (check /var/run/haproxy.pid).
2024-10-01T19:25:12 Notice  kernel   <118>>>> Invoking stop script 'haproxy'
2024-09-28T03:31:37 Notice  config   AcmeClient: running automation (configd): Restart HAProxy
2024-09-28T03:29:23 Notice  config   AcmeClient: running automation (configd): Restart HAProxy

Additional context n/a

Environment OPNsense 24.7.6 (amd64) os-haproxy 4.3_1

fraenki commented 5 days ago

Hard to tell without seeing the HAProxy configuration... wild guess: HAProxy is configured to listen on an IP address that is not yet available on boot.