Upgrade from openHAB 3.0 to openHAB 3.1.0-1 - bindings fail to load

  • Platform information:
    • Hardware: Raspberry Pi 3 Model B / 1GB RAM / 32 GB SD Card
    • OS: Raspbian 9 (stretch)
    • Java Runtime Environment: openjdk 11.0.11 2021-04-20 LTS
      OpenJDK Runtime Environment Zulu11.48+21-CA (build 11.0.11+9-LTS)
      OpenJDK Client VM Zulu11.48+21-CA (build 11.0.11+9-LTS, mixed mode)
  • openHAB 3.1.0-1

This installation of openHAB started out on OH2.5. I successfully upgraded to OH3.0 and had most things that were working in OH2.5 migrated to OH3.0.

Yesterday, as part of a general upgrade of the rest of the system, openHAB inadvertently got upgraded to OH3.1. After that, I’m getting a repeating error indicating that bindings are failing to install:

2021-08-04 02:11:58.969 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-exec, openhab-misc-openhabcloud, openhab-binding-ambientweather, openhab-binding-smartthings, openhab-binding-network, openhab-transformation-regex, openhab-ui-habpanel, openhab-binding-weatherunderground, openhab-binding-ecobee, openhab-binding-chromecast, openhab-persistence-rrd4j, openhab-ui-basic, openhab-binding-insteon, openhab-binding-astro, openhab-binding-gpstracker': Error occurred installing a bundle.

I’ve tried going into the administration web interface to install bindings. When I try to install bindings (none are listed as currently installed), the selected binding displays an “installing…” indicator, but it never completes and bindings never end up getting added to the list of installed bindings.

What do I need to do to get OH working again with the bindings I need installed?

try deleting the cache (search here for more info).

I made sure the openhab service was stopped and then cleared the cache using

openhab-cli clean-cache

and then restarted the openhab service.

After restarting the service, here’s what’s in /var/log/openhab/openhab.log:

2021-08-05 03:15:17.992 [ERROR] [ternal.service.BootFeaturesInstaller] - Error installing boot features
org.osgi.framework.BundleException: Error occurred installing a bundle.
        at org.eclipse.osgi.storage.Storage.install(Storage.java:760) ~[org.eclipse.osgi-3.16.200.jar:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.installBundle(BundleContextImpl.java:182) ~[org.eclipse.osgi-3.
16.200.jar:?]
        at org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundle0(BundleIdBasedRegion.java:117) ~[?:?]
        at org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundleAtLocation(BundleIdBasedRegion.java:97) ~[?:?]
        at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installBundle(BundleInstallSupportImpl.java:135)
~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installBundle(FeaturesServiceImpl.java:1145) ~[?:?]
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:906) ~[?:?]
        at org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121) ~[?:?]
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java
:1004) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.util.zip.ZipException: Exception in opening zip file: /var/lib/openhab/cache/org.eclipse.osgi/28/0/bundleFile
        at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:349) ~[org.eclipse.osgi-3.16.200.jar:?]
        at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.doOpen(ZipBundleFile.java:48) ~[org.eclipse.osgi-3.16.200.jar:?]
        at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.open(CloseableBundleFile.java:135) ~[org.eclipse.osgi-3.16.20
0.jar:?]
        at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.open(CloseableBundleFile.java:417) ~[org.eclipse.osgi-3.16.20
0.jar:?]
        at org.eclipse.osgi.storage.Storage.install(Storage.java:724) ~[org.eclipse.osgi-3.16.200.jar:?]
        ... 14 more
Caused by: java.util.zip.ZipException: zip END header not found
        at java.util.zip.ZipFile$Source.zerror(ZipFile.java:1623) ~[?:?]
        at java.util.zip.ZipFile$Source.findEND(ZipFile.java:1511) ~[?:?]
        at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1518) ~[?:?]
        at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1322) ~[?:?]
        at java.util.zip.ZipFile$Source.get(ZipFile.java:1285) ~[?:?]
        at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:747) ~[?:?]
        at java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:864) ~[?:?]
        at java.util.zip.ZipFile.<init>(ZipFile.java:262) ~[?:?]
        at java.util.zip.ZipFile.<init>(ZipFile.java:191) ~[?:?]
        at java.util.zip.ZipFile.<init>(ZipFile.java:205) ~[?:?]
        at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:335) ~[org.eclipse.osgi-3.16.200.jar:?]
        at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.doOpen(ZipBundleFile.java:48) ~[org.eclipse.osgi-3.16.200.jar:?]
        at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.open(CloseableBundleFile.java:135) ~[org.eclipse.osgi-3.16.20
0.jar:?]
        at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.open(CloseableBundleFile.java:417) ~[org.eclipse.osgi-3.16.20
0.jar:?]
        at org.eclipse.osgi.storage.Storage.install(Storage.java:724) ~[org.eclipse.osgi-3.16.200.jar:?]
        ... 14 more

same error showed up in this thread.
Reinstalling Zulu Java helped in that case.

I gave that a shot. I went to the Zulu download page and downloaded a fresh copy of
zulu11.50.19-ca-jdk11.0.12-linux_aarch32hf.tar.gz, unpacked it and did the update-alternatives stuff to make it the current version for /usr/bin/java. No luck. Same log results in openhab.log as above.

While my situation and the situation in
[solved] OH3 Error installing boot features share the topmost error message of “Error installing boot features”, mine is due to the following exception being thrown

org.osgi.framework.BundleException: Error occurred installing a bundle.

followed by an exception as a result of a problem with a zip file (presumably the bundle file being installed)

the other posts’s next exception is:

org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-runtime-base; type=karaf.feature; version="[3.0.0,3.0.0]"; filter:="(&(osgi.identity=openhab-runtime-base)(type=karaf.feature)(version>=3.0.0)(version<=3.0.0))" [caused by: Unable to resolve openhab-runtime-base/3.0.0: missing requirement [openhab-runtime-base/3.0.0] osgi.identity; osgi.identity=openhab-core-io-console-karaf; type=karaf.feature [caused by: Unable to resolve openhab-core-io-console-karaf/3.0.0: missing requirement [openhab-core-io-console-karaf/3.0.0] osgi.identity; osgi.identity=openhab-core-base; type=karaf.feature [caused by: Unable to resolve openhab-core-base/3.0.0: missing requirement [openhab-core-base/3.0.0] osgi.identity; osgi.identity=org.openhab.core.automation; type=osgi.bundle; version="[3.0.0,3.0.0]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.core.automation/3.0.0: missing requirement [org.openhab.core.automation/3.0.0] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.openhab.core)(version>=3.0.0)(!(version>=4.0.0)))" [caused by: Unable to resolve org.openhab.core/3.0.0: missing requirement [org.openhab.core/3.0.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]]]]]