Felix.fileinstall in OH3 to work on old pathname

On startup of OH3 I still have a reference to the old OH2 path.
I cleaned the cache and grep’ed everything in $OH_USERDATA but cannot locate the reason for this.
Anyone?

2020-11-28 14:59:15.254 [ERROR] [org.apache.felix.fileinstall        ] - Cannot create folder /var/lib/openhab2/tmp/bundles. Is the folder write-protected?
2020-11-28 14:59:15.255 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedServiceFactory, id=39, bundle=10/mvn:org.apache.felix/org.apache.felix.fileinstall/3.6.4]: Unexpected problem updating configuration org.apache.felix.fileinstall.036a3a02-7595-496a-aac5-4518b3431180
java.lang.RuntimeException: Cannot create folder: /var/lib/openhab2/tmp/bundles
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.prepareDir(DirectoryWatcher.java:647) ~[?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.prepareTempDir(DirectoryWatcher.java:627) ~[?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.<init>(DirectoryWatcher.java:179) ~[?:?]
        at org.apache.felix.fileinstall.internal.FileInstall.updated(FileInstall.java:248) ~[?:?]
        at org.apache.felix.fileinstall.internal.FileInstall$ConfigAdminSupport$Tracker.updated(FileInstall.java:378) ~[?:?]
        at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159) ~[bundleFile:?]
        at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93) [bundleFile:?]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1253) [bundleFile:?]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1197) [bundleFile:?]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [bundleFile:?]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [bundleFile:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
1 Like

File
/var/lib/openhab/etc/org.apache.felix.fileinstall-deploy.cfg
contains
felix.fileinstall.tmpdir = ${karaf.data}/tmp/bundles

${karaf.data} seems to be set during startup /execution of OH -Dkaraf.data= so you need to search for where karaf.data is defined.

karaf.data seems to be set from $KARAF_DATA and that is defined in / by

usr/share/openhab/runtime/bin/oh_dir_layout:export KARAF_DATA="${OPENHAB_USERDATA}"
usr/share/openhab/runtime/bin/inc:        KARAF_DATA=${KARAF_BASE}/data
usr/share/openhab/runtime/bin/inc:            KARAF_DATA=`cygpath --path --windows "${KARAF_DATA}"`

There is one more thing to clean up - the userdata/config contains parsed copy of fileinstall sources.
Take a look if you have it. Generally speaking fileinstall should re-create these on demand from userdata/etc entries.

3 Likes

Thanks that was it. I had restored an OH2 config seems userdata/config was part of that.
Deleted it completely, as you said it gets recreated.

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