2021-04-10 09:37:29.796 [ERROR] [org.apache.felix.fileinstall ] - Cannot create folder /var/lib/openhab2/tmp/bundles. Is the folder write-protected?
2021-04-10 09:37:29.798 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedServiceFactory, id=38, bundle=10/mvn:org.apache.felix/org.apache.felix.fileinstall/3.6.4]: Unexpected problem updating configuration org.apache.felix.fileinstall.fc092e7a-5ff2-483a-908f-41330800a177
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) [?:?]
I did get rid of the error by creating:
/var/lib/openhab2/tmp/bundles and /usr/share/openhab2/addons.
I am curious if anyone possibly knows what could be causing openhab to look for these directories? I am running OH3 and I restored my OH2 backup. Everything is working fine even with this error.
I was trying to figure this out before moving from my files setup to a gui based setup.
Backup of OH 2.5 is not compatible with backup of OH 3.3.
You need to do an upgrade from OH 2.5 to 3.3 and then do a backup.
Several files of your OH 2.5 backup contain a path to folder …/openhab2/…
This path does not exist in an OH 3.3 installation.
You could try to add a link that points from openhab2 to openhab but this will not solve all the incompatibilities between OH 2.5 and OH 3.3.
Short question:
I searched for the string “/usr/share/openhab2/addons” on my 3.3 installation and found this file:
/var/lib/openhab/config/org/apache/felix/fileinstall/7e10c35b-88e2-4bc8-a141-07439167f869.config
It is a text file so technically it is possible to edit the file. In case you would like to do it you should first shutdown the OH service.
It would be easier to create a link to and catch all of the files - I assume that there is more than just one file that points to the OH2 setup.
But as stated earlier there are more differences between OH2 and OH3. Continuing this way you will/may get an instable system.