2 Replies Latest reply on Jul 26, 2017 3:43 AM by Wayne DU

    org.infinispan.client.hotrod.exceptions.TransportException:: Could not fetch transport

    Wayne DU Newbie

      I launched "infinispan-server-9.1.0.Final" at one server. From the output, the server is running successfully. Then I tried to use HotRod method to access cache on windows machine.

      The following lists major code:

       

      org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder

        = new org.infinispan.client.hotrod.configuration.ConfigurationBuilder();

        builder.tcpNoDelay(true)

        .connectionPool()

        .numTestsPerEvictionRun(3)

        .testOnBorrow(false)

        .testOnReturn(false)

        .testWhileIdle(true)

        .addServer()

        .host("192.168.28.132")

        .port(11222);

            

             // Connect to the server

             RemoteCacheManager cacheManager = new RemoteCacheManager(builder.build());

             // Obtain the remote cache

             RemoteCache<String, String> cache = cacheManager.getCache("addressbook");

       

      Now always raised the following exception. I could not find the reason. Anybody can give me help?  Thanks.

       

      ERROR: ISPN004007: Exception encountered. Retry 10 out of 10
      org.infinispan.client.hotrod.exceptions.TransportException:: Could not fetch transport
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.borrowTransportFromPool(TcpTransportFactory.java:426)
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.getTransport(TcpTransportFactory.java:258)
      at org.infinispan.client.hotrod.impl.operations.FaultTolerantPingOperation.getTransport(FaultTolerantPingOperation.java:28)
      at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:56)
      at org.infinispan.client.hotrod.impl.RemoteCacheImpl.ping(RemoteCacheImpl.java:510)
      at org.infinispan.client.hotrod.impl.RemoteCacheImpl.resolveCompatibility(RemoteCacheImpl.java:782)
      at org.infinispan.client.hotrod.RemoteCacheManager.createRemoteCache(RemoteCacheManager.java:287)
      at org.infinispan.client.hotrod.RemoteCacheManager.getCache(RemoteCacheManager.java:157)
      at org.infinispan.client.hotrod.RemoteCacheManager.getCache(RemoteCacheManager.java:152)
      at com.hp.dxg.study.HotRodClient.main(HotRodClient.java:30)
      Caused by: org.infinispan.client.hotrod.exceptions.TransportException:: Could not connect to server: 192.168.28.132:11222
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:89)
      at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:38)
      at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:17)
      at infinispan.org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.borrowTransportFromPool(TcpTransportFactory.java:420)
      ... 9 more
      Caused by: java.net.ConnectException: Connection refused: no further information
      at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
      at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
      at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:79)
      ... 13 more

      Exception in thread "main" org.infinispan.client.hotrod.exceptions.TransportException:: Could not fetch transport
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.borrowTransportFromPool(TcpTransportFactory.java:426)
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.getTransport(TcpTransportFactory.java:258)
      at org.infinispan.client.hotrod.impl.operations.FaultTolerantPingOperation.getTransport(FaultTolerantPingOperation.java:28)
      at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:56)
      at org.infinispan.client.hotrod.impl.RemoteCacheImpl.ping(RemoteCacheImpl.java:510)
      at org.infinispan.client.hotrod.impl.RemoteCacheImpl.resolveCompatibility(RemoteCacheImpl.java:782)
      at org.infinispan.client.hotrod.RemoteCacheManager.createRemoteCache(RemoteCacheManager.java:287)
      at org.infinispan.client.hotrod.RemoteCacheManager.getCache(RemoteCacheManager.java:157)
      at org.infinispan.client.hotrod.RemoteCacheManager.getCache(RemoteCacheManager.java:152)
      at com.hp.dxg.study.HotRodClient.main(HotRodClient.java:30)
      Caused by: org.infinispan.client.hotrod.exceptions.TransportException:: Could not connect to server: 192.168.28.132:11222
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:89)
      at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:38)
      at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:17)
      at infinispan.org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.borrowTransportFromPool(TcpTransportFactory.java:420)
      ... 9 more
      Caused by: java.net.ConnectException: Connection refused: no further information
      at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
      at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
      at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
      at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:79)
      ... 13 more