Rrd4j - archive already defined

Hello everybody,

i try to use rrd4j persistence srevice with my own configuration for the archives. at the moment alls items may take the same config…

i get the following error message:

2020-04-25 11:18:35.518 [WARN ] [pse.smarthome.core.items.GenericItem] - failed notifying listener ‘org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl@1e5b3d5’ about state update of item dzg_dvh4013_c093497a_previousWorkIn01_workL2: Archive already defined: RRA:AVERAGE:0.5:1:90
java.lang.IllegalArgumentException: Archive already defined: RRA:AVERAGE:0.5:1:90
at org.rrd4j.core.RrdDef.addArchive(RrdDef.java:422) ~[?:?]
at org.rrd4j.core.RrdDef.addArchive(RrdDef.java:454) ~[?:?]
at org.openhab.persistence.rrd4j.internal.RRD4jService.getRrdDef(RRD4jService.java:318) ~[?:?]
at org.openhab.persistence.rrd4j.internal.RRD4jService.getDB(RRD4jService.java:270) ~[?:?]
at org.openhab.persistence.rrd4j.internal.RRD4jService.store(RRD4jService.java:110) ~[?:?]
at org.openhab.core.persistence.internal.PersistenceServiceDelegate.store(PersistenceServiceDelegate.java:59) ~[?:?]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.handleStateEvent(PersistenceManagerImpl.java:137) ~[?:?]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.stateUpdated(PersistenceManagerImpl.java:442) ~[?:?]
at org.eclipse.smarthome.core.items.GenericItem$1.run(GenericItem.java:259) [bundleFile:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
2020-04-25 11:18:35.708 [WARN ] [pse.smarthome.core.items.GenericItem] - failed notifying listener ‘org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl@1e5b3d5’ about state update of item dzg_dvh4013_c093497a_previousWorkIn01_workL3: Archive already defined: RRA:AVERAGE:0.5:1:90
java.lang.IllegalArgumentException: Archive already defined: RRA:AVERAGE:0.5:1:90
at org.rrd4j.core.RrdDef.addArchive(RrdDef.java:422) ~[?:?]
at org.rrd4j.core.RrdDef.addArchive(RrdDef.java:454) ~[?:?]
at org.openhab.persistence.rrd4j.internal.RRD4jService.getRrdDef(RRD4jService.java:318) ~[?:?]
at org.openhab.persistence.rrd4j.internal.RRD4jService.getDB(RRD4jService.java:270) ~[?:?]
at org.openhab.persistence.rrd4j.internal.RRD4jService.store(RRD4jService.java:110) ~[?:?]
at org.openhab.core.persistence.internal.PersistenceServiceDelegate.store(PersistenceServiceDelegate.java:59) ~[?:?]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.handleStateEvent(PersistenceManagerImpl.java:137) ~[?:?]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.stateUpdated(PersistenceManagerImpl.java:442) ~[?:?]
at org.eclipse.smarthome.core.items.GenericItem$1.run(GenericItem.java:259) [bundleFile:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

the config looks like:

#.def=[ABSOLUTE|COUNTER|DERIVE|GAUGE],,[|U],[|U],
#.archives=[AVERAGE|MIN|MAX|LAST|FIRST|TOTAL],,,
#.items=

#default_numeric.def=GAUGE,10,U,U,10
#default_numeric.archives=AVERAGE,0.5,1,90:AVERAGE,0.5,6,3600:AVERAGE,0.5,90,2880

loadprofile.def=GAUGE,10,U,U,10
loadprofile.archives=AVERAGE,0.5,1,90:AVERAGE,0.5,6,3600:AVERAGE,0.5,90,2880

i’d like to overwrite the default settings, how to achive that ?

thanks in advance!

Lars

How did you do the change of the config? By stopping openHAB, deleting any existed .rrd files, changing the config and then restart openHAB?

Do you really have no items line in your config?

When posting code please use the formatting icons. That way it is better readable!

thanks for the hints!

i would like to use the configuration for all existing an all new items… so i left items out, i thought i have seen somewhere a config like that (the default ??)

the rrd4j.cfg can’t be updated with openhab active ?

Thanks in advance Lars

Im not sure on that, however when changing the config of rrd files the whole way on how and where each data gets stored changes. IMHO at least stopping the rrd4j bundle would be needed!
And since you observed this error, which I haven’t seen before, I would have tried it that way.
Remember, you will lose all old data when doing such a change.

I am curious on your supposed setup.
Using loadprofile.def=GAUGE,10,U,U,10 you intend to have a heartbeat of 10 seconds and a step of 10 seconds as well. The hearbeat is the maximum timedifference acceptable between two readings recieved by rrd4j, step is the " base intervall in seconds for which a Primary Data Point is calculated from the values that are sent to rrd" .
At leat in openHAB rrd4j requires a storage strategy of everyMinute, IMHO neither your heartbeat nor your step size fit with that.
Your archives would use the step size as well, so your archive 1 would have 90 values, covering 900 seconds(15 minutes). Is that what you want?

I did a test with such a config. It loaded without errors, however no data seems to be persisted (checked with REST).

thanks in advance, i need some time to check … i will come back to you

1 Like