[Solved] Migration from OH 2.5.12 to OH 3.1.0-M3: Orphan warning of failed installation of a binding from addons folder which does not exist anymore

Hi all,

I just migrated from OH v 2.5.12 to v3.1.0-M3 and I managed to remove all corresponding warnings and errors except one of a binding which I installed on the old version via the addons directory. I deleted this binding from the addons folder but I still get this warning in the karaf log:

11:02:47.347 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.avmfritz-2.5.12-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.avmfritz [210]
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]

There must be some orphan configuration entry somewhere in the OH repository that still believes that the binding is there.

Does anyone have an idea what to do to get rid of that warning?

Cheers
Justus

Look at /var/lib/openhab/config/org/openhab/addons.config. The cfg from /etc/openhab/services end up there. Sometimes it doesn’t handle deletions very well.

Hi @rlkoshak,

I did quite a lot in the meantime to get my environment smoothly running and the issue has seemed to be that I saw still two “AVM Fritz!” bindings in karaf console with >bundle:list
It was I guess 239 and 241 or something like that.

I have deleted the appropriate named folder in the cache directory ./userdata/cache/org.eclipse.osgi/
And after deleting both directories only the AVM Fritz! binding reinstalled and the other one was gone.

So the process of getting rid of an orphan binding that keeps installing even after removing from the addons directory would be

  • to find out the binding id with the bundle:list command in karaf console: e.g.
    263 │ Active │ 80 │ 3.1.0.M3 │ openHAB Add-ons :: Bundles :: AVM FRITZ! Binding
  • stop OH
  • delete the appropriate number directory in ./userdata/cache/org.eclipse.osgi/###
    in this example ‘263’
    ./userdata/cache/org.eclipse.osgi/263
  • restart OH

I checked this first as I know this behavior but it did not help as I had the new binding installed but the old binding still in the OH configuration even though it was not in the addons directory anymore.