Skip to main content
1-Visitor
December 17, 2015
Question

Getting error "java.util.concurrent.TimeoutException: timeout waiting for websocket handshake to complete"

  • December 17, 2015
  • 1 reply
  • 3364 views

I am using Thingworx Java edge SDK inside my application, and through my application I am trying to connect to ThingWorx server, but I am getting following exception, any idea about this exception ?

2015-12-17 04:02:39,691 ERROR [Client-EndpointMonitor-1] com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint admin - Refilling connections on [endpoint 0, uri: ws://165.0.0.8:80/Thingworx/WS] failed : timeout waiting for websocket handshake to complete

2015-12-17 04:02:39,693 ERROR [Client-EndpointMonitor-1] com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint admin - 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:563)

    at com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory.createConnection(NettyClientConnectionFactory.java:309)

    at com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint.refillConnections(ClientCommunicationEndpoint.java:225)

    at com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.dutyCycleOn(ConnectivityMonitorTask.java:150)

    at com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.run(ConnectivityMonitorTask.java:264)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    at java.lang.Thread.run(Thread.java:745)

Thanks!

Meghana

1 reply

12-Amethyst
January 3, 2016

You have connected to the server but you are failing up upgrade your connection from http to websocket protocols. This can often be caused by a proxy between you and your sever that intercepts but does not understand the upgrade request. You should either contact your IT support or investigate what devices stand between you and your ThingWorx server.