[SOLVED] Null bytes on log

  • Platform information:
    • Hardware: Pine64 rockpro64 arm64/4gb/SD128gb
    • OS: Debian 9.9 (Dietpi 0.7.9)
    • Java Runtime Environment: Zulu 1.8
    • openHAB version: 2.5.0-M1

i have an issue with the logs generated by openhab (for events.log and openhab.log).
after some random time (and not the size of file, as configured in size policy trigger of org, ops4j.pax.logging.cfg for the appenders) the logs is inject of null bytes.
another thing that happens is the log file (like events.log.1) is created empty without previous log.
what could be the problem?

another information about my installation is that the config of log was never touched, i’ve reinstalled openhab yesterday and the issue is present in stable and testing versions.
please not consider the error of some rules on my screenshot!

I can’t say this is definitely your problem, but problems like this often indicate a failing SD card.

ok, i’m trying to write log on my hard disk instead of sd. i’m waiting to see what happens

With hard disk no problem, it’s all working. i’ve tried then to replace my sd, today is arrived and i’ve made backup and restore on it. nothing, with this new sd card the issue still remain.
have you any other suggest for fix the problem?

It is very odd that it works fine with hdd but not on the new SD. Did you bring up a clone of the old SD? There might be a corruption somewhere that got copied over or something like that. I really don’t have an explanation.

1 Like

Yes, i used dd for backup and restore (more fast than reinstall all :slight_smile:). I will try installing everything then

ok, problem found. appear that openhab have some trouble using Ramlog feature from dietpi (https://dietpi.com/phpbb/viewtopic.php?f=8&t=5&start=20#p68). removed ramlog, all works fine.