eclipse-mosquitto / mosquitto

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

Bridge closing connection after sending CONNECT #2949

Open Philomenal1317 opened 1 year ago

Philomenal1317 commented 1 year ago

Hello Everyone,

i have a problem with the Bridge functionality and no clue where the problem could be.

After trying to connect to the Bridge i recieve the following messages image

after that the Connectiong Bridge and Bridge sending CONNECT line repeat themself every few seconds.

This is the bridge configuration (hostnames, ip adresses, usernames and password removed)

connection bridge address bridge_protocol_version mqttv50 topic d177fddd-1e22-4775-9eb8-b2662415ec3a/ in 0 "" cpo/ remote_clientid local_username local_password protocol mqtt notifications false notifications_local_only true bridge_outgoing_retain false bridge_attempt_unsubscribe true keepalive_interval 60 start_type automatic restart_timeout 30 cleansession true try_private false remote_username remote_password bridge_tls_version tlsv1.3

The MQTT Broker on the otherside of the Bridge is on the AWS system but i don't know if its the AWSIoT Broker or another Broker system.

Tried the following versions:

Mosquitto 2.0.9 Mosquitto 2.0.11 Mosquitto 2.0.12 Mosquitto 2.0.14 Mosquitto 2.0.16 Mosquitto 2.0.17 and currently trying with Mosquitto 2.0.18

Everywhere the same problem. Looking forward to any help on this matter. Thanks

songxpu commented 10 months ago

We also found this problem in another scenario, when Mosquitto connected to other brokers over the bridge, and then resumed after the other broker network went down, Mosquitto couldn't reconnect, although it prompted a CONNECT message.

ckrey commented 1 month ago

If the address you use includes a port 8883, you probably want a TLS connection. Did you specify bridge_cafile and bridge_certfile/bridge_keyfile ? If not mosquitto will not try a TLS connection although you specified bridge_tls_version.

Did you get your credentials from AWS iOT (https://aws.amazon.com/de/blogs/iot/how-to-bridge-mosquitto-mqtt-broker-to-aws-iot/)?