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
Error(s) during installation #7
Comments
'unbound_manager' v3.00 in both 'Easy' and 'Advanced' mode change the sequence for allowing the 3rd-party Graphical Statistics TAB script to be installed. i.e. the 'awk' and 'connection refused' errors (ideally) should be fixed by @Juched: so too the '.md5' install error will need to be fixed by @Juched: NOTE: You can try the unbound_manager v3.00 Beta by issuing
The other issue is a weird corruption of the 'unbound.conf' file.
and hopefully you will see that the '@@@@@@@' lines correctly have the leading '#' characters....
I can't replicate the "@@@@@" error, so I suggest you rename '/opt/var/lib/unbound' to say '/opt/var/lib/unboundBAD' (might be a bad sector on the flash drive?) then attempt the reinstall. |
Thank you for the tips and explanations! I appreciate your time to look at this issue and help me understand. I failed to mention that before I used unbound_manager recovery I did compare the GitHub unbound.conf to the reset.conf downloaded by my device. I downloaded both configs again today and the differences are still the same (only the first line is different) and the diff looks like this: https://pastebin.com/kJ1L1SwD. I didn't/won't have an opportunity today to bring the internet down for an extended period (to do more clean installs) but I will as soon as I get a chance. After reading your reply I did backup and then clone the previous new flash drive to an identical new one (pack of 5) so I could run some tests on it without having the internet down. Tests so far (format is ext4 w/ journal enabled): e2fsck /dev/sdc1 -fpv
e2fsck /dev/sdc1 -cv
badblocks -w -s -v -o badblocks.log /dev/sdc
If you can't replicate the issue then I suppose it is unique to my particular setup and therefore not useful to you. I only opened this issue in case it would be helpful. With that in mind, I will close this issue after editing this post with the results from the badblocks test unless you want me to report back the results of uninstall/reinstall on a new flash drive (or anything else). Thanks again! |
Thank you for taking the time to provide feedback. Sorry to put you to so much trouble with the speculation about a bad Flash drive. So if the download is not corrupting 'unbound.conf' then I think only the 'DoT' command attempts to mangle that unique portion of 'unbound.conf' There was a report in the SNB forum thread, where someone posted 'unbound.conf' corruption, but never replied when quizzed about how to replicate the issue. I assumed that it may have been use of the 'vx' command, and possibly the new user was unfamiliar with 'nano' and may have inadvertently caused the issue. I'm not saying that there isn't a rogue 'sed' command that is used within the script that is the root cause. However, if you wish to close this issue, then that's OK, but I'm happy to wait and see if you can reliably and consistently repeat the issue on the new Flash drive. Regards, |
It's no problem I understand the need to cover the basics first. I appreciate the work you've put into this project and I enjoy helping if I can. Before "unbound Manager" showed up in the amtm menu I didn't even know what unbound was. It will be some time before I can bring the internet down for an extended period again to wipe everything and start over at least several times (this coming Monday at the latest). In the meantime I will do research, look into what I can, and plan ahead. |
I may have narrowed down the section of code causing this particular issue for me at least enough to give a small update to the progress. There is still much more investigating to do. I was doing a clean install (uninstall, reboot, remove pid file and unbound folder left over) with debug (set -x) enabled and checking and copying the /tmp/mnt/SD64/entware/var/lib/unbound/unbound.conf after each step that I could (without modifying the script more). Somewhere between choosing "y" to enable stubby and the next step the unbound.conf loses the comment "#" before the 2nd @@@@@@@ line that surrounds the "DNS-Over-TLS support" forward-zone declaration. I paused there to post this update (and to document it). Full log: https://pastebin.com/t1AqrW8h Summary of the steps that I took:
Program input (line #'s refer to the full log):
Snippet at this point:
unbound.conf before stubby: https://pastebin.com/8dauAvt7 I will continue to investigate. |
Given 'unbound+Stubby' is considered no better than the firmware's inbuilt 'dnsmasq+Stubby' I may decide to totally remove the inbound_manager Stubby Integration option! OK thanks for the detailed diagnostics - it helped identify (as alluded to earlier in my previous reply) which 'sed' is the culprit. The issue is that since v1.05 there are now TWO possible 'forward-zone' sectional clauses; one for Stubby and one for DoT. Now apart from a silly typo, the following sed usage example (used to uncomment a desired range of lines) appears to always be applied globally to the file despite no explicit 'g' flag.
So a quick'n'dirty hack (while I reread the sed man pages) is to make the FIRST 'forward-zone:' clause unique in 'unbound.conf'
So now you can patch the code
` |
Is the formatting for your suggestion correct? Forgive me if I misinterpreted but I think this is what you meant:
I quickly wrote a dirty script to test the change and produce diff's for each sed command (both always run for me because nvram get ipv6_service = dhcp6) before going through the longer process of testing the entire install/uninstall process. The first sed seems to run ok but I believe it is showing the same issue you described (it removes a "#" before "v1.01 Added the following") https://pastebin.com/rzCY5Mib:
If the first sed command didn't run correctly the second diff may not be useful but I've included it in case I am mistaken: https://pastebin.com/ijSmGveZ I would have continued further and tried to figure out how to fix the sed command before reporting back but I think it would have taken too much time because I am barely a novice with sed at this time (WIP). Additionally, the possibility exists that I misinterpreted your fix. Just in case it's useful (and because I had to find it for myself anyway) here is a link to sed.c for busybox v1.25. I have yet to find a clear definition/comparison of the sed implementation used in my busybox version so I will just compare what I am learning (GNU sed) to the source as needed. |
Fortunately the two 'forward-zone:' directives are currently different as the DoT one already contains a comment containing the word 'DNS'. So without altering 'unbound.conf', the following hack will explicitly ignore the DoT statement and find the 'Stubby' related line and should only match on that sectional clause
|
Using this script I tested your hotfix (-i removed from sed to redirect output, and local removed from POS):
Summary of changes to unbound.conf:
Step by step:
While I think the applicable lines are at and around line 1541 of unbound_manager.sh (to update it and test a full run) I DO NOT want to mess that part up. I can attempt to update it with your confirmation of which lines to replace or I can wait for you to hotfix the unbound_manager.sh if the above results are sufficient data. |
I've pushed the Hotfix (in two places to accommodate those using @john9527's LTS firmware). |
I went through two clean installs, one using amtm and one manual using the Readme.md instructions (with debug enabled). I believe that both were successful with regards to this particular issue but of course it will need your review to be sure. amtm install:
diff -U3 -dHrN -- reset.conf unbound_amtm.conf:
unbound_amtm.conf:
Manual install: diff -U3 -dHrN -- unbound_manual.conf unbound_amtm.conf:
If everything looks ok to you and there are no other questions I can help answer pertaining to this issue I do believe that this issue been fixed quite well! |
I'm not really sure what I may have done wrong or what these errors mean. It is reproducible from a clean install of unbound Manager via amtm on my particular setup.
RT-AC88U FW-384.15
amtm 3.1.5 with mostly default installs of Diversion, Skynet, scribe, scMerlin, uiDivStats, uiScribe, and Swap file 2.0G. Diversion has customized lists.
Full install log copied from terminal: https://pastebin.com/81g4xDnP
Snippet:
Files (up until installer "paused" at the above snippet step):
tail -f /opt/var/log/messages from clean reboot: https://pastebin.com/2TzsSPUc
/opt/share/unbound/configs/reset.conf: https://pastebin.com/HvV0M2XR
/opt/var/lib/unbound/unbound.conf: https://pastebin.com/MCz80Tcd
Kompare (diff -U 3 -dHrN -- reset.conf unbound.conf.err): https://pastebin.com/FWS0cM1c
Versions:
BusyBox v1.25.1 (2020-02-08 13:39:42 EST)
unbound-checkconf_1.9.6-1_armv7-2.6.ipk
unbound-daemon_1.9.6-1_armv7-2.6.ipk
unbound-control-setup_1.9.6-1_armv7-2.6.ipk
unbound-control_1.9.6-1_armv7-2.6.ipk
openssl-util_1.1.1d-2_armv7-2.6.ipk
unbound-anchor_1.9.6-1_armv7-2.6.ipk
opkg list-installed: https://pastebin.com/8XZGE2EV
After finishing the installer (with errors) I commented out line 154 (so unbound would at least start) then I ran unbound_manager recovery. Then, I started up unbound_manager again and chose "i" (update unbound Installation). The same errors did not appear again and no other errors appeared except this one:
I'll continue to monitor and test the setup but it appears to be working fine (dig, dnsinfo and lookup in advanced tools). Let me know if there is anything else that I can provide that might be helpful.
Thank you!
The text was updated successfully, but these errors were encountered: