Logging with a lot of "junk"


I have running openhabian on RPi. I setup logrotate profiles and recently I’m having a lot of “junk” in the begining of a log file, either events.log or openhab.log. Any one else having this issue? What can I do?

Logrotate config file example:

/var/log/openhab2/events.log {
        su openhab openhab
        rotate 7

Mentioned junk is like:


Other than that I changed nothing. Should I somehow stop logging, delete old files and restart?

Any suggestions appreciated.


I think Ive seen that when a major error occurred. We had another thread about it awhile back I think it was the same pattern. The log did not capture anything useful and it has only happen once or twice

It was probably a major error once when I played with my OH setup. But it’s anoying. Every new file created with log-rotation has the same junk in the begging, although between the last line in the previous log and the first line in new file are no error recorded.

It seems it’s just copy the beginning junk over.

I stopped the openhab service, manually deleted the junk from both log files, restarted and will now monitor if it helped.

Let you know.

No change. Next rotation the junk is back.
Any suggestions?

I’ve found the previous report of this; not much direct help, the good news seems that it cleared up, but a mystery

It seems to be somehow connected to logrotate. Logs doesn’t show anything special, last entry on old and first entry in new log is a normal event, no error.

I stopped OH2, deleted the “junk” raw, restarted. Next rotation, the junk is back.

Does the default log make daily rotations? ops4j pax config has append set to true. Default OH settings…

Mentioning this just in case…
are you sure your SD card is okay?
I run mine on an RPi with an mSATA SSD in a USB enclosure.

Looks like the only thing left that could be the cause. Will try with new SD card.

1 Like