What is the reason for Interrupted Exceptions for HotRod connections in RHDG?

Solution Verified - Updated -

Issue

  • After interrupting a thread the HotRod client will not longer work and throw Exceptions, what is the reason
  • I'm getting the following Exception and can not understand the reason
- 2018-05-23 17:08:02,631 [parallel-io-189] ERROR com.redhat.test.CacheErrorHandler -  We should not reach here!
java.lang.IllegalStateException: We should not reach here!
    at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:84)
    at org.infinispan.client.hotrod.impl.RemoteCacheImpl.put(RemoteCacheImpl.java:269)
    at org.infinispan.client.hotrod.impl.RemoteCacheSupport.put(RemoteCacheSupport.java:79)
        ...
  • The following Exception is thrown in RHDG 7.2, why is it interrupted and how can I find the root cause?
 ERROR com.example.CacheErrorHandler -  java.lang.InterruptedException
org.infinispan.client.hotrod.exceptions.HotRodClientException: java.lang.InterruptedException
    at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.getMaxRetries(TcpTransportFactory.java:477)
    at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.shouldRetry(RetryOnFailureOperation.java:109)
    at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:51)
    at org.infinispan.client.hotrod.impl.RemoteCacheImpl.put(RemoteCacheImpl.java:269)
    at org.infinispan.client.hotrod.impl.RemoteCacheSupport.put(RemoteCacheSupport.java:79)
    ...
Caused by: java.lang.InterruptedException: null
    ... 28 common frames omitted
  • NIO throw an Exception, but the HotRod ping operation will succeed
TRACE org.infinispan.client.hotrod.impl.operations.PingOperation -  Successfully validated transport: TcpTransport{socket=Socket[addr=/10.254.11.56,port=11222,localport=39136], serverAddress=10.254.11.56:11222, id =3}
TRACE org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation -  Add 192.168.5.1:11222 to failed servers
TRACE org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation -  Invalidating transport TcpTransport{socket=Socket[unconnected], serverAddress=192.168.5.1:11222, id =2}  as a result of transport exception
DEBUG org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation -  Cluster might have completely shut down, try resetting transport layer and topology id
org.infinispan.client.hotrod.exceptions.TransportException: java.nio.channels.ClosedByInterruptException
    at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.flush(TcpTransport.java:209)
    at org.infinispan.client.hotrod.impl.operations.AbstractKeyValueOperation.sendPutOperation(AbstractKeyValueOperation.java:53)
    at org.infinispan.client.hotrod.impl.operations.PutOperation.executeOperation(PutOperation.java:35)
    at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:57)
    at org.infinispan.client.hotrod.impl.RemoteCacheImpl.put(RemoteCacheImpl.java:269)
    at org.infinispan.client.hotrod.impl.RemoteCacheSupport.put(RemoteCacheSupport.java:79)
    ...
Caused by: java.nio.channels.ClosedByInterruptException: null
    at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:478)
    at java.nio.channels.Channels.writeFullyImpl(Channels.java:78)
    at java.nio.channels.Channels.writeFully(Channels.java:98)
    at java.nio.channels.Channels.access$000(Channels.java:61)
    at java.nio.channels.Channels$1.write(Channels.java:174)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.flush(TcpTransport.java:202)
    ... 27 common frames omitted

Environment

  • Red Hat Data Grid (RHDG, JDG)
    • 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In