Unbound starts and stops a lot for unknown reason

Hello,

Inside Logs => System Logs => (section) DNS: Unbound I am seeing Unbound stopping and starting too many times.

For instance, in the past 16.5 hours, it stopped 241 times as per the logs. Please see:

What could be the reason for that?

Thanks,

See IPFire bug report

https://bugzilla.ipfire.org/show_bug.cgi?id=13254

3 Likes

Ah thank you Adolf. So it’s a bug. Hopefully it’ll get resolved in future.

Thanks.

Well its a bug that a few people experience but not everyone.

At the moment what makes it happen for some and not for others is not clear and that makes it difficult to reproduce and hence to figure out what the root cause is so it can be fixed but I am sure it will eventually be figured out.

2 Likes

Thank you Adolf!

If any one from the IPFire team needs any logs, information, or even access to my router I’ll be happy to assist.

1 Like

I am hoping Michael @ms might add comments. I am not sure if this is a bug or a feature.

I looked through the recent change at:
https://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff;f=config/unbound/unbound-dhcp-leases-bridge;h=e9f022affa98a2483ca1f41d267fe443b0f048cf;hp=e89e0446b48e90e92a5a812db36c19226fc042dd;hb=f20ca78eff6e8baeb86361f55adf52819d1bae1f;hpb=1b6b4118b2234efa9b28553bc8f9b2c6b74bb5fb

and found this:

log.debug("Reloading Unbound...")
# Reload the configuration without dropping the cache
self._control("reload_keep_cache")

So it may be done for a reason I do not understand …

1 Like

This is the commit message for that change

unbound-dhcp-leases-bridge: Reload unbound to import leases

This changes the old “diff” algorithm that we needed to have before
Unbound was able to reload its own configuration.

Now, it can do this even without dropping the cache. This should
hopefully perform much better and be more reliable than the old way.

3 Likes

Hi @jon ,

Michael is very busy these days working on the IPFire3 pakfire system. Coming out of our weekend there were a lot of bugs identified that he is working on plus trying to improve the way the code works. He may not have seen the bug on this issue either.

3 Likes

I’m on Core 179 here, running unbound 1.18.0 - I see no problems or restarts.

I read through the changelog for 1.18.0 and found this:
Fix for #925: unbound.service: Main process exited, code=killed, status=11/SEGV. Fixes cachedb configuration handling.

I can’t say for sure if this is the reason for the reboots on your machine, but I could upload an updated version that would have to be installed by hand.

Would it be of help if I’d try to send an archive?

Best,
Matthias

1 Like

Hello @mfischer

I am on version 1.17.1 even though I’m also on Core-Update 179.

Yes please, I’d appreciate if you can share the 1.18 version.

Many thanks,
Arslan

No problem.

Right one of the "Devel"s is building 1.18.0 for Core 179.
I’ll send it to you as soon as its ready.

Best,
Matthias

BTW: You know how to use PuTTY and an admin console?

1 Like

@arslanone - Sorry for being a Debbie Downer but keep in mind this fix will probably arrive in CU 180 or 181.

1 Like

Thank you @mfischer and @jon :pray:

Matthias, yes I know how to use PuTTY… being a web developer. Not sure which admin console you are referring to, though.

Thanks,
Arslan

I know :wink: - it will be shipped with Core 180, but its still in testing and I don’t know when 180 will be ready for publishing…

Hello,

There seems to be a correlation between these log entries:

messages:Oct  8 11:31:04 firefly dhcpd: DHCPREQUEST for 192.168.1.126 from [mac address] (Galaxy-Tab-A-8-4-2020) via green0
messages:Oct  8 11:31:04 firefly dhcpd: DHCPACK on 192.168.1.126 to [mac address] (Galaxy-Tab-A-8-4-2020) via green0
messages:Oct  8 11:33:16 firefly dhcpd: DHCPREQUEST for 192.168.1.107 from [mac address] (27100499007032800000A4402787FB8E) via green0
messages:Oct  8 11:33:16 firefly dhcpd: DHCPACK on 192.168.1.107 to [mac address] (27100499007032800000A4402787FB8E) via green0
messages:Oct  8 11:34:29 firefly dhcpd: uid lease 192.168.1.17 for client [mac address] is duplicate on 192.168.1.0/24
messages:Oct  8 11:34:29 firefly dhcpd: DHCPREQUEST for 192.168.1.148 from [mac address] via green0
messages:Oct  8 11:34:29 firefly dhcpd: DHCPACK on 192.168.1.148 to [mac address] via green0
messages:Oct  8 11:42:10 firefly dhcpd: DHCPREQUEST for 192.168.1.130 from [mac address] (OnePlus-6T) via green0
messages:Oct  8 11:42:10 firefly dhcpd: DHCPACK on 192.168.1.130 to [mac address] (OnePlus-6T) via green0
messages:Oct  8 11:43:39 firefly dhcpd: DHCPREQUEST for 192.168.1.72 from [mac address] via green0
messages:Oct  8 11:43:39 firefly dhcpd: Wrote 0 deleted host decls to leases file.
messages:Oct  8 11:43:39 firefly dhcpd: Wrote 0 new dynamic host decls to leases file.
messages:Oct  8 11:43:39 firefly dhcpd: Wrote 91 leases to leases file.
messages:Oct  8 11:43:39 firefly dhcpd: DHCPACK on 192.168.1.72 to [mac address] via green0
messages:Oct  8 11:46:27 firefly dhcpd: DHCPREQUEST for 192.168.1.105 from [mac address] (Galaxy-S9) via green0
messages:Oct  8 11:46:27 firefly dhcpd: DHCPACK on 192.168.1.105 to [mac address] (Galaxy-S9) via green0

And when Unbound restarts:

Oct  8 11:30:52 firefly unbound: [23785:0] info: service stopped (unbound 1.18.0).
Oct  8 11:31:04 firefly unbound: [23785:0] info: service stopped (unbound 1.18.0).
Oct  8 11:33:16 firefly unbound: [23785:0] info: service stopped (unbound 1.18.0).
Oct  8 11:42:10 firefly unbound: [23785:0] info: service stopped (unbound 1.18.0).
Oct  8 11:43:40 firefly unbound: [23785:0] info: service stopped (unbound 1.18.0).
Oct  8 11:46:27 firefly unbound: [23785:0] info: service stopped (unbound 1.18.0).

[Edit] Adding this as well for consideration:

  1. DHCPDISCOVER every 5 minutes, ignores server lease time · Issue #7020 · esp8266/Arduino · GitHub
  2. Unbound doesn't know about DHCP lease that expires then appears again · Issue #4714 · opnsense/core · GitHub

Just sharing in case this helps.

Thanks,
Arslan

1 Like

Yes there is! I did see the same:

https://bugzilla.ipfire.org/show_bug.cgi?id=13254#c7

3 Likes

Hello,

Cool, thank you Jon.

Matthias kindly provided me the 1.18.x version of unbound, which I installed and tested. It makes no difference and the strange behavior persists.

Thanks,
Arslan

2 Likes

10 posts were split to a new topic: Core 180: Unbound or DHCP issue?!?