-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Applying Unbound blacklist fails with error #6026
Comments
Can you try to run |
OK, reboot didn't fix it.
Nope, no output unfortunately. Just the exit code.
|
I deleted the lockfile and tested the script again. It gets stuck somewhere and doesn't return. After 2 minutes, the web interface gives up, but leaves the script running, which also keeps the lock file around, failing subsequent attempts. |
Could relate to connectivity issues, 2 minutes is just the max the frontend will wait (execution will continue, but restarts will exit while the first one is still busy). |
Yes, I also suspect connectivity, along with long timeouts. After 40 minutes, blocklists.py finally returns (if no other instance was running), but leaves The script needs far lower timeouts, and should apply the whitelist even if some blocklists couldn't be downloaded. Lastly, the frontend's handling of this script can lead to a lot of confusion, esp. when it leaves an instance running, blocking further attempts to do anything from the web UI. |
It depends on the cause, at a first glance I don't expect there's much we can do, every request (list) has a timeout (120 seconds likely) and the script finishes when all are processed in sequential order. To remove items, it would need to download the items (whitelist is an exclude on the download operation), which apparently didn't happen. Fixing local connectivity is likely the best cause of action here. Relevant code blocks:
core/src/opnsense/scripts/unbound/blocklists.py Lines 131 to 140 in 73a062c
|
Hi!
in this case there should be records in ubound log with blocklists download\parsing results and timing (and may be more useful info)? @AdSchellevis i'm a bit concerned about request timeout value in blocklists.py. afaik
|
@kulikov-a I'm ok with a short time-out, a couple of seconds is usually enough indeed. |
I've tracked down what caused the connectivity problems in the first place. IPv6 was not working correctly. OPNsense did have an IPv6, but couldn't establish connections. In Reply to @kulikov-a
Yes indeed. It shows that each blocklist took exactly 5 minutes to "download", which is unlikely. Presumably there's a timeout after 300s, and the actual download never took place. It also doesn't seem to detect download failure correctly. It probably aborted somewhere after downloading, because the newly-added third whitelist item never got added either.
|
@haarp blocklist script sends this strings to log (with blocklist url and parsing stats) only after receiving and processing the file. therefore, it seems to me that the files were still downloaded and processed (although, of course, it would be extremely interesting to understand the reason for such a large and, most importantly, the same time for downloading and processing files. May be there any traffic limiting effect?)
|
it should be in |
Indeed. The only thing I can think of is a timeout of 300 seconds in python's
Ah, I see. The third whitelist entry (yup, it was |
@haarp so we agree that one of the reasons for the extremely slow blocklist download was incorrect IPv6 working on the local host?
if you can break it again and test the behavior with the new timeout value, that would be great. but I don't think it's necessary :) |
Correct! Thank you very much for yours and @AdSchellevis super quick response and fix. It really confirms why I should've switched over from pfSense earlier :) Feel free to close at your discretion. If my IPv6 ever breaks again, I'll add a comment here and reopen. |
closed with #6030 |
Describe the bug
After adding a new entry in the Unbound blocklist whitelist (going from 2 to 3 elements) and pressing Download&Apply, it waits a while and then I am greeted with an error box stating
Backend log shows
Subsequent attempts at pressing Download&Apply immediately return with the error box. I am currently unable to save at all.
To Reproduce
Steps to reproduce the behavior (I am not sure how reproducible it is on other installs):
foo.com
,.foo.com
bar.com
to whitelistExpected behavior
Applies without trouble
Describe alternatives you considered
Rebooting the box perhaps? Not an option until at least the weekend. And I'd be workarounding, nox fixing things :)
Screenshots
Relevant log files
See above for log
Additional context
Add any other context about the problem here.
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 22.7.4-amd64
Intel(R) Celeron(R) J4125 CPU @ 2.00GHz (4 cores, 4 threads)
The text was updated successfully, but these errors were encountered: