eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.87k stars 2.36k forks source link

MQTT bridging with authentication not working #2697

Open ereenke opened 1 year ago

ereenke commented 1 year ago

When I try to connect in bridge mode to a broker that requires authorization, I get an error:

Connecting bridge (step 1) clusterfly (srv2.clusterfly.ru:9991)
Connecting bridge (step 2) clusterfly (srv2.clusterfly.ru:9991)
Bridge core-mosquitto.clusterfly sending CONNECT
Received CONNACK on connection ha_home.
Connection Refused: not authorised
Client ha_home closed its connection.

/etc/mosquitto/conf.d/default.conf

listener 1883 0.0.0.0
allow_anonymous true

connection clusterfly
address srv2.clusterfly.ru:9991
username user
password pass
local_clientid ha_home
remote_clientid clusterfly
cleansession true
start_type automatic
topic # both

At the same time, the connection to this broker with the same login and password using mosquitto_sub/mosquitto_pub occurs without problems. Connecting the bridge to the broker without authorization (I checked on test.mosquitto.org) same works well.

I tested it on Ubuntu Server with version 2.0.11 from the native repository and with version 2.0.15 from the mosquitto repository.

sikmir commented 6 months ago

Try to set notifications false.