Quote from: cookiemonster on January 03, 2024, 11:59:10 pmright. Then OP as per this, maybe you could do this when you hit the problem:Code: [Select]$diff -u /var/unbound/root.hints /usr/local/opnsense/service/templates/OPNsense/Unbound/core/root.min.hints That will compare them and report differences.Absolutely! No problem what so ever - but I think I might need to re-enable the blocklist part for this? Or?I leave the blocklist disabled for now, until I get "other orders" from you Edit - for the moment the two files are identical, just so we all know.
right. Then OP as per this, maybe you could do this when you hit the problem:Code: [Select]$diff -u /var/unbound/root.hints /usr/local/opnsense/service/templates/OPNsense/Unbound/core/root.min.hints That will compare them and report differences.
$diff -u /var/unbound/root.hints /usr/local/opnsense/service/templates/OPNsense/Unbound/core/root.min.hints
looks like a 'template generation' vs 'unbound start' racing for me@lar.hed how many "generate template OPNsense/Unbound/*" messages in Backend log you see in time when this happens?
o unbound: update root hints
configctl -dq unbound restart ; configctl -dq unbound restart ; configctl -dq unbound restart ; configctl -dq unbound restart ; configctl -dq unbound restart
[34585:0] fatal error: failed to setup modules[34585:0] error: pythonmod: function init is missing in dnsbl_module.py
Quote from: lar.hed on January 03, 2024, 08:23:10 pmQuestion: Why should one use Unbound if I can not use Block Lists, Block Countries and DoT?Not sure what Block Countries is, but I use several DNSBL and DoT with Unbound and have no problems.
Question: Why should one use Unbound if I can not use Block Lists, Block Countries and DoT?
2024-01-04T18:13:30 Notice unbound Backgrounding unbound logging backend. 2024-01-04T18:13:30 Notice unbound daemonize unbound dhcpd watcher. 2024-01-04T18:13:30 Notice unbound [26817:0] notice: init module 2: iterator 2024-01-04T18:13:30 Notice unbound [26817:0] notice: init module 1: validator 2024-01-04T18:13:30 Notice unbound [26817:0] notice: init module 0: python TypeError: an integer is required (got type NoneType) os.write(self._pipe_fd, res.encode()) File "dnsbl_module.py", line 227, in log_entry logger.log_entry(query) File "dnsbl_module.py", line 548, in operate 2024-01-04T18:13:29 Error unbound [35261:7] error: pythonmod: python error: Traceback (most recent call last): 2024-01-04T18:13:29 Error unbound [35261:7] error: pythonmod: Exception occurred in function operate, event: module_event_moddone 2024-01-04T18:13:29 Notice unbound Closing logger
Well, just to add to the confusion I guess?
#!/bin/cshpgrep "unbound" | grep -v "$$" | xargs kill -9
played a little more.It turns out that the TypeError-error can be reproduced on unbound restart if a queue is artificially created in the log_entry function (like event.wait(0.5)) (it reproduced with or without https://github.com/opnsense/core/commit/862381660d05ef1f69d69be9bf542f0d03ea1b03 patch. I think the lock should be set earlier in the log_entry function. but not tested it)However, it seems to me that this error is not a cause, but a consequence: something is accumulating a queue and the service is consuming CPU time. The question is which of this is the cause and which is the effect.IMHO you could try disabling statistics collection (Reporting: Settings -> unset the "Enables local gathering of statistics."), restart unbound and observe - maybe we can reduce the number of variables in the equation.
About monit settings - i'm not sure that the '/usr/sbin/service' is the right method for unbound (re)start. What config unbound uses if started with this command? but this explains the lack of 'templates' entries in the backend log, yes
Done - or should I re-enable blocking lists also?
correct version to start Unbound?