Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openHAB add-ons are not shown as installed anymore #3025

Closed
cweitkamp opened this issue Jul 3, 2022 · 7 comments
Closed

openHAB add-ons are not shown as installed anymore #3025

cweitkamp opened this issue Jul 3, 2022 · 7 comments
Labels
bug An unexpected problem or unintended behavior of the Core PR pending

Comments

@cweitkamp
Copy link
Contributor

Beside openHAB add-ons I am using a third-party JSON add-on provider. After a restart of my system all openHAB add-ons are not listed as installed anymore - all things are working properly - whereas all the third-party add-ons are listed correctly.

Screenshot_20220703-111804

Screenshot_20220703-111821

Extract of REST API response of endpoint addons/<ADDONID> looks like this

{
  "id": "binding-avmfritz",
  "label": "AVM FRITZ!Box Binding",
  "version": "3.3.0",
  "compatible": true,
  "contentType": "application/vnd.openhab.feature;type=karaf",
  "link": "https://www.openhab.org/addons/bindings/avmfritz/",
  "author": "openHAB",
  "verifiedAuthor": true,
  "installed": false,
  "type": "binding",
  "configDescriptionURI": "",
  "keywords": "",
  "countries": "",
  "connection": "",
  "properties": {},
  "loggerPackages": [
    "org.openhab.binding.avmfritz"
  ]
}

After removal of an openHAB add-on e.g. via REST API or console and reinstallation the state of all add-ons is shown correctly again.

@J-N-K
Copy link
Member

J-N-K commented Jul 3, 2022

Interesting. I don't see that.

In the KarafAddonService the list of add-ons is created by iterating over all features and calling getAddon. That uses the featureService to determine if an add-on is installed. Can you check in the karaf console if the features are listed as installed?

@cweitkamp
Copy link
Contributor Author

cweitkamp commented Jul 4, 2022

It looks like the problem is only present after an upgrade - probably related to clearing the cache. After the afore mentioned workaround the listing is correct.

After an upgrade the feature is listed as Uninstalled whereas the bundle is Active:

openhab> bundle:list | grep -i avm
249 │ Active │  80 │ 3.4.0.202207040331     │ openHAB Add-ons :: Bundles :: AVM FRITZ! Binding
openhab> feature:list | grep -i avm                                                                                                                                                   
openhab-binding-avmfritz                          │ 3.4.0.SNAPSHOT   │          │ Uninstalled │ openhab-addons-3.4.0-SNAPSHOT                        │ AVM FRITZ!Box Binding
openhab> 

But as you can see the feature has a different version than the bundle.

@J-N-K
Copy link
Member

J-N-K commented Jul 4, 2022

Then there are two questions:

  • Why are the old bundles still present after the cache was cleared?
  • Why was the feature not installed?

It's easy to explain why it is working after you installed another add-on: Then the configuration changes, and the FeatureInstaller checks for all add-ons if the feature is installed or not and install it if it's missing.

On initial startup this seems to be not working properly. Could it be that the feature is still listed as installed and therefore the FeatureInstaller is not adding it? We don't check the version of the feature, so every feature with the correct name matches.

@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of the Core label Jul 10, 2022
@jlaur
Copy link
Contributor

jlaur commented Jul 22, 2022

I have had the same issue after each 3.3 milestone upgrade (as well as final version), where I uninstalled a random binding and installed it again, after which all bindings started working again. I was assuming something was wrong with my setup since I didn't see anyone mention this. Unfortunately my logs from last upgrade are lost now, but I remember seeing some error with a list of bundles mentioned in the logs during the upgrade.

@J-N-K
Copy link
Member

J-N-K commented Jul 22, 2022

I just upgraded to latest snapshot and saw the same effect. At next restart using remote debugging all add-ons were properly installed. Do you see the same? An additional restart solves the issue? Otherwise it might be timing related.

@jlaur
Copy link
Contributor

jlaur commented Aug 12, 2022

@J-N-K - I just now missed the chance to verify if a reboot would have solved it. :-/ But it happened again with 3.4M1, and this time I got the log message:
2022-08-13 00:02:51.065 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-hue, openhab-automation-pidcontroller, openhab-binding-deconz, openhab-binding-nest, openhab-binding-pushover, openhab-binding-network, openhab-ui-habpanel, openhab-automation-jsscripting, openhab-binding-harmonyhub, openhab-binding-mqtt, openhab-transformation-map, openhab-binding-lgwebos, openhab-binding-kodi, openhab-binding-oppo, openhab-persistence-jdbc-mysql, openhab-binding-irobot, openhab-binding-danfossairunit, openhab-binding-mielecloud, openhab-transformation-javascript, openhab-binding-sonos, openhab-persistence-rrd4j, openhab-ui-basic, openhab-binding-astro, openhab-binding-pushbullet, openhab-binding-unifi, openhab-binding-squeezebox': Permission denied

@J-N-K
Copy link
Member

J-N-K commented Aug 13, 2022

I believe this will be solved by #3049.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core PR pending
Projects
None yet
Development

No branches or pull requests

3 participants