技术文章 - CS318801

错误“无法连接到 MQTT [<Thing Name> ]: “等待服务器响应超时”影响 MQTT/MQTTConnection 设备,导致 ThingWorx 平台中显示设备已断开连接。

已修改: 15-May-2026   


注意:本文已使用机器翻译软件翻译,以方便非英语客户阅读。但翻译内容可能包含语法错误或不准确之处。请注意, PTC对本文所含信息的翻译准确性及使用后果不承担任何责任。请在 此处 查看本文的英文原始版本以便参考。有关机器翻译的更多详情,请单击 此处
感谢您告诉我们。我们将尽快审阅此译文。

适用于

  • ThingWorx Platform 8.5 to 9.6

说明

  • 应用于设备的MQTT / MQTTConnection模板似乎未连接。
  • MQTT 扩展 v2.1.0 与 ThingWorx 9.x 不兼容。
    • 此问题在 ThingWorx 8.4.x 上无法重现。
  • MQTTMQTTConnection模板的isConnectedlastConnection属性从未更新。
  • <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