SOLVED vnstat (Database load failed)

Started by GDixon, November 30, 2018, 07:54:34 AM

Previous topic - Next topic
November 30, 2018, 07:54:34 AM Last Edit: November 30, 2018, 04:18:46 PM by GDixon
I'm using

OPNsense 19.1.b_306-amd64
FreeBSD 11.2-RELEASE-p4-HBSD
OpenSSL 1.0.2q 20 Nov 2018


vnstat has been working just fine until today. No changes made by me, nothing I know of changed.
I tried restating the service, no help. I tried rebooting, no help. I deleted the plugin and reinstalled, no help.


vnstatd[51566]: Error: Database load failed even when using backup (Permission denied). Aborting.

rm -f /var/lib/vnstat/*

Then restart the service via GUI. Seems your database is corrupt.

I'll try to add a delete button via GUI the next weeks ...

November 30, 2018, 04:17:41 PM #2 Last Edit: November 30, 2018, 04:20:23 PM by GDixon
That worked and a button would be wonderful.

Now the question is why did it get corrupted?

Possibly dropped power? I have the box set to resume after a loss of power so I could have missed it.

I do have a UPS but it's old. I'm thinking I may need to do a real world test on the UPS. ( unplug from electrical service and let it run to see if the OPNsense box shuts down gracefully still or crashes from a bad UPS battery)

had a power outage the night before and yep the battery died before the OPNsense box could do a graceful shutdown.

Batteries ordered to solve the problem!

Thank you for the help :)