[SOLVED] MQTT binding exits with error: MqttException

Hell everyone,
I am having some trouble getting the mqtt binding going. I have read all other threads about this that I can find, tried everything in them that seemed relevant but I just can’t get it going. Total noob so please bear with me if I am asking wrong or missing some information.

First things first: openHab 2.3, Windows 10 pro. OpenHab seems to be running fine except for the described problem.

Log files attached, mqtt.cfg attached.

The broker
The broker is running fine (on the same machine), a snippet of the log attached. I have tried with MQTT.fx, works fine sending and receiving.

The problem does not seem to be like others in the forum since it is not a connection error (what I can see). It is a MqttException.

I have tried reinstalling both the mqtt binding and mqtt action several times. Restarted several times. No solution, it just will not start. Same exception. If I enter wrong configuration details in the cfg-files the error of course changes to describe the error like “IllegalArgumentException” or similar. The attached cfg is the closest I get to get it running though.

Maybe I am missing something really obvious here since I am a noob? Any help would be much appreciated.

MQTT Binding Error.txt (2.4 KB)

Mosquitto_Broker_Log.txt (1.3 KB)

A bit of the broker log:

don’t use <> in the broker alias

instead of <broker> go to broker

(maybe this is not the root-cause of course)

If this doesn’t help, add the following line in your mqtt.cfg (as the first line):


Hi, thanks for answering me! Tried the first part without the <>…

Well, total noob, I will stand in the corner now.

It seems to be working, no error in the log at least. I haven’t had the time to find out exactly how to test it yet but as of now things look very good. Thank you very much!

Best regards


1 Like

Create a demo Switch in OH2, place it in a sitemap, toggle it and monitor with MQTT.fx the broker to see if the ON/OFF messages arrive to the topic (openhab2/out/Test_MQTT/command)

Switch	Test_MQTT "Testing MQTT" <siren> {mqtt=">[broker:openhab2/out/Test_MQTT/command:command:*:default]"}

Check also: MQTT Binding (v1.11) Getting Started 101

Thank you very much for all help - it works like a charm! Very greatful!


1 Like