I have a rather strange issue with my openHAB installation. Back when it was on 2.4, I started seeing a problem that the file “/var/lib/openhab2/config/org/openhab/habpanel.config” was shortened when I restart openhab2. It was always shortened to 4829 bytes. For a while I just changed the ownership of the file and directory to root, until I had time for an upgrade to 2.5.
Well, turns out that is still an issue, but the file is shortened to 4875 bytes now. Every time I restart the service.
When I go into the Paper UI, Services, habpanel, the shortened version of the file is visible there. And obviously, because the file is missing most of it’s content, the HABpanel is no longer working. The screen stays blank (that’s a separate issue, because one can not even start a new panel configuation from there if absolutely no elements are shown).
Lucky me I had a backup of the file in my local backups, and restored it from there. But then again, without changing this file to root, it is destroyed every time I restart openhab2.
Anyone an idea where to start debugging this issue?
Ok, I have the following files: “/var/lib/openhab2/etc/org.openhab.habpanel.cfg” and “/srv/openhab2-userdata/etc/org.openhab.habpanel.cfg”. Both have the same checksum.
I used Paper UI to update the panel config from the backup (I extracted the raw panel config from there once), and all three files changed size:
-rw-rw-r-- 1 openhab openhab 60653 Apr 5 14:18 /srv/openhab2-userdata/etc/org.openhab.habpanel.cfg
-rw-rw-r-- 1 openhab openhab 78905 Apr 5 14:18 /var/lib/openhab2/config/org/openhab/habpanel.config
-rw-rw-r-- 1 openhab openhab 60653 Apr 5 14:18 /var/lib/openhab2/etc/org.openhab.habpanel.cfg
After I restarted openhab2, all three files shrinked again:
-rw-rw-r-- 1 openhab openhab 3085 Apr 5 14:22 /srv/openhab2-userdata/etc/org.openhab.habpanel.cfg
-rw-rw-r-- 1 openhab openhab 4876 Apr 5 14:21 /var/lib/openhab2/config/org/openhab/habpanel.config
-rw-rw-r-- 1 openhab openhab 3085 Apr 5 14:22 /var/lib/openhab2/etc/org.openhab.habpanel.cfg
Having a look at the full timestamps, it at least seems that the one file is modified first, and the other two are synced from there:
-rw-rw-r-- 1 openhab openhab 4876 2020-04-05 14:21:59.121063115 +0200 /var/lib/openhab2/config/org/openhab/habpanel.config
-rw-rw-r-- 1 openhab openhab 3085 2020-04-05 14:22:00.511066435 +0200 /var/lib/openhab2/etc/org.openhab.habpanel.cfg
-rw-rw-r-- 1 openhab openhab 3085 2020-04-05 14:22:00.511066435 +0200 /srv/openhab2-userdata/etc/org.openhab.habpanel.cfg
Something is shortening the content of “habpanel.config”, and I have no idea where this is coming from.
That Felix FileInstall feature has been reported to cause problems.
Try to follow this:
If you have a felix.fileinstall.filename parameter in the .config file, remove it, restart openHAB and paste your panel registry backup in the text area in Paper UI one last time, the truncating should not happen again afterwards.
Ok, after some back and forth this worked. Waited a few times, but the problem did not come back.
Had to make sure that the /var/lib/openhab2/etc/org.openhab.habpanel.cfg file stays deleted, it was recreated a couple times, and then from there the “Felix” stuff was migrated into /var/lib/openhab2/config/org/openhab/habpanel.config. Once I managed to have the first file deleted, the problem with the destroyed config went away.