MQTT binding / bridge no more working?

Hi,
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 ] [penhab.io.transport.mqtt.MqttService] - 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] [org.eclipse.smarthome.io.rest.sse ] - FrameworkEvent ERROR - org.eclipse.smarthome.io.rest.sse
org.osgi.framework.BundleException: Exception in org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start() of bundle org.eclipse.smarthome.io.rest.sse.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:792)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.Module.doStart(Module.java:571)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.Module.start(Module.java:439)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[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
timeDelegate.class
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:146)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
at javax.ws.rs.core.MediaType.valueOf(MediaType.java:179)
at org.glassfish.jersey.media.sse.SseFeature.(SseFeature.java:62)
at org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start(SseActivator.java:44)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_91]
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
… 14 more

It seems that something ist broken somewhere …

Benno

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 | 1.10.0.201706211218 | openHAB MQTT Binding

All MQTT related are active :frowning:

209 | Active | 80 | 1.10.0.201702140757 | openHAB MQTT Transport Bundle
202 | Active | 80 | 1.10.0.201702140757 | openHAB MQTT Binding
198 | Active | 80 | 1.10.0.201702140757 | 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 …

Thanks.

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 ] [penhab.io.transport.mqtt.MqttService] - 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 …