6 Replies Latest reply on Mar 3, 2017 2:01 PM by jgorsline RSS
    kborkar Explorer

    getting java.util.concurrent.TimeoutException and java.util.concurrent.RejectedExecutionException after the thingworx session is expired on client (java edge sdk)

    Exception are mentioned below:

     

    Connected thingworx with java through java edge sdk and ran a program continuously but after some time it starts giving below two exceptions:

    (Our guess is, might be thingworx session timeout.)


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

      at com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory$HandshakeCompletionNotifier.await(NettyClientConnectionFactory.java:565) ~[thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory.createConnection(NettyClientConnectionFactory.java:308) ~[thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint.refillConnections(ClientCommunicationEndpoint.java:225) ~[thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.dutyCycleOn(ConnectivityMonitorTask.java:150) [thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.run(ConnectivityMonitorTask.java:264) [thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_66]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_66]

      at java.lang.Thread.run(Unknown Source) [na:1.8.0_66]

     

    java.util.concurrent.RejectedExecutionException: event executor terminated

      at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:706) ~[netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:298) ~[netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:689) ~[netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:421) ~[netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:60) [netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:48) [netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.channel.MultithreadEventLoopGroup.register(MultithreadEventLoopGroup.java:64) [netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:315) [netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.bootstrap.Bootstrap.doConnect(Bootstrap.java:134) [netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:116) [netty-all-4.0.30.Final.jar:4.0.30.Final]

      at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:97) [netty-all-4.0.30.Final.jar:4.0.30.Final]

      at com.thingworx.communications.client.connection.netty.NettyClientConnectionFactory.createConnection(NettyClientConnectionFactory.java:305) [thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at com.thingworx.communications.client.endpoints.ClientCommunicationEndpoint.refillConnections(ClientCommunicationEndpoint.java:225) [thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.dutyCycleOn(ConnectivityMonitorTask.java:150) [thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at com.thingworx.communications.common.endpoints.monitor.ConnectivityMonitorTask.run(ConnectivityMonitorTask.java:264) [thingworx-communications-client-java-sdk-6.0.1.server.build-b255.jar:na]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_66]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_66]

      at java.lang.Thread.run(Unknown Source) [na:1.8.0_66]

    18:36:30.430 [Client-EndpointMonitor-156] DEBUG c.t.c.c.e.ClientCommunicationEndpoint - Clearing endpoint authentication data [id: 13628]

    18:36:30.430 [Client-EndpointMonitor-156] INFO  c.t.c.c.e.ClientCommunicationEndpoint - Needed to refill connections on client endpoint [id: 13628] : [active: 0, max: 1]

    18:36:30.430 [Client-EndpointMonitor-156] WARN  io.netty.channel.AbstractChannel - Force-closing a channel whose registration task was not accepted by an event loop: [id: 0xa29bd793]