OH3: frontail no longer showing log entries, because openhab is not writing log files

  • Platform information:
    • Hardware: Raspberry Pi 4 Model B Rev 1.1 details: BCM2711 rev: c03111
    • Host: openhabian Kernel: 5.15.61-v7l+ armv7l bits: 32
    • Distro: Raspbian GNU/Linux 11 (bullseye)
  • OH Version: 3.3.0 (Build)
    • Installation method: openhabian
Directories: Folder Name      | Path                        | User:Group
             -----------      | ----                        | ----------
             OPENHAB_HOME     | /usr/share/openhab          | openhab:openhab
             OPENHAB_RUNTIME  | /usr/share/openhab/runtime  | openhab:openhab
             OPENHAB_USERDATA | /var/lib/openhab            | openhab:openhab
             OPENHAB_CONF     | /etc/openhab                | openhab:openhab
             OPENHAB_LOGDIR   | /var/log/openhab            | openhab:openhabian
             OPENHAB_BACKUPS  | /var/lib/openhab/backups    | openhab:openhab

Fontail does not show latest log file entries.
Openhab is not writing these since last reboot.

Please note: I just restarted openhab which fixed the problem.
However, I am still curious as to why this happened.

# [2022-10-30 18:27] openhabian@openhabian /var/log $ 
sudo journalctl -u frontail
-- Journal begins at Sat 2022-06-04 23:39:30 AEST, ends at Sun 2022-10-30 18:27:33 AEST. --
Oct 25 08:28:10 openhabian systemd[1]: Started Frontail openHAB instance, reachable at http://openhabian:9001.
# [2022-10-30 18:27] openhabian@openhabian /var/log $ 
sudo systemctl status frontail.service
â—Ź frontail.service - Frontail openHAB instance, reachable at http://openhabian:9001
     Loaded: loaded (/etc/systemd/system/frontail.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-10-25 08:28:10 AEST; 5 days ago
       Docs: https://github.com/mthenw/frontail
   Main PID: 748 (node)
      Tasks: 12 (limit: 4915)
        CPU: 1min 18.509s
     CGroup: /system.slice/frontail.service
             ├─748 node /usr/lib/node_modules/frontail/bin/frontail --disable-usage-stats --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab_AEM.json --theme openhab_AEM --lines 2000>
             └─946 tail -n 200 -F /var/log/openhab/openhab.log /var/log/openhab/events.log

Oct 25 08:28:10 openhabian systemd[1]: Started Frontail openHAB instance, reachable at http://openhabian:9001.

The interesting bit is:

-- Journal begins at Sat 2022-06-04 23:39:30 AEST, ends at Sun 2022-10-30 18:27:33 AEST. --
Oct 25 08:28:10 openhabian systemd[1]: Started Frontail openHAB instance, reachable at http://openhabian:9001.

Yet only see entries up to Oct 15.

The file system shows me log files with time stamps from Oct 15.:

# [2022-10-30 18:29] openhabian@openhabian /var/log/openhab $ 
la
total 204K
drwxrwxr-x 1 openhab openhabian 4.0K Oct 25 08:24 ./
drwxr-xr-x 1 root    root       4.0K Oct 30 00:00 ../
-rw-rw-r-- 1 openhab openhab       0 Jun  4 23:00 audit.log
-rw-r--r-- 1 openhab openhab    1.2K Oct 15 21:51 events.log
-rw-r--r-- 1 openhab openhab     152 Jun  5 13:44 events.log.1.gz
-rw-r--r-- 1 openhab openhab     792 Jun  7 07:35 events.log.2.gz
-rw-r--r-- 1 openhab openhab    1.1K Jun  7 08:31 events.log.3.gz
-rw-r--r-- 1 openhab openhab     11K Jul 23 22:34 events.log.4.gz
-rw-r--r-- 1 openhab openhab     14K Oct 15 21:46 events.log.5.gz
-rw-r--r-- 1 openhab openhab    1.4K Oct 15 21:51 openhab.log
-rw-r--r-- 1 openhab openhab     22K Jun  7 07:35 openhab.log.1.gz
-rw-r--r-- 1 openhab openhab     30K Jun  7 08:31 openhab.log.2.gz
-rw-r--r-- 1 openhab openhab     71K Jul 23 22:34 openhab.log.3.gz
-rw-r--r-- 1 openhab openhab     561 Jul 23 23:03 openhab.log.4.gz
-rw-r--r-- 1 openhab openhab     482 Jul 25 22:45 openhab.log.5.gz
-rw-r--r-- 1 openhab openhab     361 Jul 26 21:56 openhab.log.6.gz
-rw-r--r-- 1 openhab openhab    2.7K Oct 15 21:46 openhab.log.7.gz
-rwxr-xr-x 1 openhab openhab       0 Jun 27 16:19 Readme.txt*

I can’ make sense of this.

This happened after a reboot.

Anyway, I thought before I post, I restart openhab.
Before I did, I restarted the fontail service.
I deleted the event.log and openhab.log files.
Then issued the command openhab-cli stop.

What puzzles me is: why did the openhab not write to the log files?
Is this a known issue?

Any hints appreciated.

Everything happens for a reason =) but it’s really a guessing game. Did you issue an update for node/java around october 15th? Maybe something changed over there and oh needed a proper restart after. That did not happen till you manually triggered it? Another guess would be a trippy sd card. I’ve seen very strange things happen caused by a bad sd card. It does not make sense in your case because the log would continue even after a few bad writes but it’s just another guess and you never know. In case you are actually still using a sd card, stop, get a usb to sata adapter and a cheap ssd. It makes a difference as night and day.

winux

Thanks, and I understand… it’s difficult, if not impossible to solve.
I am starting out with OH3, migrating from a very stable v2 config.
Stuff like this makes me antsy.

two cents from me.
Have you changed the log-Level in the karaf-console ? (I changed to warn to not get the whole stuff)

openhab> log:list | grep -i event
openhab.event                                      x WARN

or
have you stopped logging in the web-ui?

Cheers,
Peter

Thanks … :slight_smile:

In short: neither…

OH did not log to either log file anymore.
It had nothing to do with frontail.
No logs from OH means nothing to show in frontail :slight_smile:

I restart of OH fixed it.

1 Like