Openhab Log Viewer (frontail) empty after some time

After a couple of days/weeks this issue appears and only a restart (or sometimes refreshing/saving a rule or item) solves it. The log in http://openhab:9001/ only shows

==> /var/log/openhab2/events.log <==

==> /var/log/openhab2/openhab.log <==

Everything else that was shown before like item updates, rules executions, etc. is not reflected anymore in the frontail.
I haven’t found a similar issue in this forum. Can anyone please tell me what I am doing wrong?

Does tail -f /var/log/openhab2/openhab.log and /var/log/openhab2/events.log show all entries?

Is it always days or weeks ?

When I first read it I was thinking about if rotating logs could be the problem. This would mean in case a new logfile is created and frontail might not be able to “attach the viewer” to the new file. But according to frontail this should be possible and others would report to have the same problem.

I thought about this to. That’s why I wanted to see what the actual logs look like

It shows logs from 9 days ago. Those are also the last entries in the log file when I open it via FTP. Any clue why this happens? This is happening every couple of days, sometimes only a few days, sometimes 2 weeks.

Edit: Actually it just recovered and shows now the logs again. Everything I did was just opening the logs file

by using ftp ?
The system has “enough” free diskspace ?

Yes, I connect via FTP client to the Pi to look at the files.
There is enough free space available. This issue appeared from the start after the first installation

how was the installation done ? Is it an openhabian installation ?
Did you do any specific changes to your system ?

Yes, a normal openhabian installation on a PI 3. Nothing specific changed. I cleaned up the log file yesterday and it is currently running smoothly. I can’t say what causes this. All of a sudden the issue appears in the browser view (frontail) and it won’t recover unless I restart the Pi or clean up the logs. But without my interaction nothing gets resolved.

1 Like

You just deleted the log files that are in the /var/log/openhab folder and the files were re-created by the system ? In case the problem happens again could you check how big the files are ?
To do so please run:

ls -l /var/log/openhab/

and post the output. As you wrote before that there is enough space on the disk the only idea I have at the moment would be the file size of the logfiles itself.

I did not delete the whole file as I was not sure it will be automatically created (now I know). I had just removed most entries. Before I did that the log file was about 8.x MB. I will try to monitor it again. My initial thought was that some event (maybe in the logs itself) caused the stop.

But I am convinced it will happen again after some time. I will post the file size then again.

Hi @Zitelli

Did you have any more issues with this? I have just noticed after restarting openhab a massive hole in my logs events.log and openhab.log. Current sizes are events about 11meg openhab just over 2meg.

The last timestamps in the logs are as follows, you may note that there is a java error there. Yes there is and it is another issue I am chasing but this doesn’t account for loss of logs when I have been monitoring in real-time in frontail across this hole! Strange.

2020-10-08 02:35:26.303 [vent.ItemStateChangedEvent] - LocalPi_Cpu_SystemUptime changed from 7657.4 to 7658.6
2020-10-16 21:15:12.527 [hingStatusInfoChangedEvent] - ‘astro:sun:dee38be5’ changed from UNINITIALIZED to INITIALIZING

2020-10-08 11:53:07.983 [WARN ] [y.util.thread.ReservedThreadExecutor] -
java.lang.OutOfMemoryError: Java heap space
2020-10-16 21:14:59.190 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to ‘Europe/London’.

Going to have another look about for anyone else with this. Cheers.

If you are using openhabian uninstall front tail and reinstall it.

Yes, same thing happened again, see att. pictures. I will probably have to delete those files again to make it work again.
@lloydatron: I don’t receive any error message, it just stops logging.

Screenshot 2020-10-17 -- 08-32-12

Yeah there is defiantly something amiss it should look like.

Try reinstalling using the master branch of openhabian script.

You mean reinstalling openhabian completely? I am not sure if this will solve the issue forever. I have installed multiple versions this year (complete new openhabian installations) and the issue appeared with every version. I guess it happens when the file reaches a certain size, as someone else mentioned in a previous post.

No just the openhabian script change to master branch

Hi @denominator

I thought that frontail was just a log viewer? Would this be able to create days worth of lost lines in the logs? I haven’t considered frontail as a suspect but will dive in that direction if you have had success.


Yes this is correct.

openHAB writes to the log and then when log is full creates a new log file.
There is no way that I know of to recover lost log entries.

Ah right, yes so actual missing lines in the log couldn’t have been caused by frontail.

I also don’t feel there would be a way to recover, I am more interested in how it has started to happen, when at the time I can see the line of the log in frontail but when looking at the actual .log file that line is not present. Could it be when restarting openhab under certain conditions it dumps lines from the .log files?