I did a clean reinstall of openHAB 3 via openhabian. After that I installed all bindings, services etc. I had previously and imported my previous configuration and scripts. Now I’m trying to get everything to operate again like before.
There’s one problem related to persistence which I’m having trouble with:
All items which I want to persist I’ve included in a group Gpersist. I’ve a rule
rule "Item update arrived, store timestamp"
when
Member of Gpersist received update
then
logDebug("persistor", "persisting " + (triggeringItem as GenericItem).name)
(triggeringItem as GenericItem).persist()
(triggeringItem as GenericItem).persist("influxdb")
end
and another one persisting items which are in the group GwarningsSensorsBatteryLevelsMin
rule "Battery level update arrived, store timestamp"
when
Member of GwarningsSensorsBatteryLevelsMin received update
then
logDebug("batterylevels", "initializing timestamp for " + (triggeringItem as GenericItem).name)
(triggeringItem as GenericItem).persist()
(triggeringItem as GenericItem).persist("influxdb")
end
MapDB is my default persistence service, but I need to also store the items in an InfluxDB.
For some time, I see this debug logging stating that the items I’m interested in, are persisted. But this suddenly stops. I’ve checked for errors in my openhab.log and found these:
2021-12-16 04:03:16.233 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'persistor-1' failed: java.nio.channels.ClosedByInterruptException in persistor
2021-12-16 04:03:30.416 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'persistor-1' failed: java.nio.channels.ClosedChannelException in persistor
2021-12-16 16:19:29.771 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'batterywarnings-4' failed: java.nio.channels.ClosedChannelException in batterywarnings
2021-12-16 17:11:07.969 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'batterywarnings-4' failed: java.nio.channels.ClosedChannelException in batterywarnings
2021-12-16 17:22:03.401 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'persistor-1' failed: java.io.EOFException in persistor
From 17:22 on I do not see the above mentioned debug log messages any more. I’m guessing that the persistence service errored to often and then stops its work.
There are items which are in both groups, so it could be some kind of race condition, but it’s only a wild guess. Could someone please support me finding out the reason for these exceptions?
- Platform information:
- Hardware: Raspberry Pi 4 Model B
- OS: Raspbian GNU/Linux 11 (bullseye)
- Java Runtime Environment: OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
- openHAB version: 3.1.0