客户端 <clientid> 上的套接字错误,正在断开连接

Socket error on client <clientid>, disconnecting

我是 运行 mosquitto 经纪人,有两个节点在交互。一个是 android 应用程序,另一个是节点应用程序。一切都在本地运行良好,但是当我将它托管在具有不同 IP 地址的服务器上时,代理断开 android 并显示一条错误消息,指出 "Socket error..." 通信是 WebSocket。

不是防火墙问题,已编辑规则以包含端口

1563531509: New client connected from 115.110.139.126 as mqttjs_8eceda19 (p2, c1, k60).
1563531509: No will message specified.
1563531509: Sending CONNACK to mqttjs_8eceda19 (0, 0)
1563531522: Received PUBLISH from mqttjs_8eceda19 (d0, q2, r0, m56220, 'navigation', ... (66 bytes))
1563531522: Sending PUBREC to mqttjs_8eceda19 (m56220, rc0)
1563531522: Received PUBREL from mqttjs_8eceda19 (Mid: 56220)
1563531522: Sending PUBLISH to RepositoryClient (d0, q1, r0, m1, 'navigation', ... (66 bytes))
1563531522: Sending PUBCOMP to mqttjs_8eceda19 (m56220)
1563531522: New client connected from 115.110.139.126 as mqttjs_98f933df (p2, c1, k60).
1563531522: No will message specified.
1563531522: Sending CONNACK to mqttjs_98f933df (0, 0)
1563531522: Socket error on client RepositoryClient, disconnecting.
1563531522: Received SUBSCRIBE from mqttjs_98f933df
1563531522:     test (QoS 2)
1563531522: mqttjs_98f933df 2 test
1563531522: Sending SUBACK to mqttjs_98f933df
1563531524: New client connected from 115.110.139.126 as RepositoryClient (p2, c0, k6464).
1563531524: No will message specified.
1563531524: Sending CONNACK to RepositoryClient (1, 0)
1563531524: Sending PUBLISH to RepositoryClient (d1, q1, r0, m1, 'navigation', ... (66 bytes))
1563531524: Socket error on client RepositoryClient, disconnecting.

显然,客户端在订阅期间抛出了异常,并且客户端正在尝试使用相同的 ID 重新连接。因此套接字错误。修复异常原因修复了问题。