技术文章 - CS318801
错误“无法连接到 MQTT [<Thing Name> ]: “等待服务器响应超时”影响 MQTT/MQTTConnection 设备,导致 ThingWorx 平台中显示设备已断开连接。
已修改: 15-May-2026
适用于
- ThingWorx Platform 8.5 to 9.6
说明
- 应用于设备的MQTT / MQTTConnection模板似乎未连接。
- MQTT 扩展 v2.1.0 与 ThingWorx 9.x 不兼容。
- 此问题在 ThingWorx 8.4.x 上无法重现。
- MQTT或MQTTConnection模板的isConnected和lastConnection属性从未更新。
- <ThingworxStorage>\logs\ApplicationLog.log中存在错误:
- 使用MQTT模板(xxx 是MQTT模板的名称)
[L: WARN] [O: c.t.t.m.MQTTThing] [I: ] [U: ] [S: ] [P: ] [T: MQTT Rec: /Thingworx//xxx] Lost MQTT Connection For [<Thing Name>] : Exception Was Connection lost [L: WARN] [O: c.t.t.m.MQTTThing] [I: ] [U: ] [S: ] [P: ] [T: MQTT Rec: /Thingworx//xxx] Lost MQTT Connection For [<Thing Name>] : Cause Was null [L: ERROR] [O: c.t.t.m.MQTTThing] [I: ] [U: ] [S: ] [P: ] [T: Thread-53] Unable to connect to MQTT in [<Thing Name>] : Timed out waiting for a response from the server [L: ERROR] [O: c.t.t.m.MQTTThing] [I: ] [U: ] [S: ] [P: ] [T: Thread-53] Unable to close client in MQTT Thing <Thing Name> : Connect already in progress
- 使用MQTT 连接模板(xxx 是MQTT 连接模板的名称)。
[L: WARN] [O: c.t.t.m.MQTTConnectionThing] [I: ] [U: ] [S: ] [P: ] [T: MQTT Rec: /Thingworx//<Thing Name> Lost MQTT Connection For [<Thing Name>] : Cause Was Connection lost
- MQTT 服务器不断地连接和断开连接。
- MQTT 连接发送数据失败
这是文章 318801 的 PDF 版本,可能已过期。最新版本 CS318801