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 = 192.168.0.127
## 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
Configuration
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:
default_numeric.def=GAUGE,60,U,U,60
default_numeric.archives=LAST,0.5,1,480:LAST,0.5,4,360:LAST,0.5,14,644:LAST,0.5,60,720:LAST,0.5,720,730:LAST,0.5,10080,520
default_quantifiable.def=GAUGE,60,U,U,60
default_quantifiable.archives=AVERAGE,0.5,1,480:AVERAGE,0.5,4,360:AVERAGE,0.5,14,644:AVERAGE,0.5,60,720:AVERAGE,0.5,720,730:AVERAGE,0.5,10080,520
default_other.def=GAUGE,60,U,U,60
default_other.archives=LAST,0.5,1,480:LAST,0.5,4,360:LAST,0.5,14,644:LAST,0.5,60,720:LAST,0.5,720,730:LAST,0.5,10080,520
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.
Thanks.