Rrd4j persistence error: 'Failed to open rrd4j database'

Dear community,

I’ve been trying to migrate from openHAB 2.5.12 for several times, but I’m experiencing issues with the rrd4j persistence. My current test system is a recently installed version on openhabian: openHAB 3.4.2 - Release Build

##        Ip =
##   Release = Raspbian GNU/Linux 11 (bullseye)
##    Kernel = Linux 6.1.21-v7+
##  Platform = Raspberry Pi 3 Model B Rev 1.2
##    Uptime = 0 day(s). 0:0:55
## CPU Usage = 51.36% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
##  CPU Load = 1m: 2.45, 5m: 0.73, 15m: 0.25
##    Memory = Free: 0.20GB (21%), Used: 0.74GB (79%), Total: 0.94GB
##      Swap = Free: 2.28GB (100%), Used: 0.00GB (0%), Total: 2.28GB
##      Root = Free: 20.58GB (74%), Used: 7.16GB (26%), Total: 28.97GB
##   Updates = 0 apt updates available.
##  Sessions = 1 session(s)
## Processes = 148 running processes of 32768 maximum processes

In this case, I did not import any backup file, but configured everything from scratch. Changes on rrd4j.cfg and rrd4j.persist have been done while openhab was not running.

  • Before changing files sudo systemctl stop openhab
  • After changing files sudo systemctl start openhab

To keep the persistence files as small as with openHAB 2 I modified the rrd4j.cfg file:




My rrd4j.persist file:

Strategies {
    // for rrd charts, we need a cron strategy
    everyMinute : "0 * * * * ?"

    // if no strategy is specified for an Item entry below, the default list will be used
    default = everyChange

Items {
    // ==================== everyChange, everyMinute ====================
    MQTT2_RAUMXTEMP1,MQTT2_RAUMXHUMID1: strategy = everyChange, everyMinute
    MQTT2_AUSSENTEMP1 : strategy = everyChange, everyMinute

The issue
After restarting openhab nothing will be persisted. I get these logs every minute:

2023-04-10 00:58:00.900 [WARN ] [d4j.internal.RRD4jPersistenceService] - Failed to open rrd4j database 'MQTT2_RAUMXHUMID1' to store data (java.lang.IllegalArgumentException: Archive already defined: RRA:LAST:0.5:1:480)

2023-04-10 00:58:00.903 [WARN ] [d4j.internal.RRD4jPersistenceService] - Failed to open rrd4j database 'MQTT2_RAUMXTEMP1' to store data (java.lang.IllegalArgumentException: Archive already defined: RRA:LAST:0.5:1:480)

2023-04-10 00:58:00.906 [WARN ] [d4j.internal.RRD4jPersistenceService] - Failed to open rrd4j database 'MQTT2_AUSSENTEMP1' to store data (java.lang.IllegalArgumentException: Archive already defined: RRA:LAST:0.5:1:480)

The folder /var/lib/openhab/persistence/rrd4j is empty:

pi@DINRASPPI002:/var/lib/openhab/persistence/rrd4j $ ls -l
total 4
-rwxrwxr-x 1 openhab openhab 32 13. Feb 09:59 Readme.txt

I tried '14 | Fix Permissions' with 'sudo openhabian-config'. In addition I performed 'sudo chown -R openhab:openhab /var/lib/openhab'.

I’ve already checked similar posts in the forum. I would appreciate if someone has any idea how to proceed best with further troubleshooting.


Why did you use the “default” names for your custom archive configs? That MIGHT cause trouble and IMHO will not change the default archive settings (which would be used by items automatically).

I suggest to use other names for the three configs and to assign items to those configs.