Fresh install of OpenHABian 3 on my RasPi 4 --> Mosquitto connection refused


I hava a fresh install of OpenHABian 3 on my RasPi 4.
Using putty I installed mosquitto and entered a password.
Installation told me mosquitto is up and running.

systemctl status mosquitto

tells me active (running)

But I get this in tail:

I found a similar thread here, but it did not help with my problem.
I already tried port 8883 and 1883 as well - both same problem.
What is the right port please?

What I am missing?

BTW: where do I find the mosquitto.log to get further information?


Which one? There’s many.

You likely need to do this.

Whichever you want to use, there is no “right” one. 1883 is standard MQTT port, 8883 the common one for encrypted MQTT.

Point is, you have to set mosquitto up to work for your desired way of making use of MQTT, it does not out of the box.
You need to configure mosquitto for authentication before it’ll allow to connect.

FOR an unencrypted MQTT Server

FWIW, I’ve changed that in openHABian so new Mosquitto installation now should have allow_anonymous true.
Note this won’t relieve you from the task of understanding and configuring Mosquitto, that cannot and never will happen upfront.

1 Like

Hi everybody,

thanks to all for that great help here.
I had to enter

listener 1883

to the file /etc/mosquitto/mosquitto.conf and

restart mosquitto by

sudo systemctl restart mosquitto

now it works like a charm.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.