openHAB version: 4-latest running in Docker Container
Issue of the topic:
I’m running OH4 tag latest in a Docker Container. Some months ago I upgraded successfully to OH4 container from an OH3 container. I had no problems at all!
Yesterday, after a container (and Synology) restart no DSL rule is triggered anymore!
I have over 100 rules, all in *.rule files (no UI) and they all have been running well since 4-5 years, so it cannot be rule syntax issue. Not even cron rules are triggered!
From the user interface, I can run the rules, by pressing “Run”.
I’ve created in the user interface a new Test Rule, to start at a given time, and it also doesn’t trigger.
What could have a connection with it, is that the event.log is empty since restart. Older logs are OK.
From the UI, I can control my items and the KNX system is receiving all the messages.
It looks like the event bus doesn’t work anymore.
On Synology, the only thing that change before restart, was that I made the builtin postgresql available for external connections as described here: https://community.synology.com/enu/forum/1/post/120485
This could affect Docker installation but it cannot affect the container itself… strange…
The other 7 containers are running fine, so I would still tipp on an OH issue.
Anything in openhab.log? I would expect to see some errors during startup with behaviors like this.
If the eventbus itself wasn’t working you wouldn’t be able to control your Items. That all goes through the eventbus.
Most likely the problem is either a permission problem or soemthing got corrupted during the restart. First verify the permissions on all the files. If that all checks out start looking at the userdata/etc files to see if there is anything fishy there (e.g. the log4j2.xml file is zero length or cut off).
Thank you, Rich!
The logs are very clean… I guess is normal since it doesn’t happen too much… Even in the starting phase there is no error.
I’ve changed recursively the ownership to openhab:openhab for the whole userdata and conf directories and the rights to 775. After restarting the container, still the same behavior.
I’ve decided then to backup all the data and delete the directories, hoping that it will reinitialize the container. Unfortunately, the container doesn’t initialize and it stops with the message: KARAF_ETC is not valid: /openhab/userdata/etc, which I guess is normal since it doesn’t generate the directories under userdata. Those under conf were all generated!
Next thing I tryed was to create a new container from the same tag, but its behavior was identical.
I see now two possibilities:
The container is somehow not properly reseted - I need to dig more how to do it properly.
There is a docker problem, probably caused by the postgresql change…
That isn’t normal. The entryPoint.sh script that runs when teh container starts up looks to see if userdata is populated by checking for the existence of userdata/etc/versions.properties (IIRC) and if that file doesn’t exist it copies over the configs stored in the container. What do you see in update.log?