OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: IsaacFL on December 21, 2022, 05:13:18 PM

Title: Many Unbound Log Errors after updating to 22.7.10
Post by: IsaacFL on December 21, 2022, 05:13:18 PM
I'm seeing multiple of these in the unbound logs:

2022-12-21T08:09:58-08:00 Error unbound [67156:3] error: pythonmod: python error: Traceback (most recent call last):
2022-12-21T08:09:58-08:00 Error unbound [67156:3] error: pythonmod: Exception occurred in function operate, event: module_event_new
      AttributeError: 'NoneType' object has no attribute 'query_reply'
      if reply_list.query_reply:
      File "dnsbl_module.py", line 168, in filter_query
      return ctx.filter_query(id, qstate, qdata)
      File "dnsbl_module.py", line 281, in operate
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: Fright on December 21, 2022, 06:39:05 PM
if prefetch support is enabled on Services: Unbound DNS: Advanced can you try to disable it ?
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: franco on December 21, 2022, 08:43:29 PM
Can you try the following patch? https://github.com/opnsense/core/commit/2177d3e93b

# opnsense-patch 2177d3e93b
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: IsaacFL on December 21, 2022, 09:01:43 PM
I just got back and applied the patch. It seems at first glance to have stopped the errors. I did not disable the prefetch support in Advanced.

Will watch to see if any problems.
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: franco on December 21, 2022, 09:09:18 PM
Thanks! This was with restarting unbound or without? I think a restart might be required for it to render correctly.


Cheers,
Franco
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: IsaacFL on December 21, 2022, 09:15:24 PM
I did restart unbound. But did not reboot.
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: franco on December 21, 2022, 09:25:54 PM
Perfect, thanks!
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: franco on December 21, 2022, 09:54:12 PM
(Hotfix published)
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: dinguz on December 21, 2022, 09:57:17 PM
I applied the hotfix (opnsense-22.7.10_2), but the hotfix itself doesn't restart unbound. Wouldn't that be necessary for it to pick up the changes?
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: dcol on December 21, 2022, 10:34:52 PM
Using 22.7.10_2 and patch applied. Still get these Unbound errors
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: franco on December 22, 2022, 09:15:55 AM
You need to restart Unbound. It's literally what I said and IsaacFL confirmed and dinguz asked about...

@dinguz As a general rule we don't restart services on updates except when rebooting obviously. I'd consider the hotfix a problem solver for 22.7.9 or lower to 22.7.9_2, not necessarily from 22.7.9 to 22.7.9_2.


Cheers,
Franco
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: franco on December 22, 2022, 09:34:46 AM
PS: Applying the hotfix followed by applying the patch will of course unfix the problem. Either patch on 22.7.10 or don't patch on 22.7.10_2.
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: dcol on December 22, 2022, 04:30:17 PM
Not applying the patch to 22.7.10_2 was not mentioned. So now what do I do. Still getting the Unbound errors.
Also, I did do a restart after applying the 22.7.10_2 update and still had the errors before I applied the patch.
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: Fright on December 22, 2022, 06:13:50 PM
@dcol
can you provide a full error text (with error text, line numbers etc.)?
it looks like patch revert. in this case you can try to patch again )
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: dcol on December 22, 2022, 07:04:19 PM
Fright,
Applied patch again, rebooted. No errors so far.
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: tokade on December 22, 2022, 10:06:44 PM
Updated to 22.7.10_2 and now have lot of errors in the unbound log like the following one:

2022-12-22T22:00:00 Error unbound [77106:1] error: pythonmod: python error: Traceback (most recent call last):
2022-12-22T22:00:00 Error unbound [77106:1] error: pythonmod: Exception occurred in function operate, event: module_event_new
KeyError: 'bl'
blocklist = mod_env['dnsbl']['data'][domain]['bl']
File "dnsbl_module.py", line 180, in filter_query
return ctx.filter_query(id, qstate, qdata)
File "dnsbl_module.py", line 282, in operate


Must the patch be applied to 22.7.10_2 or is it another root cause?

Regards
Torsten
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: Fright on December 23, 2022, 06:49:19 AM
different error, yes. does blocklists updated since 22.7.10_2 update?
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: tokade on December 23, 2022, 08:23:35 AM
yes updated tonite

2022-12-23T01:41:02 Notice unbound blocklist download done in 2.63 seconds (212068 records)
2022-12-23T01:41:02 Notice unbound blocklist download https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts (lines: 173900 exclude: 15 block: 166633)
2022-12-23T01:41:01 Notice unbound blocklist download https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt (lines: 38 exclude: 0 block: 34)
2022-12-23T01:41:01 Notice unbound blocklist download https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt (lines: 2705 exclude: 0 block: 2701)
2022-12-23T01:41:00 Notice unbound blocklist download https://justdomains.github.io/blocklists/lists/adguarddns-justdomains.txt (lines: 48994 exclude: 3 block: 48991)
2022-12-23T01:41:00 Notice unbound blocklist download : exclude domains matching ^(?![a-zA-Z_\d]).*|.*localhost$
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: tuto2 on December 23, 2022, 08:54:17 AM
Do the errors still occur after re-applying the blocklists from the GUI and restarting Unbound?
Title: Re: Many Unbound Log Errors after updating to 22.7.10
Post by: tokade on December 23, 2022, 11:07:41 AM
re-applying the blocklists from the GUI and restarting helped

Thx a lot!