技术文章 - CS374550
当 ThingWorx Java SDK 客户端连接到 PTC Cloud 托管的 ThingWorx 时显示各种错误
已修改: 11-Aug-2022
适用于
- ThingWorx Platform 9.3
说明
- 当 ThingWorx Java SDK 客户端连接到 PTC Cloud 托管的 ThingWorx 时显示以下错误
2022-08-03 05:35:12.775+0100 [L: ERROR] [O: ctcccnNettyClientConnectionFactory] [T: Client-EndpointMonitor-1] 连接服务器时发生异常
java.util.concurrent.TimeoutException:超时等待 websocket 握手完成
在 com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory$HandshakeCompletionNotifier.await(NettyClientConnectionFactory.java:815)
在 com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory.createConnection(NettyClientConnectionFactory.java:434)
在 com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint.refillConnections(ClientCommunicationEndpoint.java:234)
在 com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.dutyCycleOn(ConnectivityMonitorTask.java:159)
在 com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.run(ConnectivityMonitorTask.java:306)
在 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
在 java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
在 java.base/java.lang.Thread.run(Thread.java:829)
2022-08-03 03:59:42.775+0100 [L: ERROR] [O: ctcccnThingworxClientConnectionHandler] [T: NettyClient-NIO-1] WebSocket 异常被捕获!,关闭连接!
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException:无效的握手响应 getStatus:403
在 io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(WebSocketClientHandshaker13.java:274)
在 io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.finishHandshake(WebSocketClientHandshaker.java:302)
在 io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandshakeHandler.channelRead(WebSocketClientProtocolHandshakeHandler.java:83)
在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
在 io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
java.util.concurrent.TimeoutException:超时等待 websocket 握手完成
在 com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory$HandshakeCompletionNotifier.await(NettyClientConnectionFactory.java:815)
在 com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory.createConnection(NettyClientConnectionFactory.java:434)
在 com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint.refillConnections(ClientCommunicationEndpoint.java:234)
在 com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.dutyCycleOn(ConnectivityMonitorTask.java:159)
在 com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.run(ConnectivityMonitorTask.java:306)
在 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
在 java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
在 java.base/java.lang.Thread.run(Thread.java:829)
2022-08-03 03:59:42.775+0100 [L: ERROR] [O: ctcccnThingworxClientConnectionHandler] [T: NettyClient-NIO-1] WebSocket 异常被捕获!,关闭连接!
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException:无效的握手响应 getStatus:403
在 io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(WebSocketClientHandshaker13.java:274)
在 io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.finishHandshake(WebSocketClientHandshaker.java:302)
在 io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandshakeHandler.channelRead(WebSocketClientProtocolHandshakeHandler.java:83)
在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
在 io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
这是文章 374550 的 PDF 版本,可能已过期。最新版本 CS374550