无法获取 Mosquitto <-> AWS IoT - 保持连接的桥梁

问题描述 投票:0回答:2

我在 AWS Ubuntu 20.04.2 LTS 服务器上运行 Mosquitto Broker。我有 2 个 MQTT 桥接器,从我的笔记本电脑到服务器上的代理,以及从服务器到 AWS IoT。

我在服务器上的broker配置如下:

listener 1883
protocol mqtt

listener 9001
protocol websockets

allow_anonymous false
password_file /etc/mosquitto/conf.d/passwd.txt

connection awsiot
address xxxxxxxxxx-ats.iot.eu-north-1.amazonaws.com:8883

topic iotethernet/switch/count out 1
topic iotethernet/ledblock/states in 1

bridge_protocol_version mqttv311
bridge_insecure false
bridge_outgoing_retain false

cleansession true
clientid bridgeawsiot
start_type automatic
notifications true
log_type all

bridge_cafile /etc/mosquitto/certs/rootCA.pem
bridge_certfile /etc/mosquitto/certs/cert.crt
bridge_keyfile /etc/mosquitto/certs/private.key

问题是,当我运行服务器时,桥接客户端不断连接并立即断开连接,而没有错误消息。

Picture of mosquitto broker after bridge client disconnects

我已通过使用 AWS IoT 测试功能进行测试,确保该桥无法正常工作。

从笔记本电脑到服务器的桥梁工作正常。

amazon-web-services mqtt iot mosquitto aws-iot
2个回答
3
投票

我通过将通知设置为 false 来使其工作


0
投票

谢谢 Genoil - 真的很有帮助。

这是通知设置的链接。 https://mosquitto.org/man/mosquitto-conf-5.html

© www.soinside.com 2019 - 2024. All rights reserved.