RRD4jPersistenceService fails to create file

Hi all,
I have an odd bug in OH4.1: to existing RRD4j setup I added a new item “Ventilator_Bad_RH”. However the service failed with …

23:02:01.421 [WARN ] [rd4j.internal.RRD4jPersistenceService] - Failed to open rrd4j database 'Ventilator_Bad_RH' to store data (java.lang.IllegalArgumentException: Archive already defined: RRA:LAST:0.5:1:360)
[...]
23:03:01.437 [ERROR] [rd4j.internal.RRD4jPersistenceService] - Could not create rrd4j database file '/var/lib/openhab/persistence/rrd4j/Ventilator_Bad_RH.rrd': /var/lib/openhab/persistence/rrd4j/Ventilator_Bad_RH.rrd

As I wasn’t sure if it is a OH4.1 migration artifact, I deleted the setup rrd4j files in /var/lib/openhab and created all new, but it was the same result. All files and the folder itself in /var/lib/openhab/persistence/rrd4j are owned by user openhab. What worked as solution though, was to copy an other archive and rename it into the item. Now everything works fine (except for the wrong values in this archive). Hence openhab rrd4j service can write into the archive, but can’t create it.

Any ideas how to fix it for good?
Thanks

The rrd4j.persist file look like this

Strategies {
   everyMinute	: "0 * * * * ?"
   everyHour    : "0 0 * * * ?"
   everyDay     : "0 0 0 * * ?"
   default = everyChange
}
 
 
Items {
   Temp_Aussen: strategy = everyMinute, restoreOnStartup  
   RH_Innen, RH_Aussen, RH_Keller, Ventilator_Bad_RH: strategy = everyMinute, restoreOnStartup  
}

OH is running under Debian 12

Do you get that message for every write attempt or is it intermittent?

Basically for every write attempt I received the warning. With the copy of the renamed file however it works…

Make sure the openhab user has read/write permission on the rrd4j files. Even if it owns the files, if it only has read permissions it won’t be able to write.

Beyond that, I’ve not seen anything like this reported before. All I can recommend is putting the rrd4j binding into debug logging to see if something obvious pops up.

Well, that’s the thing: user openhab is owner of the folder and all files. And it can write into the file once it has been created, that’s why I’m unclear if this has anything to do with linux user rights. There are a couple of similar entries if you search the community with the term “Failed to open rrd4j database”, like this one or this one. But there seems never have been a root cause identified as far as I can tell.

me@namibia /var/lib/openhab/persistence/rrd4j $ ls -la
insgesamt 88
drwxr-xr-x 3 openhab openhab  4096 14. Jan 23:02 .
drwxr-xr-x 5 openhab openhab  4096  3. Jan 19:09 ..
-rw-r--r-- 1 openhab openhab  9444 17. Jan 18:17 RH_Aussen.rrd
-rw-r--r-- 1 openhab openhab  9444 17. Jan 18:17 RH_Innen.rrd
-rw-r--r-- 1 openhab openhab  9444 17. Jan 18:17 RH_Keller.rrd
-rwxr-xr-x 1 openhab openhab 28280 17. Jan 18:17 Temp_Aussen.rrd
-rw-r--r-- 1 openhab openhab  9444 17. Jan 18:17 Ventilator_Bad_RH.rrd

That first post is almost certainly a misconfiguration of rrd4j.

The second post, at least in the first post, is an error reading, not writing. And scrolling down through the replies none of the errors matches the error you report above.

Fair enough. Thanks for looking into it.

For anybody running into this issue: copy another rrd file and rename it to your item. That fixed for me.

Out of curiosity: is this an openhabian installation resp. what OS do you use ?