Closed dandjo closed 2 years ago
Did you check if openHAB can create/update files in /var/lib/openhab/persistence/rrd4j
?
Perhaps the issue is caused by wrong permissions or insufficient available free disk space.
Yes I did, there's is plenty of disk space and the permissions are correct. There are also other Items which are not able to write. Items with null values. Maybe that's the reason?
Can you create a file in the directory yourself? It could also be the disk is mounted as read only by the kernel due to corruption.
Yes, already checked permissions and file-system related stuff. The error even occur with permissions 777 on the parent directory.
Is that file actually nonexistent? I got that error sometimes aswell even though the file always existed, so there was no need for it to be created. Somewhere in the forum or here there's additional information about this.
The file exists, is writeable and gets written most of the time. Occasionally the error occurs. That's weird, and I think not related to a file system issue.
If those files are stored in ZRAM, some occasional ZRAM hiccups could also be causing it.
No ZRAM here at all.
Add a rule with name mqtt_testung_rule with a trigger of your choice (one that gets updated frequently) and a script as follows (note that smartpi_ptot is also my trigger state)
Perhaps it's a concurrency issue. The add-on doesn't seem to keep track of the RrdDb
s it opens because there could be many as one is created for each item... so it could cause exceptions if it tries to open a DB while it is still writing to it in another thread.
Good point, since the described setup triggers the item update event twice as I figured out in an other debugging session. But I guess there are plenty of scenarios like this. In my opinion the rrdb should be able to handle this.
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/rrd4j-doesnt-work-for-rollershutter/140532/2
When using RRD4j as persistence service i constantly get the following error when setting up a MQTT Item with the setup described below.
[ERROR] [d4j.internal.RRD4jPersistenceService] - Could not create rrd4j database file /var/lib/openhab/persistence/rrd4j/mqtt_testung_item.rrd': null
mqtt_testung_channel
with state- and command-topicmqtt_testung_topic
andWh
as measurement unitmqtt_testung_item
with typeNumber:Energy
, semantic classMeasurement
and semantic propertyEnergy
(I assume that those details are not very relevant)mqtt_testung_rule
with a trigger of your choice (one that gets updated frequently) and a script as follows (note thatsmartpi_ptot
is also my trigger state) DSL:events.sendCommand('mqtt_testung_item', itemRegistry.getItem('smartpi_ptot').getState());
When removing the rule, the error is gone in the openhab log. I'm not sure if this is because no command is posted anymore or if this is for other reasons.
System environment: