Dnsmasq stops occasionaly

Started by gunnarf, November 03, 2025, 08:49:14 AM

Previous topic - Next topic
I've switched from ISC DHCP to dnsmasq a few weeks ago. Followed the instructions thoroughly, and all seems to work fine. But twice since the switch the dnsmasq service has just stopped witch of course leads to clients not getting their IP-addresses.

After manually giving my main work computer a fixed address, I can connect with OPNsense server and start the service again. I see nothing in the logs.

Got any weird settings on like strict interface binding (dnsmasq general settings, advanced)? If interfaces drop out I can imagine dnsmasq not liking that.
Hardware:
DEC740

November 03, 2025, 10:40:37 PM #2 Last Edit: November 07, 2025, 11:28:36 PM by DEC670airp414user
Interesting

Early yesterday I switched from kea to dnsmasq

I imported my static mappings. (It missed one). And it worked all day yesterday.

I just got home from work and connected my iPhone to wireless.  I couldn't view any websites. I have been using a controld apple mobile profile...l I thought maybe the service was down so moved to quad 9 https over dns.  Phone still said no network access, but had a valid ip address?..    I ended up turning off dnsmasq and enabling kea and all was good again


Should you reboot thevfirewall after going from one service to the other?

Next morning edit.
I enabled dnsmasq again and turned off kea and rebooted the firewall..
Devices are still not working.  Unbound is enabled and has been working fine forwarding to quad 9


Another edit.   I found the issue it was on my end

DEC740 > USW-Pro-8-PoE> U6-Enterprise
Dec670. Retired / backup device

Quote from: Monviech (Cedrik) on November 03, 2025, 08:54:03 AMGot any weird settings on like strict interface binding (dnsmasq general settings, advanced)? If interfaces drop out I can imagine dnsmasq not liking that.

No it is very straight forward. Activated on LAN only. Nothing extra. Just a simple DHCP span from 101 to 200. about ten fixed addresses. DNS via Unbound as suggested.

I went away two days, when I come home DNSmasq has stopped again. So I gove a fixed address to my iMac, start Dnsmasq again. Tomorrow I'll activate KEA instead

Well, at least check if dmesg says dnsmasq segfaulted with would mean you're running into an upstream bug... I get that it can be inconvenient, but it's also a normal software thing that can happen and you can help solve it.  ;)


Cheers,
Franco

dmesg says nothing about dnsmasq! no segfaults shown

So Dnsmasq is still running but not responding?

Quote from: franco on November 11, 2025, 07:55:19 AMSo Dnsmasq is still running but not responding?


It works when running, but is stopped without notification three times, causing trouble. I turned it off and am back to ISC DHCP witch never fails.

I'm having the same problem.  I transitioned from ISC to dnsmasq as part of my upgrade to 25.7.  When dnsmasq works, it works extremely well.  But I've just run into my 4th occurrence this morning where I found that most of my network was down because the devices could not renew their ip addresses.  I have a desktop with a static IP and I used that to log into the firewall.  I found the gateway monitor service, ddclient and dnsmasq all "off".  I restarted dnsmasq plus the other services and my network is working again.  I've checked the logs and it doesn't show anything meaningful (see attached), and my dmesg entries only show arp proxy ignoring request entries.  Attached is also my configuration... I love the simplicity of dnsmasq and don't want to switch.  Any help would be appreciated.

TIA


Today at 12:51:42 PM #9 Last Edit: Today at 01:22:14 PM by DEC740airp414user
I switch to Kea when it was available on OPNsense and used it soley.

i converted my static mappings to dnsmasq when it was available.    i honestly i tried it for a few weeks,  didn't have any issues that i could see, or errors in the log viewer.

my main finding was memory usage for 25 devices was very sporadic.  would run it for a week at a time and compare it with kea

kea never changed memory usage like dnsmasq does
i have been using it for DHCP only.    unbound for DNS
back to kea
DEC740 > USW-Pro-8-PoE> U6-Enterprise
Dec670. Retired / backup device