MQTT:在特定的客户端id上一次又一次地断开连接

MQTT:在特定的客户端id上一次又一次地断开连接,mqtt,mosquitto,Mqtt,Mosquitto,我面临特定客户端id断开连接的问题。当我尝试连接时,它会突然断开连接并显示错误 1450599983: New connection from 192.168.2.245 on port 1883. 1450599983: Client 46144 disconnected. 1450599983: New client connected from 192.168.2.245 as 46144 (c0, k60). 1450599984: Socket error on client 4614

我面临特定客户端id断开连接的问题。当我尝试连接时,它会突然断开连接并显示错误

1450599983: New connection from 192.168.2.245 on port 1883.
1450599983: Client 46144 disconnected.
1450599983: New client connected from 192.168.2.245 as 46144 (c0, k60).
1450599984: Socket error on client 46144, disconnecting.
我的conf.d文件是

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /var/run/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d
cleansession true
有时它发生在发送消息之后。为什么会发生这种事,我们怎么能再爱它呢


谢谢

听起来您有多个客户端与同一个clientid连接。每个客户机的clientid必须是唯一的,如果客户机与现有客户机具有相同的id,那么代理将断开旧客户机的连接。如果您在mosquitto上启用完全登录,它将告诉您何时发生这种情况。

听起来您有多个客户端与同一个clientid连接。每个客户机的clientid必须是唯一的,如果客户机与现有客户机具有相同的id,那么代理将断开旧客户机的连接。如果您在mosquitto上启用完全登录,它将在发生这种情况时通知您