MQTT binding / bridge no more working?

we just noticed, that the MQTT binding seems not to work since “some” snapshots ago …
It does not even connect to the broker (activemq) anymore, as it always did before :frowning:
The config files have never been changed …
The only message found in the openhab.log is during shutdown …
[INFO ] [] - Stopping broker connection 'xxxx’
No related start/failure/error message anywhere ?!?!

Any ideas what else to check and how ?
(Tried start_debug, but does not show other info …)

There is just one (probably unrelated) error during startup “maybe” is has something to do with it ?

2017-06-24 10:17:12.552 [ERROR] [ ] - FrameworkEvent ERROR -
org.osgi.framework.BundleException: Exception in of bundle
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.BundleContextImpl.start([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.Module.doStart([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.Module.start([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.util.SecureAction.start([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer.applyDelta([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer.resolve([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer.refresh([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager$[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
Caused by: java.lang.LinkageError: ClassCastException: attempting to castbundleresource://21.fwk149225732/javax/ws/rs/ext/RuntimeDelegate.class to bundleresource://21.fwk149225732/javax/ws/rs/ext/Run
at org.eclipse.osgi.internal.framework.BundleContextImpl$[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.BundleContextImpl$[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at Method)[:1.8.0_91]
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator([org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
… 14 more

It seems that something ist broken somewhere …


I had the same problem some snapshots ago.
But as far as I found out it was caused by an Operating system update.
Try to enable the service again (assuming you are on a recent Raspbian system):

sudo systemctl enable mosquitto  
sudo systemctl start mosquitto   

That worked for me.

Nope, the broker is running …
The data source is happily posting updates …

The MQTT binding does not connect to the broker …

Because you did not change the config the “memory” bug cannot be the problem either (/userdata/config/org/openhab/mqtt.config).

Did you try connecting to the karaf console to see if the binding is active?

200 | Active | 80 | | openHAB MQTT Binding

All MQTT related are active :frowning:

209 | Active | 80 | | openHAB MQTT Transport Bundle
202 | Active | 80 | | openHAB MQTT Binding
198 | Active | 80 | | openHAB Mqtt Action

Try to uninstall the MQTT Action addon and restart OH2 to see if things improve… there was a case where the action was causing trouble for the binding

Did that before - no change …

BUT installing today’s snapshot #965 fixes the above mentioned long error message AND the mqtt binding now works again !!

Maybe I’ll have a look at the changelog …


1 Like

Hmmm, after installing today’s snapshot #970 the MQTT bridge stopped working again :frowning:

This time we tried Angelo’s suggestion to uninstall MQTT Action and bingo! the connection to the broker was started and everything is working again !!

We found the following message sequence in openhab.log when we removed the Action addon:

2017-06-27 10:07:51.238 [INFO ] [] - MQTT Service initialization completed.
2017-06-27 10:07:51.239 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection '****'
2017-06-27 10:07:51.258 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled ‘openhab-action-mqtt’

This looks like something in MQTT Action is blocking the MQTT Service initialization …