OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: neek on May 05, 2023, 07:19:59 AM

Title: Losing DHCP and maybe more since 23.x
Post by: neek on May 05, 2023, 07:19:59 AM
I've been running 22.x since it came out and my system has been very stable. I updated to 23.1, and since then, my system will occasionally (maybe every ~2-3 days) stop serving up DHCPv4 addresses to machines on my network. Even if hardcode an address and ping or try to connect to the router, I cannot. I don't really know how to troubleshoot this more, since the only good fix I've found is to reboot the box. My questions:

1. Any good way to look at the logs from before the previous shutdown?
2. I've seen monit, but I haven't figured out how to use it to make sure that e.g. DHCP is up and running, or other core services
3. I've read through a bit of the forum and I haven't seen others with similar trouble. What should I do to help narrow this down so I can file a formal bug report, if that is indeed what this is?

thanks!
Title: Re: Losing DHCP and maybe more since 23.x
Post by: FullyBorked on May 05, 2023, 08:43:25 PM
You can monitor the DHCP service with monit by doing the following:

Monit > Service Settings > Click +


Then setup notifications if you'd like.  More detail on monit can be found here https://mmonit.com/monit/documentation/monit.html#Process

Edit: To add, best way (I've found) to determine the path to the PID file is by running the following in the CLI. 
ps -ax | grep <process name>
Title: Re: Losing DHCP and maybe more since 23.x
Post by: neek on May 06, 2023, 05:17:49 AM
Thanks very much. Is there a way to auto-restart using either monit or some other service? In pfSense I used to use a watchdog to do that.

Still not sure why I'm losing connectivity, though knowing I've lost it is interesting.