MQTT Stopped Working HELP!

I am a heavy user of MQTT and everything was working fairly well. I don’t yet have my monitoring set up so I don’t know when my problems started but I can say with the latest pull from Docker Hub (which if the branding is to be believed is 2.0.0 Release Build).

In my attempts to debug I escalated to the point where I completely removed my userdata folder and let it start over from scratch. So I’m basically running from a completely fresh install with an OH 2 configuration that used to work.

I’ve made no changes to cause all of my MQTT Items to no longer receive messages. My configs and Items are all unchanged from the previous working version.

This is what I know:

  • my remote devices are still happily publishing messages and I’ve confirmed that I can receive the messages using mosquitto_sub
  • there is nothing in the logs from MQTT, not even something like `MQTT Refresh service has been started; the only messages I see with “MQTT” are installing the binding (after going nuclear on my userdata folder)
  • I put the binding into TRACE logging and I see it starting up and configuring each of my Items as expected.
  • I double checked userdata/config/org/openhab/mqtt.config and verified the parameters match what I have in services/mqtt.cfg
2017-01-25 16:10:36.964 [mqtt                      ] - BundleEvent STARTING - org.openhab.binding.mqtt
2017-01-25 16:10:36.968 [MqttActivator             ] - MQTT binding has been started.
2017-01-25 16:10:36.971 [mqtt                      ] - BundleEvent STARTED - org.openhab.binding.mqtt
2017-01-25 16:10:37.604 [mqtt                      ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.mqtt.MqttBindingProvider}={component.name=org.openhab.binding.mqtt.genericbindingprovider, component.id=161, service.id=305, service.bundleid=193, service.scope=bundle} - org.openhab.binding.mqtt
2017-01-25 16:10:37.617 [MqttGenericBindingProvider] - Starting to load MQTT config for item vMBR_Temperature
2017-01-25 16:10:37.632 [MqttItemConfig            ] - Loaded MQTT config for item 'vMBR_Temperature' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.656 [MqttGenericBindingProvider] - Starting to load MQTT config for item vMBR_Humidity
2017-01-25 16:10:37.657 [MqttItemConfig            ] - Loaded MQTT config for item 'vMBR_Humidity' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.658 [MqttGenericBindingProvider] - Starting to load MQTT config for item vMBR_Light
2017-01-25 16:10:37.660 [MqttItemConfig            ] - Loaded MQTT config for item 'vMBR_Light' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.662 [MqttGenericBindingProvider] - Starting to load MQTT config for item vGarageOpener1
2017-01-25 16:10:37.664 [MqttItemConfig            ] - Loaded MQTT config for item 'vGarageOpener1' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.664 [MqttGenericBindingProvider] - Starting to load MQTT config for item vGarageOpener2
2017-01-25 16:10:37.668 [MqttItemConfig            ] - Loaded MQTT config for item 'vGarageOpener2' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.668 [MqttGenericBindingProvider] - Starting to load MQTT config for item vFrontDoor
2017-01-25 16:10:37.669 [MqttItemConfig            ] - Loaded MQTT config for item 'vFrontDoor' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.669 [MqttGenericBindingProvider] - Starting to load MQTT config for item vBackDoor
2017-01-25 16:10:37.670 [MqttItemConfig            ] - Loaded MQTT config for item 'vBackDoor' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.671 [MqttGenericBindingProvider] - Starting to load MQTT config for item vGarageDoor
2017-01-25 16:10:37.675 [MqttItemConfig            ] - Loaded MQTT config for item 'vGarageDoor' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.676 [MqttGenericBindingProvider] - Starting to load MQTT config for item vJennPhone_Cerberos_BT
2017-01-25 16:10:37.680 [MqttItemConfig            ] - Loaded MQTT config for item 'vJennPhone_Cerberos_BT' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.684 [MqttGenericBindingProvider] - Starting to load MQTT config for item vRichPhone_Cerberos_BT
2017-01-25 16:10:37.684 [MqttItemConfig            ] - Loaded MQTT config for item 'vRichPhone_Cerberos_BT' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.685 [MqttGenericBindingProvider] - Starting to load MQTT config for item vJennPhone_Hydra_BT
2017-01-25 16:10:37.686 [MqttItemConfig            ] - Loaded MQTT config for item 'vJennPhone_Hydra_BT' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.690 [MqttGenericBindingProvider] - Starting to load MQTT config for item vRichPhone_Hydra_BT
2017-01-25 16:10:37.691 [MqttItemConfig            ] - Loaded MQTT config for item 'vRichPhone_Hydra_BT' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.692 [MqttGenericBindingProvider] - Starting to load MQTT config for item vRichPhone_Chimera_BT
2017-01-25 16:10:37.692 [MqttItemConfig            ] - Loaded MQTT config for item 'vRichPhone_Chimera_BT' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.693 [MqttGenericBindingProvider] - Starting to load MQTT config for item vJennPhone_Chimera_BT
2017-01-25 16:10:37.693 [MqttItemConfig            ] - Loaded MQTT config for item 'vJennPhone_Chimera_BT' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.693 [MqttGenericBindingProvider] - Starting to load MQTT config for item vReelyActive_Cerberos
2017-01-25 16:10:37.694 [MqttItemConfig            ] - Loaded MQTT config for item 'vReelyActive_Cerberos' : 1 subscribers, 0 publishers
2017-01-25 16:10:37.695 [mqtt                      ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler}={event.topics=openhab/*, component.name=org.openhab.binding.mqtt.MqttItemBinding, component.id=163, service.id=307, service.bundleid=193, service.scope=bundle} - org.openhab.binding.mqtt
2017-01-25 16:10:37.704 [mqtt                      ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={event.topics=openhab/*, service.pid=org.openhab.mqtt-eventbus, component.name=org.openhab.binding.mqtt.eventbus, component.id=162, service.id=308, service.bundleid=193, service.scope=bundle} - org.openhab.binding.mqtt
2017-01-25 16:10:37.721 [MqttEventBusBinding       ] - MQTT: Activating event bus binding.
2017-01-25 16:10:37.724 [MqttEventBusBinding       ] - No mqtt-eventbus properties configured.

And then I see nothing. No messages get published when trigger a rule to publish and published messages I subscribe to do not get received.

This isn’t my first rodeo. I’ve used MQTT with OH since the beginning. This one is a real head scratcher and it has me pretty much dead in the water right now.

Anyone else seeing this?

UPDATE:

I don’t know if this is related but if I have a mosquitto_sub subscribed to the topic I publish messages to from OH and another mosquitto_sub running subscribed to any other topic, regardless of whether OH is running or not, I get a message on the OH publish topic about once a second. It seems to be some MQTT weirdness that I don’t think is related to my OH problems since it does this even when I don’t have OH running. But I mention it as something odd.

Feeling worried :frowning: I too am a heavy user of MQTT and it is working fine - I just updated to see if that broke it, but all good - built 752…Let us know what you find

It’s a long shot given your errors but I had to uninstall the MQTT Action to have my MQTT system come back to life in a recent build. I’m pretty sure there’s bug reported for this but have no idea if it’s what’s affecting you.

1 Like

@pahansen You are my hero!

Indeed, uninstalling the MQTT action did the trick. I uninstalled both binding and action then just reinstalled the binding and I immediately received a message in OH.

With everything I tried, I simply didn’t even think about the action.

I searched for an open action on github and didn’t see one that seems to be related. So I created a new one:

If it’s a duplicate, I apologize to the maintainers.

Yes, I just had the same problem today and had to uninstall mqtt action to get the main mqtt binding working again.

(Also I wish I had seen this thread last night - would have saved me hours of grief trying to figure out what had broken!).

OMG, this post just saved me!
I have just upgraded from an unstable ver 2.1 something from Feb to the latest stable 2.1.0-1 and all my mqtt devices couldn’t communicate with OH2. I rely heavily on mqtt for all my house device traffic and when I couldn’t figure it out for several hours, I was about to pull out my hair.
I reinstalled MQTT Action and all is well again.
Thanks!

Hi,

I now this thread is a little bit old. But I just stumbled over this again. I totally forgot about this issue, activated the Action yesterday and when I came home today everything kept dark due to none of my sonoffs received a command from OH.
After removing the Action everything came back to normal. Is there some kind of a workaround for sending a message from a rule?

Use an Item (e.g. String) bound to the desired MQTT topic and send a Command to it from the rule

#3, #5, #7, #9

Thanks for the help. :slight_smile: