Cannot start MQTT Broker

Hi everybody,

I’ve got an issue with my MQTT-binding I simply cannot fix :frowning:

I’m running OH2 on openHABian and I installed the MQTT binding via Paper UI. Basically I want to get my Sonoff S20 with Tasmota up and running (which works if I just use it’s UI) and integrate it into my OH-sitemap.

My mqtt.cfg file looks like this:


The error I get when the system starts is:

2018-04-28 21:02:34.950 [INFO ] [] - MQTT Service initialization completed.
2018-04-28 21:02:34.960 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘broker’
2018-04-28 21:02:35.237 [ERROR] [] - Error starting broker connection
org.eclipse.paho.client.mqttv3.MqttException: Unable to connect to server
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start( []
at org.eclipse.paho.client.mqttv3.internal.ClientComms$ []
at [?:?]
Caused by: Connection refused (Connection refused)
at Method) ~[?:?]
at ~[?:?]
at ~[?:?]
at ~[?:?]
at ~[?:?]
at ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start( ~[?:?]
… 2 more

I’ve tried googling but nothing worked for me.

Can anybody explain to me what is happening and how I can try to resolve my issue?

Thanks in advance!

Maybe I am off-target here, but from what you are writing, I am not sure if you did install mosquitto or another MQTT broker? If not, you will need to do so.

Hey there,

I’m talking about the MQTT-binding on my OH2.

afaik I’m able to start a broker on my machine (PRI3), which doesn’t work in my case.

You need an mqtt broker!! As you have defined you IP as localhost, you can install mosquitto on the same machine as openHAB. mosquitto is very lightweight and won’t ipair your machine. If it doesn’t work for you, just remove it!

The MQTT Binding tries to connect TO a MQTT broker, which is not part of OH!
If such broker isn’t started the binding can’t connect, hence the observed errors!

In case not seen, this post may help: