OPNsense Forum

Archive => 19.1 Legacy Series => Topic started by: GDixon on November 30, 2018, 07:54:34 am

Title: SOLVED vnstat (Database load failed)
Post by: GDixon on November 30, 2018, 07:54:34 am
I'm using

Code: [Select]
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.

Code: [Select]
vnstatd[51566]: Error: Database load failed even when using backup (Permission denied). Aborting.
Title: Re: vnstat (Database load failed)
Post by: mimugmail on November 30, 2018, 12:21:45 pm
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 ...
Title: Re: vnstat (Database load failed)
Post by: GDixon on November 30, 2018, 04:17:41 pm
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)
Title: Re: SOLVED vnstat (Database load failed)
Post by: GDixon on November 30, 2018, 06:34:38 pm
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 :)