Metainformationen zur Seite
Message The logfile database sends an error and cannot automatically be recovered
You get this error message in a logfile of LoxBerry or a plugin, or as a notification message in the webinterface or by email.
LoxBerry provides a logfile library to plugin developers to create and show logfiles. LoxBerry keeps track of every logfile in a SQLite database. Also the maintenance of the logfiles and the database is done automatically in the background.
The logfile database is stored on the RAM disk (tmpfs) and backuped regularly, and on shutdown to the SD card, and recovered from the SD card on booting up.
The logging library accesses the database on every start and end of a logging session (so when the system or a plugin initializes a logfile). If LoxBerry detects a corruption of the database, it automatically deletes and recreates the logfile database. In the case that no corruption is detected, but another error occurs during accessing the database, the message "The logfile database sends an error and cannot automatically be recovered" appears.
Consequences of this message
- The logfile library will not create a logfile.
- The Log Manager widget will not show any logfiles on the "Logfiles" tab, but only on the "More Logfiles" tab.
- The faulty database will be backuped to SD card, therefore a reboot of LoxBerry usually will not help.
- The calling plugin is not stopped - it will continue with the message, but it will not create a logfile.
- As long as the database is not available, these messages will be triggered.
As LoxBerry detects a broken database and recreates it, the message usually is not triggered by a corrupted database, but from another issue on LoxBerry.
A main reason for this message is a full RAM disk (full tmpfs volume). As the database cannot write anymore, the error is triggered. As a follow-up, it may happen, that the database corrupts because of little diskspace.
Check RAM disk
- Navigate to the My LoxBerry widget, open the System Information tab, and scroll to the Filesystem Mounts section.
- Check the lines with Filesystem column is tmpfs, especially the /tmp Mount Point.
- Check the Size, Used and Free column. The Free column should not be 0 B or nearly 0 B.
If you figured out a full tmpfs volume:
- Use the Filemanager widget, or putty via shell, to find out, what folder has a large amount of data.
- If you found out a folder with large data, investigate if this belongs to a plugin. Check the plugin settings, and/or contact the plugin author to double-check what files are there.
- If you could not figure out where the data are located, reboot your LoxBerry. Rebooting will clear the tmpfs mount points.
Delete the Logfile database
If you found out the reason for a full ram disk, or even not, the logfile database may already be corrupted. Therefore:
- Open the Filemanager widget
- Navigate to /opt/loxberry/log/system_tmpfs
- Delete the file logs_sqlite.dat
- Navigate to /opt/loxberry/log/system
- Delete the file logs_sqlite.dat.bkp
Retry the operation that triggered the error message.
After deleting the logfile database, it will be recreated automatically. Logfiles not shown in Log Managers "Logfiles" tab, will show up in "More logfiles". No logfile will get lost. Possibly it is required to reboot LoxBerry, as plugins may have open handles to the deleted file.
Checking the log database is part of LoxBerry's Healthcheck. If the check cannot access the log database, the check returns an error. As most errors are aftereffects of other errors, analyse the results of all checks.