OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: Hydranet on August 15, 2023, 09:36:29 AM

Title: [SOLVED] Unbound reporting stopped working
Post by: Hydranet on August 15, 2023, 09:36:29 AM
I went to check on something in my Unbound report logging today but then I noticed it was empty, it was working af few days ago when I last checked. I tried disabling and then re-enabling the unbound report which didn't change anything and then finally I tried the reset option for Unbound data. Still the same problem and lastly I restarted the Unbound service but I don't think that would effect the reporting since dns resolving is still working.

https://ibb.co/LSN3JHN
https://ibb.co/CKHxGWY

Does anyone else have this or have an idea how to fix this?
Title: Re: Unbound reporting stopped working
Post by: Hydranet on August 15, 2023, 04:38:28 PM
I decided to reboot my system to see if that would do anything, now Unbound won't start. When I login through the shell and try to start unbound I see the following message in the syslog.

opnsense 3173 - [meta sequenceId="62"] /usr/local/sbin/pluginctl: The command '/bin/kill -'TERM' '49004''(pid:/var/run/unbound.pid)  returned exit code '1', the output was 'kill: 49004: No such process'
[meta sequenceId="64"] /mnt: inode 18113529: check-hash failed
[meta sequenceId="65"] /mnt: inode 18113472: check-hash failed
[meta sequenceId="91"] g_vfs_done():gpt/rootfs[READ(offset=-8672233359260753920, length=32768)]error = 5
[meta sequenceId="92"] g_vfs_done():gpt/rootfs[READ(offset=-6168037127106658304, length=32768)]error = 5

It seems related to my filesystem, how do I fix it?

I will see if I can boot into single user mode or something and then try running a fsck.
Title: Re: Unbound reporting stopped working
Post by: Hydranet on August 15, 2023, 06:01:28 PM
It seems my filesystem was corrupted, I tried running fsck but I seemed to have did it wrong. I also thought it might have been a hardware problem So I did a reinstall and restored my configuration now everything works again.

As a remind to myself I'm linking to previous forum posts about fsck, so that I can use that in case it happens again.
https://forum.opnsense.org/index.php?topic=22177.0
https://forum.opnsense.org/index.php?topic=22177.0
Title: Re: Unbound reporting stopped working
Post by: Hydranet on August 15, 2023, 06:36:08 PM
In my new installation I used ZFS as the filesystem instead of UFS which I was using before because the documentation seems to recommend it because it being more reliable than UFS.
https://docs.opnsense.org/manual/install.html
QuoteInstall (UFS|ZFS) - Choose UFS or ZFS filesystem. ZFS is in most cases the best option as it is the most reliable option, but it does require enough capacity (a couple of gigabytes at least).
Everything is working again!
Title: Re: [SOLVED] Unbound reporting stopped working
Post by: CJ on August 16, 2023, 06:20:57 PM
You should do some hardware testing on your setup.  Run some SMART tests on your drives and see what they report.  Also, do a memtrst run or two.

Depending on the cause of the problem, it may return even if you're running ZFS.
Title: Re: [SOLVED] Unbound reporting stopped working
Post by: Hydranet on August 16, 2023, 06:42:45 PM
Quote from: CJ on August 16, 2023, 06:20:57 PM
You should do some hardware testing on your setup.  Run some SMART tests on your drives and see what they report.  Also, do a memtrst run or two.

Depending on the cause of the problem, it may return even if you're running ZFS.
This is a brand new device that I bought about 2 weeks ago. I was using UFS before and had turned the device off without powering it down correctly several times. I read in several places that UFS has more problems with this and that because ZFS has data integrity it makes it less likely to cause problems when that happens. Since I OPNsense installed with ZFS I haven't seen any weird output in dmesg and the syslog, so I suspect it was probably a corrupt UFS filesystem.
Title: Re: [SOLVED] Unbound reporting stopped working
Post by: CJ on August 17, 2023, 01:59:53 PM
Even brand new devices can have hardware problems. :)

But if you were simply powering off without shutting down, then yes, that's probably the cause of the issue.  While ZFS is more resistant to that sort of thing, it's still not a good practice.
Title: Re: [SOLVED] Unbound reporting stopped working
Post by: Hydranet on August 19, 2023, 09:23:38 AM
Quote from: CJ on August 17, 2023, 01:59:53 PM
Even brand new devices can have hardware problems. :)

But if you were simply powering off without shutting down, then yes, that's probably the cause of the issue.  While ZFS is more resistant to that sort of thing, it's still not a good practice.
I know new devices can have hardware problems, I haven't had a new device with hardware problems in a long time and because so that and the unclean shutdowns made me think it was more likely a corrupted file system.

And yes I also know that's not a good practice to do an unclean shutdown, I had probably had my reason to do so when I did the unclean shutdowns and I was still figuring out some things about OPNsense since I am new to OPNsense. But I am not planning on anymore unclean shutdowns :)