Possible Logger Defect

Platform information:

  • Hardware: Pi 4 / 8 GB
  • OS: buster w/openhabian install on top. uname -a
  • Linux pi-home 5.10.92-v7l+ #1514 SMP Mon Jan 17 17:38:03 GMT 2022 armv7l GNU/Linux
  • Java Runtime Environment: java --version
    • openjdk 11.0.14 2022-01-18
    • OpenJDK Runtime Environment (build 11.0.14+9-post-Raspbian-1deb11u1)
    • OpenJDK Server VM (build 11.0.14+9-post-Raspbian-1deb11u1, mixed mode)
  • openHAB version: 3.2.0 (openhab-cli info)

I enabled a lot of debugging logs trying to find the source of a repeating INFO-level error. Logging seems to have stopped working. I don’t care for an answer since I’m about to upgrade to 3.3 to get rid of that INFO-level error. This is just a heads up to anyone in development who may be monitoring these threads.

I stripped all but the last .gz files from the output for brevity.

pi@pi-home:/var/log/openhab $ ls -l
total 5092
-rw-rw-r-- 1 openhab openhab       0 Feb 10 22:05 audit.log
-rw-r--r-- 1 openhab openhab  358656 Mar 16 20:36 events.log
-rw-r--r-- 1 openhab openhab     943 Feb 25 22:46 events.log.7.gz
-rw-r--r-- 1 openhab openhab 2213404 Mar 16 20:36 openhab.log
-rw-r--r-- 1 openhab openhab 1090122 Mar  5 05:17 openhab.log.7.gz
pi@pi-home:/var/log/openhab $ tail events.log
2022-03-06 05:04:12.546 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tplinksmarthome:kl135:8d69560dcd' changed from OFFLINE (COMMUNICATION_ERROR): Read timed out to ONLINE
2022-03-06 05:04:44.250 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HallOverhead_Color' changed from UNDEF to 306,90,0
pi@pi-home:/var/log/openhab $ date
Wed 16 Mar 2022 08:37:29 PM MDT

There are about 10 days of output missing between the current date/time, the matching timestamp on the file, and the file content. Leaving aside the tons of DEBUG output, that lightbulb toggles state like that several times per hour and there’s also the every-minute MQTT error that started all this.

openHAB has been running the entire time:

pi@pi-home:/var/log/openhab $ sudo service openhab status
     Active: active (running) since Fri 2022-02-25 22:45:59 MST; 2 weeks 4 days ago

Also from that service status:

Mar 06 05:38:24 pi-home karaf[1238]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to write to stream /var/log/openhab/openhab.log for appender LOGFILE
Mar 06 05:38:24 pi-home karaf[1238]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : An exception occurred processing Appender LOGFILE

Nothing is full:

pi@pi-home:/var/log/openhab $ df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/root       27892756 13125480  13327328  50% /
devtmpfs         4035980        0   4035980   0% /dev
tmpfs            4069772        0   4069772   0% /dev/shm
tmpfs            1627912     2068   1625844   1% /run
tmpfs               5120        8      5112   1% /run/lock
/dev/mmcblk0p6    258094    49438    208657  20% /boot
/dev/zram1        330424    14620    290716   5% /opt/zram/zram1
overlay1          330424    14620    290716   5% /var/lib/openhab/persistence
/dev/zram2        330424     8552    296784   3% /opt/zram/zram2
overlay2          330424     8552    296784   3% /var/lib/influxdb
/dev/zram3        429288   306140     90892  78% /opt/zram/zram3
overlay3          429288   306140     90892  78% /var/log
tmpfs             813952       20    813932   1% /run/user/1000

Which user/group owns the logfile, and what are its permissions set to? Can you run

ls -l

In the same folder that you ran the df command and paste the output here?

EDIT: Ignore that, I see it’s at the top of your OP!!

FYI: I rebooted the Pi and logging came back. It’s still fine after several days.