Karaf fail installing a bundle

Environment

Platform RPi 4 
Release = Raspbian GNU/Linux 10 (buster)
Memory = Free: 6.02GB (78%), Used: 1.74GB (22%), Total: 7.76GB
Swap = Free: 1.80GB (100%), Used: 0.00GB (0%), Total: 1.80GB
Root = Free: 94.51GB (89%), Used: 10.76GB (11%), Total: 109.77GB
Updates = 0 apt updates available.

java -version
openjdk version "11.0.12" 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK Client VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)

cat /var/lib/openhab/config/org/openhab/addons.config
:org.apache.felix.configadmin.revision:=L"18"
binding="zwave,tellstick,astro,network,modbus,http,spotify,chromecast,onkyo,icalendar,enphase"
package="standard"
persistence="influxdb"
service.pid="org.openhab.addons"
ui="basic,habpanel"

After an upgrade from openHAB 3.4.0 M3 to openHAB 3.4.0 - Release Build and moving from a RPi 3b to a RPi 4 (yes, doing those two things in one go is very smart - not) Karaf is having problems installing a bundle.

Initially, openhab.log seems normal but every minute core.karaf.internal.FeatureInstaller is trying to install the bundle and fails.

cat /var/log/openhab/openhab.log
2022-12-28 15:25:34.853 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Stockholm'.
2022-12-28 15:25:34.928 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '57.92739747364082,11.610067784786226'.
2022-12-28 15:25:34.931 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'sv_SE'.
2022-12-28 15:25:34.932 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Measurement system set to 'SI'.
2022-12-28 15:25:51.308 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-modbus, openhab-binding-icalendar, openhab-binding-network, openhab-binding-spotify, openhab-binding-enphase, openhab-persistence-influxdb, openhab-ui-habpanel, openhab-binding-zwave, openhab-binding-chromecast, openhab-ui-basic, openhab-binding-http, openhab-binding-tellstick, openhab-binding-astro, openhab-binding-onkyo': Error occurred installing a bundle.
2022-12-28 15:25:52.691 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2022-12-28 15:25:55.271 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.

Gradually, the /var/log/openhab/openhab.log is filled with error messages:

2022-12-28 14:37:37.340 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-modbus, openhab-binding-icalendar, openhab-binding-network, openhab-binding-spotify, openhab-binding-enphase, openhab-persistence-influxdb, openhab-ui-habpanel, openhab-binding-zwave, openhab-binding-chromecast, openhab-ui-basic, openhab-binding-http, openhab-binding-tellstick, openhab-binding-astro, openhab-binding-onkyo': Error occurred installing a bundle.

So, none of the bindings are installed. I assume that Karaf is not able to find the repo where the bundle is installed but Karaf is a bit of unchartered territory for me and very little info pertaining openHAB 3+ seems to be available in the forum.

I have restarted openHAB (both the service and the RPi) a number of times as someone suggested in a thread here but at no avail.

The openhab service is running:

sudo systemctl status openhab
â—Ź openhab.service - openHAB instance, reachable at http://openHABianPi:8080
   Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/openhab.service.d
           └─override.conf
   Active: active (running) since Wed 2022-12-28 04:57:53 CET; 10h ago
     Docs: https://www.openhab.org/docs/
           https://community.openhab.org
 Main PID: 554 (java)
    Tasks: 102 (limit: 4915)
   CGroup: /system.slice/openhab.service
           └─554 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userdata=/var/lib/openhab -Dopenhab.l

Dec 28 15:20:37 openHABianPi karaf[554]:         at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1518)
Dec 28 15:20:37 openHABianPi karaf[554]:         at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:Warning: The unit file, source configuration file or drop-ins of openhab.service changed on
1322)
Dec 28 15:20:37 openHABianPi karaf[554]:         at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1285)
Dec 28 15:20:37 openHABianPi karaf[554]:         at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:747)
Dec 28 15:20:37 openHABianPi karaf[554]:         at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:864)
Dec 28 15:20:37 openHABianPi karaf[554]:         at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:262)
Dec 28 15:20:37 openHABianPi karaf[554]:         at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:191)
Dec 28 15:20:37 openHABianPi karaf[554]:         at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:205)
Dec 28 15:20:37 openHABianPi karaf[554]:         at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:342)
Dec 28 15:20:37 openHABianPi karaf[554]:         ... 16 more

Hoping one of you can point me in the right direction?

This machine can reach the Internet?

You’ve never downloaded and dropped the add-ons kar file into the add-ons folder manually?

Yes, I can ping external servers both by IP-address as well as by name.

No, I have never touched the kar-file (at least not intentionally :wink: )

I’ve seen a number of other threads today with similar problems. Several of those though had to do with an old reference to Bintray. But I imagine there might be a general outage. All the openHAB services appear to be online though. https://status.openhab.org/

1 Like

One potentially odd thing is that when I start the console, it responds with

/var/lib/openhab/tmp/jansi-2.4.0-d4c349631bb88341-libjansi.so.lck (Permission denied)

After that the console seems to behave as usual. I have also been able to start several of the bundles/components manually except for the zwave binding and modbus.
Possibly removing the modbus binding could be a test?

Removing the Modbus binding did not help… The list remains the same except for Modbus is gone from the error:


2022-12-28 21:05:10.727 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-icalendar, openhab-binding-network, openhab-binding-spotify, openhab-binding-enphase, openhab-persistence-influxdb, openhab-ui-habpanel, openhab-binding-zwave, openhab-binding-chromecast, openhab-ui-basic, openhab-binding-http, openhab-binding-tellstick, openhab-binding-astro, openhab-binding-onkyo': Error occurred installing a bundle.

A permission denied error on anything in the openhab folders should not happen. Stop openHAB and use openhab-cli to reset the permissions and then restart.

If that doesn’t help, try clearing the cache. Or if you want to be less disruptive just delete the contents of the tmp folder. Though since your add-ons won’t install anyway, I’d just do a full clear of the cache (also can be done from openhab-cli BTW).

I stopped openHAB, reset the permissions and restarted openHAB. Did not help. I also did two cold starts of the RPi.
Just to know what I embark on if I clear the cache: Will I have to reconfigure all Things, Channels and Items if I clear the cache or will they be restored when i reinstall the bindings?

Thank you so much for your support and advises!

No, it only deletes the addons files and temporary files. It will have to reinstall the addons, that’s all.

Clearing the cache did the trick - thank you Rich!!

PS: It is not clear if the “sudo openhab-cli stop” procedure mentioned in the “Clear the Cache”-thread (Clear the Cache - #101 by HaKuNa) is supported in OH3+:

sudo openhab-cli stop
[sudo] password for openhabian: 

A systemd service configuration exists...
Use 'sudo /bin/systemctl stop openhab.service' to stop an openHAB service
Stopping any instance of openHAB...

Anyway, my system is up and running and I’m a happy Swede :slight_smile:

Those logs from openhab-cli look normal. Starting/stopping OH is handled by the operating system (systemd to be precise) and that’s not changed in OH 3 nor OH 4.

Those log messages from openhab-cli stop are normal and expected.

1 Like