Rrd4j.persist moved to /var/lib/openhab2?

After upgrading from the latest beta to the so-called “stable” release of OpenHab2, rrd4j stopped working.

After grepping through the logfiles, I found:

2017-01-25 20:38:45.376 [ERROR] [urce.impl.DefaultResourceDescription] - /var/lib/openhab2/rrd4j.persist (No such file or directory)
2017-01-25 20:38:45.377 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
2017-01-25 20:38:45.400 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'rrd4j.persist' is either empty or cannot be parsed correctly!

Seriously?

I worked around this bug by symlinking /etc/openhab2/persistence/rrd4j.persist to /var/lib/openhab2 .

I think if this is really true, you should file an issue somewhere in a repo. Not sure which one. Might be openhab2-distro or openhab2-linuxpkg.

@rtvb is correct, that is a bug. It should be using the .persist file in /etc/openhab2/persistence.

Should we create a new issue? In which repo? openhab2-linuxpkg?

But this doesn’t seem to be a general problem. I recently upgraded from snapshot version #743 to 2.0 stable with rrd4j running stable before and also after the upgrade.

Anyone else with a running or not running rrd4j, just to delimit this a little bit?

If have the same issue for mapdb.persist. (And have no further persistencies installed).

Openhab2 is running under “Ubuntu 16.04.1 LTS”, I upgraded from the Beta by changing the repo from

deb http://dl.bintray.com/openhab/apt-repo2 testing main

to

deb http://dl.bintray.com/openhab/apt-repo2 stable main

after updating the sources, openhab2 was NOT automatically upgraded by upgrade or dist-upgrade, so I did an apt install openhab2, which automatically deleted openhab2-online and installed openhab2.

All other configuration files seems to be loaded correctly.

As I am also using mapdb: No problems for me either.

This is a normal behavior I think. You have to apt install once. From now on apt update/upgrade will work.

Yes, of course. Just wanted to describe my upgrade path, as it may have something to do with the cause of my problem.

I think this goes in openhab2-distro.

Why? It seems to be apt specific, at least I didn’t see any comment from anyone using a non-apt install. Apt-specific stuff should go to openhab-linuxpkg.

I thought it was karaf configuration specific since the log error shows OH is looking in the wrong place.

@Kai I’m not so sure,

/etc/openhab2/persistence.mapdb is being read correctly for me, and I upgraded to 2.0 stable via apt. I can’t think of a pathway for this error to occur?

The linuxpkg project uses this dir layout: https://github.com/openhab/openhab-linuxpkg/blob/master/resources/deb/bin/oh2_dir_layout This seems to be ok for me .

The full command line of my running openhab (started via systemd) is

/usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/openhab2/config -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Djava.awt.headless=true -Djava.endorsed.dirs=/opt/jdk1.8.0_77/jre/lib/endorsed:/opt/jdk1.8.0_77/lib/endorsed:/usr/share/openhab2/runtime/lib/endorsed -Djava.ext.dirs=/opt/jdk1.8.0_77/jre/lib/ext:/opt/jdk1.8.0_77/lib/ext:/usr/share/openhab2/runtime/lib/ext -Dkaraf.instances=/usr/share/openhab2/runtime/instances -Dkaraf.home=/usr/share/openhab2/runtime -Dkaraf.base=/var/lib/openhab2 -Dkaraf.data=/var/lib/openhab2 -Dkaraf.etc=/var/lib/openhab2/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/var/lib/openhab2/tmp -Djava.util.logging.config.file=/var/lib/openhab2/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.main-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main

This looks ok, however, the .persist files are not found until I copy or link them to /var/lib/openhab2 (the userdata-directory).