Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
[SOLVED] Some services (HAProxy & Wireguard) don't autostart
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Some services (HAProxy & Wireguard) don't autostart (Read 2072 times)
TechHome
Newbie
Posts: 18
Karma: 1
[SOLVED] Some services (HAProxy & Wireguard) don't autostart
«
on:
January 30, 2023, 09:32:19 pm »
Hello again,
I noticed that those two services won't autostart properly.
For example: At the dashboard, the Wireguard service is shown as running (green arrow). However it's not because there isn't a interface created and VPN->WireGuard->Status is blank.
After clicking on the white WireGuard restart symbol on the dashboard, it starts as expected.
Another example: HAProxy is not even shown as running on the dashboard. A click on the "run" symbol solves this.
It's really confusing me...
«
Last Edit: February 01, 2023, 01:22:47 pm by TechHome
»
Logged
Patrick M. Hausen
Hero Member
Posts: 6825
Karma: 573
Re: Some services (HAProxy & Wireguard) don't autostart
«
Reply #1 on:
January 30, 2023, 09:36:38 pm »
Are your configurations depending on DNS up and working? I.e. do you use host names instead of IP addresses in WireGuard and/or HAproxy configuration?
That could be a cause and there is currently no fix other than to use IP addresses instead.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
TechHome
Newbie
Posts: 18
Karma: 1
Re: Some services (HAProxy & Wireguard) don't autostart
«
Reply #2 on:
January 30, 2023, 11:39:14 pm »
Yeah. HAProxy depends on DNS. Even tough UnboundDNS on the same machine.
No, I use just IPs for Wireguard :c
Logged
Patrick M. Hausen
Hero Member
Posts: 6825
Karma: 573
Re: Some services (HAProxy & Wireguard) don't autostart
«
Reply #3 on:
January 30, 2023, 11:49:35 pm »
Yeah, but possibly the default route is not yet present, when WG tries to start. What's your Internet connection like?
There is a WG restart if inactive cronjob available, IIRC.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
TechHome
Newbie
Posts: 18
Karma: 1
Re: Some services (HAProxy & Wireguard) don't autostart
«
Reply #4 on:
January 31, 2023, 01:30:29 am »
It's cable internet, so there's a modem in front of the OPNsense box.
Hm I see. Is there a reason why there isn't a target like "wait until online" and then start services xyz.
Uhh, where could I find/enable that cronjob? I just see "Renew DNS for WireGuard on stale connections" here.
Logged
amichel
Jr. Member
Posts: 87
Karma: 8
Re: Some services (HAProxy & Wireguard) don't autostart
«
Reply #5 on:
January 31, 2023, 07:43:52 am »
Hi,
I do have a similar issue that haproxy does not start as I am not using IP Addresses here.
I workarounded it by using monit to check for the service and let monit restart those. So it might take some minutes before haproxy starts but at the end the start is done automatically.
Logged
TechHome
Newbie
Posts: 18
Karma: 1
Re: Some services (HAProxy & Wireguard) don't autostart
«
Reply #6 on:
January 31, 2023, 10:20:23 am »
I can't even see in the logs that WireGuard trys to start. I'll look into Monit and report back.
Logged
TechHome
Newbie
Posts: 18
Karma: 1
Re: Some services (HAProxy & Wireguard) don't autostart
«
Reply #7 on:
January 31, 2023, 04:38:05 pm »
Well Monit works great, except it didn't autostart too, and I found out why... I had a script in
Code:
[Select]
/usr/local/etc/rc.syshook.d/start/
which paused a lot of stuff...
I added a configd action for the script & all services came up as expected.
Thanks for the help!
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
[SOLVED] Some services (HAProxy & Wireguard) don't autostart