From the beginning of this week, we’ve been seeing a mix of these error messages with serious frequency.
-Grafana/Server Error Failed to get settings
-Unauthorized
-Unable to load metadata
Thank you for bringing it to the surface, as we had been wrestling the past few days with it and figured that if it wasn’t reporting in the forums than it must have been our issue!
Before we go waste more time with it, I figured I’d ask…have you tried any ‘workarounds’…re-adding your data source, recreating the dashboard, etc.?
Thanks for reaching out, we are investigating problems with some Hosted Grafana instances being unable to reach their databases, and will update this thread as we track down and resolve the cause of the problem.
@mmw et al, we have made some adjustments to the database service, and are not seeing any more errors in the logs. Thanks for your patience, please let us know if you have any more problems with your Hosted Grafana.
Hi @dcech. I started seeing the same error two days ago, without any configuration change. I’ve noticed it for the first time in 6.0.2 but now also in 6.1.4 on my self-hosted Grafana server. The dashboard error comes together with log entries:
t=2019-04-18T10:08:26+0200 lvl=eror msg=“failed to look up user based on cookie” logger=context error=“database is locked”
t=2019-04-18T10:08:26+0200 lvl=eror msg=“Failed to get settings” logger=context userId=0 orgId=0 uname= error=“database is locked”
t=2019-04-18T10:08:26+0200 lvl=eror msg=“Failed to get settings” logger=context userId=0 orgId=0 uname= error=“database is locked”
t=2019-04-18T10:08:27+0200 lvl=eror msg=“Could not load alerts” logger=alerting.ruleReader error=“database is locked”
t=2019-04-18T10:08:27+0200 lvl=eror msg=“Failed to get settings” logger=context userId=0 orgId=0 uname= error=“database is locked”
t=2019-04-18T10:08:27+0200 lvl=eror msg=“Failed to get settings” logger=context userId=0 orgId=0 uname= error=“database is locked”
t=2019-04-18T10:29:27+0200 lvl=eror msg=“failed to look up user based on cookie” logger=context error=“database is locked”
t=2019-04-18T10:29:31+0200 lvl=eror msg=“Failed to get system stats” logger=metrics error=“database is locked”
t=2019-04-18T10:29:32+0200 lvl=eror msg=“Could not load alerts” logger=alerting.ruleReader error=“database is locked”
Can you share an insight what you adjusted in the database service?
The “database is locked” error indicates a problem with your sqlite database. This can happen if the database is left in an inconsistent state after a crash, or if there are problems with the disk.
One thing you can try is to dump the data from your existing db file into a new one, then swap it out. From inside your Grafana data directory (after shutting down Grafana):