MQTT binding gives errors

I just tried to install the MQTT binding on a fresh install of OH2.5 on RPI. It gives me the following error. What does it mean and how can I solve it?

[ERROR] [raf.deployer.features.osgi.Activator] - BundleContext is no longer valid

java.lang.IllegalStateException: BundleContext is no longer valid

	at org.eclipse.osgi.internal.framework.BundleContextImpl.checkValid( ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.BundleContextImpl.addBundleListener( ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.apache.karaf.deployer.features.FeatureDeploymentListener.init( ~[?:?]

	at org.apache.karaf.deployer.features.osgi.Activator$DeploymentFinishedListener.deploymentEvent( ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.callListeners( ~[?:?]

	at org.apache.karaf.features.internal.service.Deployer.deploy( ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision( ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13( ~[?:?]

	at [?:1.8.0_152]

	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_152]

	at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_152]

	at [?:1.8.0_152]

What broker are you using the embedded one or mosquitto?

Restart OH a few times and see if the error goes away.

sudo systemctl restart openhab2

None, the broker is in a different machine. Only installed the binding. It gives this error and I cannot add any broker as a thing (no things exist, most likely due to the binding not being properly installed)

The binding from PaperUI > Addons > Misc ?
PaperUI > Addons > Bindings ?

PaperUI > Addons > Bindings
The misc one is a broker right?


Yes it’s the embedded one that I do not recommend.

Have you restarted OH yet?

You may also want to stop OH, clean the cache and reboot as well.

From command line:
sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2 or sudo reboot

I rebooted, no change…
Clearing the cache I did not do. It’s a very clean install of OH2.5, what would be in cache?

Any idea what the error during the binding installation refers to?

It cleans cache and tmp files and contents are for ram and quick OH access. After doing this OH will take a few minuetes to restart.

Something not valid with the bundle.

I forgot to mention before stopping and cleaning the cache to uninstall the mqtt binding. After cleaning cache and OH is fully restarted then reinstall the binding.

@bartsnijder: Please post back the results as this is the second mqtt issue I’ve seen in the past few hours.

I removed the binding and added it again (without clearing the cache). Now all is ok.
Good that it works but somewhat disturbing that certain wow give different results.
Thanks for the help!

Thanks, for some that’s all you need to do. I was giving you the full list just in case.

Please click the post that provided the solution to mark the topic as solved.