Getting SocketTimeoutException error when HotRod Java client trying to reconnect on Red Hat JBoss Data Grid

Solution Verified - Updated -


  • Red Hat Data Grid
    • 7.3.x
  • Hot Rod Java client


  • Getting timed out when JDG client tries to reconnect on JDG server
  • After stopping JDG server node, Hot Rod Java client gets blocked and launches a SocketTimeoutException client exception
  • Hot Rod client is not retrying when a server goes down launching Connection reset by peer


The Hot Rod client registers a default timeout for operations using the socket timeout (60000 milliseconds by default). However, when this timeout is reached, the retry logic is not invoked causing requests to dead and servers failing immediately without retry.

  1. To solve that issue update the Hot Rod Java client to 7.3.5 version as described in the Fix Version/s: on JIRA JDG-3357
  2. Set the socket_timeout, connect_timeout, max_retries in the client-side configuration.
    This can be done one the file (or, as below:
        infinispan.client.hotrod.socket_timeout = 5000
        infinispan.client.hotrod.connect_timeout = 5000
        infinispan.client.hotrod.max_retries = 5

Or programmatically:


The values should be less than the max-idle defined in the clustered.xml file.

Root Cause

This issue was tracked by the following JIRA:
- Upstream community JIRA: ISPN-10429
- Internal product JIRA: JDG-3357

Diagnostic Steps

Search for SocketTimeoutException error in the Hot Rod Java client log as follow:

Exception in thread "main" org.infinispan.client.hotrod.exceptions.TransportException:: GetOperation{api-general-filestore, key=[B0x033E03323531, flags=0} timed out after 60000 ms
    at org.infinispan.client.hotrod.impl.Util.rewrap(
    at org.infinispan.client.hotrod.impl.Util.await(
    at org.infinispan.client.hotrod.impl.RemoteCacheImpl.get(
Caused by: GetOperation{api-general-filestore, key=[B0x033E03323531, flags=0} timed out after 60000 ms
    at io.netty.util.concurrent.PromiseTask$
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(
    at io.netty.util.concurrent.SingleThreadEventExecutor$
    at io.netty.util.internal.ThreadExecutorMap$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.


This is not a valid solution.