Log file full of nulls

I keep getting a log file message of hundreds of nulls and then the following:

[shd.server.session.ServerSessionImpl] - exceptionCaught(ServerSessionImpl[openhab@/127.0.0.1:46030])[state=Opened] InterruptedByTimeoutException: null

The line is about 1500K (that’s a lot of nulls). When I clear the logfile, it reappears before any new messages.
Logging is set to the defaults.

My event log is also filling up with null characters too.

Any ideas?

Thanks?

I fixed it. I ncase anyone is interested, my org.ops4j.pax.logging.cfg file had incorrect file names/locations. For example:

log4j2.appender.out.fileName = /var/log/openhab2/openhab.log
log4j2.appender.out.filePattern = /var/log/openhab2/openhab.log.%i

instead of the correct:

log4j2.appender.out.fileName = ${openhab.logdir}/openhab.log
log4j2.appender.out.filePattern = ${openhab.logdir}/openhab.log.%i

I;m not sure where I got the incorrect one from but the one I replaced it with was in the forum.

I thought I had fixed this but it’s not the case.

When anything is written to the openhab.log file, it is preceded by about 200K worth of nulls.

If I delete the contents of the log file and save it (so it is empty), the next time a message is written to it, it is again preceded by the nulls.

I’m on openHAB version:

2.2.0-SNAPSHOT Build 1063.

The org.ops4j.pax.logging.cfg is the default one from here

I’m not sure how to debug this.

Any ideas?

Thanks!

I’ve discovered what causes this as I’ve done it again.

My openHAB log file was quite big and I was trying to look at the latest entries without having to scroll through hundreds of lines.
So, I deleted the lines I didn’t need and the next time, and every subsequent time I opened the log, it was full of spaces (nulls) as well as the actual entries.

I fixed it before but I’m not sure how (it may have gone away when I updated openHAB.

It didn’t have this effect before the logging was updated a couple of months ago.

I have two questions:

  1. How do I fix it without updating openHAB (can I update just a bit)?
  2. What is the correct way of clearing out entries from the log file from time to time?

Thanks!

Did you find any solution? Came here because I have the following error too:

23:31:00.362 [WARN ] [sshd.server.session.ServerSessionImpl] - exceptionCaught(ServerSessionImpl[openhab@/192.168.0.100:49152])[state=Opened] InterruptedByTimeoutException: null

I found out what caused it.

Prior to the big change in logging a couple of months ago, I used to routinely open the log file and delete the contents before saving it.
Useful if you were looking for errors etc.
After the logging changes, manually doing that caused the log file to be full of thousands of spaces (null characters).

The bug went away when I upgraded openHAB to a later snapshot.

Hi,

I am running openHAB 2.2.0-1 (Release Build) on a Rasberry Pi 3 and also have regularly large number of zeros in openhab.log and event.log.

event.log

00005320  64 61 74 65 64 45 76 65  6e 74 5d 20 2d 20 54 68  |datedEvent] - Th|
00005330  69 6e 67 20 27 6e 65 74  77 6f 72 6b 3a 70 69 6e  |ing 'network:pin|
00005340  67 64 65 76 69 63 65 3a  61 32 63 64 31 37 36 31  |gdevice:a2cd1761|
00005350  27 20 68 61 73 20 62 65  65 6e 20 75 70 64 61 74  |' has been updat|
00005360  65 64 2e 0a 00 00 00 00  00 00 00 00 00 00 00 00  |ed..............|
00005370  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00022260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 32 30  |..............20|
00022270  31 37 2d 31 32 2d 32 39  20 31 31 3a 31 35 3a 32  |17-12-29 11:15:2|
00022280  30 2e 39 32 38 20 5b 6d  65 2e 65 76 65 6e 74 2e  |0.928 [me.event.|
00022290  54 68 69 6e 67 55 70 64  61 74 65 64 45 76 65 6e  |ThingUpdatedEven|

openhab.log

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00045bb0  00 00 00 00 00 00 00 32  30 31 37 2d 31 32 2d 32  |.......2017-12-2|
00045bc0  38 20 31 36 3a 34 31 3a  32 30 2e 37 34 38 20 5b  |8 16:41:20.748 [|
00045bd0  49 4e 46 4f 20 5d 20 5b  65 6c 2e 63 6f 72 65 2e  |INFO ] [el.core.|
00045be0  69 6e 74 65 72 6e 61 6c  2e 4d 6f 64 65 6c 52 65  |internal.ModelRe|
00045bf0  70 6f 73 69 74 6f 72 79  49 6d 70 6c 5d 20 2d 20  |positoryImpl] - |

Hi Kees. Have you found a solution to this? Having the same issue (openhab 2.5.10 on odroid n2+ with current Armbian Buster).

No I have not.
I have switched to Home Assistant.

zaterdag, 07 november 2020, 02:34p.m. +01:00 van Michel via openHAB Community bot@community.openhab.org: