Default Persistence Setting

I am experiencing something strange;

I am running OH 2.5.5 on Linux (Ubuntu Server) and have set RRD4J as my default Persistance setting in PaperUI. I also use MAPDB as I need restore-on-start. Basically no problem.

However, whenever my Openhab server/service restart, default persistence service is reset to MAPDB.

This is annoying - as all my graphs etc. shows flat lines when RRD4J is not set as default.

How can I change this behaviour and keep RRD4J as default across restart/reboots ?

After selecting RRD4J in PaperUI did you click the save button in lower right corner? If so, try stopping OH, clean the cache and tmp files then restart.

To clean cache/tmp files:
sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2

No, didnt work. After a restart and a lot of error messages and then a reboot of the server, OH came up with MAPDB as default persistence again. And yes, I did press “save” when selecting RRD4J.

Is there nowhere in a config file or in the REST-UI where I can force the default ? Could it have something to do with the sequence in which the persistence services are mentioned in a config file (MAPDB, RRD4J) ?

The order in which the persistence services are mentioned in the addons.cfg on my system is rrd4j,mapdb. After a restart my default persistence remains to be rrd4j.
I am/was NOT in the impression that this order has anything to do with the PaperUI selected default persistence, but …

Strange - from you comments I decided to have a look again and found runtime.cfg with this section:

################ PERSISTENCE ####################

#  The persistence service to use if no other is specified.
#
#org.eclipse.smarthome.persistence:default=
org.eclipse.smarthome.persistence:default=mapdb

I now changed mapdb to rrd4j and it seemed to fix it ! - just did a restart of the OH service and the graphs are OK and default persistence remain rrd4j.

Strange - but what the he… :wink:

Ups, look into the services folder, but missed to look into that one, sorry.
Learned something today

:blush:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.