Logfiles with binary chunk?

I have noticed lately when I do ie:

cat event.log | grep switch1

I get a message

Binary file (standard input) matches

I have never had this problem earlier… so I zeroed out both logfiles (echo “” > event.log)
But later I get the same message again so the binary part is apparently back … any ideas ?

cat the file to see what it is. There might be one or more lines that are getting corrupted. Or if you are on a board computer like a RPi running off of an SD card this could be a symptom that your SD card is failing.

You can also bypass the issue via grep -a

Hi, I have an Orange PI 2E plus and I use the internal 16GB EMC flash disk (the model is old but it was in a box waiting for the pandemia to have time for him :wink: ) . And the log gets corrupted from time to time, Is it possible that the rollover fails?

1 Like

I would now say that things like this allways are related to bad memory (especially cheap micro SD-cards) … I’ve since the post moved my system to a USB harddrive and havent had a single problem after that !


same issue on my OrangePi. No SD Card in use, but integrated eMMC.
The setup worked fine during the last year, going through several OH upgrades e.g. 2.5.x to 2.5.9
Both, events.log and openhab.log are corrupted. The issue is in the beginning of the file, see screenshots.

I faced this three times and fixed it temporarily by stopping OH, delete and touch the files, starting OH.