[solved] Unable to connect to MQTT broker (on bullseye)

Has anything changed with (or not, and does it need a change) the MQTT integration in 2022.2 because I cannot connect to it anymore.

I also found out that the broker is another version compared to with buster.

EDIT: I get this error

Logger: homeassistant.components.mqtt
Source: components/mqtt/__init__.py:908
Integration: MQTT (documentation, issues)
First occurred: 12:59:54 AM (1 occurrences)
Last logged: 12:59:54 AM

Failed to connect to MQTT server due to exception: [Errno 111] Connection refused

I think back then when I started with HA the MQTT config was done in configuration.yaml, no?
Could it be the credentials were added as well and through all the updates omitted at one point?
On my old setup they show up when I reconfigure the broker integration but I cannot find where they are stored.

See this article:


So the reason is what francisp, above this post, is referring to: a change in the broker.
Because of security improvements in the broker, you cannot just connect to it.

This affects only those users that are installing the MQTT broker manually

I added this to the /etc/mosquitto/mosquitto.conf, after creating the passwordfile with mosquitto_passwd -D passwordfile

listener 1883 <HA IP>
allow_anonymous false
password_file /etc/mosquitto/passwordfile

Thanks @francisp! :+1:

1 Like