MQTT error - connection refused - even against known-good configs

Hi, I’m on OH2b4 (I believe, latest on site at present) and I’m facing MQTT issues.

OH is running on Ubuntu server, and I’ve used HABmin/Paper UI to enable MQTT.
The broker is Mosquitto on the same machine, and is known good, i.e. it worked under OH1.8 and works from other clients (from phone, so I know connection details are correct; I can pub/sub from the command line also so I know it’s running).
I get the following error. In order to verify that it wasn’t my broker at fault I changed the config to point to m2m-eclipse.url=tcp://, but i get exactly the same error, so it’s at the OH end.

23:04:32.460 [INFO ] [] - MQTT Service initialization completed.
23:04:32.461 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'mqtt'
23:04:32.464 [ERROR] [] - Error starting broker connection
Unable to connect to server (32103) - Connection refused
        at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start([]
        at org.eclipse.paho.client.mqttv3.internal.ClientComms$[]
Caused by: Connection refused
        at Method)[:1.8.0_91]
        at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start([]
        ... 2 more
23:04:32.465 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'm2m-eclipse'
23:04:32.467 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_157803d1104_serial_sof changed from 1500 to 1501
23:04:32.469 [ERROR] [ssage.ApplicationCommandMessageClass] - Error processing frame: Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 16 04 71 05 00 00  >> Attempt to read message payload out of bounds: Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 16 04 71 05 00 00  (8)
23:04:32.788 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'broker'
23:04:32.788 [ERROR] [org.apache.felix.configadmin        ] - Cannot use configuration org.openhab.mqtt for [org.openhab.core.scriptengine.action.ActionService,, id=339, bundle=203/mvn:org.openhab.action/org.openhab.action.mqtt/1.9.0-SNAPSHOT]: No visibility to configuration bound to

Why would brokers (including the eclipse test broker) refuse my connection?



No items are specifically configured for sending, I just want the standard eventbus logging at present. Been googling for a long time and come up short. Note that changing the port (e.g. to 1882) gives me exactly the same error message. I wondered if it was permissions, but I chowned the OH directory. Am I missing the transport 1.9 snapshot? I can’t find it on the web, and I’ve seen several MQTT troubleshooting threads that state that it is no longer needed for manual inclusion.

At a bit of a loss here.

Do the Mosquitto or server logs (such as auth) show anything? Perhaps starting mosquitto in verbose mode could help understand what’s going on?

Thanks for your input Jeremy, but I got nothing from the logs. I wiped my whole OH install and started from scratch, setting up mqtt as the first step. This worked, though I had to disable mqtt-action to avoid exceptions.

So it’s no longer an issue, though I wouldn’t consider it ‘solved’.