技术文章 - CS395020

当 ThingWorx HA 中的连接丢失时,集成运行时实例的连接并不总是能够恢复

已修改: 28-Mar-2025   


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

适用于

  • ThingWorx Platform 9.4 to 9.5

说明

  • 在 ThingWorx HA 中,集成运行时实例通过负载平衡器 Nginx 连接到连接服务器
  • ThingWorx HA 中已启动并运行 2 个或更多连接服务器
  • 使用 WSCommunication Subsystem 的QueryEndpointSessionsGetBoundThingsForEndpoint服务检查 IR 与哪个连接服务器连接
  • 手动终止该连接服务器以将其关闭
  • 连接的 Integration Runtime 有望在负载均衡器的帮助下将连接路由到其他可用的连接服务器,从而从连接故障中恢复
  • IR 日志停留在下面的错误消息处,没有显示任何恢复尝试的迹象
[Timer-0] ERROR c.t.i.u.RemoteServiceUtils - Error while invoking Health Check on Thingworx
java.lang.Exception: No open connections were available on endpoint 0
	at com.thingworx.communications.common.endpoints.CommunicationEndpoint.getConnection(CommunicationEndpoint.java:397)
	at com.thingworx.communications.common.endpoints.CommunicationEndpoint.sendMessage(CommunicationEndpoint.java:416)
	at com.thingworx.communications.common.endpoints.CommunicationEndpoint.sendRequest(CommunicationEndpoint.java:531)
	at com.thingworx.communications.common.endpoints.CommunicationEndpoint.sendRequest(CommunicationEndpoint.java:500)
	at com.thingworx.communications.client.BaseClient.sendRequest(BaseClient.java:1076)
	at com.thingworx.communications.client.BaseClient.invokeService(BaseClient.java:418)
	at com.thingworx.communications.client.BaseClient.invokeService(BaseClient.java:372)
	at com.twx.integration.client.things.IntegrationRuntimeServer.invokeService(IntegrationRuntimeServer.java:101)
	at com.twx.integration.utils.RemoteServiceUtils.getHealthResponse(RemoteServiceUtils.java:156)
	at com.twx.integration.Entrypoint$HealthTask.run(Entrypoint.java:112)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
	at java.base/java.util.TimerThread.run(Timer.java:506)
[Timer-0] WARN  c.t.c.c.BaseClient - Unable to set message authentication because Client CommunicationEndpoint is not authenticated
[Client-EndpointMonitor-1] ERROR c.t.c.c.ConnectedThingClient - Unable To Bind Things: Could not bind things: Error trying to process message: Binding failed, see server log for more information V1BindMessage [header=V1MessageHeader [messageType=10, requestId=101, endpointId=1, sessionId=1670095344, flags=0], gatewayName=IR-WIN-QGPP8TIB5JV-ef087aef-ef7c-44a1-92b1-f0c77bbaecad, gatewayType=IntegrationRuntime, names=[IR-WIN-QGPP8TIB5JV-ef087aef-ef7c-44a1-92b1-f0c77bbaecad, IR-WIN-QGPP8TIB5JV-ef087aef-ef7c-44a1-92b1-f0c77bbaecad]]
  • 有时会尝试重新连接,可以在 IR 日志中找到以下日志
[Client-EndpointMonitor-1] ERROR c.t.c.c.e.ClientCommunicationEndpoint - Refilling connections on [endpoint 0, uri: ws://<ip>:<port>/Thingworx/WS] failed : timeout waiting for websocket handshake to complete
[Client-EndpointMonitor-1] ERROR c.t.c.c.e.ClientCommunicationEndpoint - Exception refilling connections was:
java.util.concurrent.TimeoutException: timeout waiting for websocket handshake to complete
	at com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory$HandshakeCompletionNotifier.await(NettyClientConnectionFactory.java:693)
	at com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory.createConnection(NettyClientConnectionFactory.java:398)
	at com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint.refillConnections(ClientCommunicationEndpoint.java:230)
	at com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.dutyCycleOn(ConnectivityMonitorTask.java:159)
	at com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.run(ConnectivityMonitorTask.java:306)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)


这是文章 395020 的 PDF 版本,可能已过期。最新版本 CS395020