Hot Rod Encryption
stejas7 Aug 1, 2016 7:49 AM
I am trying to connect infinispan with hotrod client using SSL hot rod encyption.but i facing a one error while connecting through hot rod client.
For that i was created two files in domain/configuration folder keystore_server.jks ,truststore_server.jks and server.certi. some changes in domain.xml and host.xml as per tutorial.
Same .jks both file are in my java program resources folder.when i run java program its gives me below error.
public class TestSSL
{
public static void main(String[] args)
{
try
{
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.addServer()
.host("tejas.local.com")
.port(11222)
.socketTimeout(3000)
.security()
.ssl()
.enabled(false)
.trustStoreFileName(classLoader.getResource("truststore_server.jks").getPath())
.trustStorePassword("CollaborateSSLPassword".toCharArray());
RemoteCacheManager rcm = new RemoteCacheManager(builder.build());
System.out.println("SSL START");
RemoteCache<Integer, String> cache = rcm.getCache("Test"); // Line num 29
System.out.println("SSL START 2");
cache.put(1, "Tejas");
while (true)
{
Thread.sleep(1000);
System.out.println(cache.get(1));
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
ERROR :
06:23:44.180 [main] ERROR org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation - ISPN004007: Exception encountered. Retry 10 out of 10
org.infinispan.client.hotrod.exceptions.TransportException: End of stream reached!
at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.readByte(TcpTransport.java:198) ~[infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.protocol.Codec20.readMagic(Codec20.java:305) ~[infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:115) ~[infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56) ~[infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.operations.PingOperation.execute(PingOperation.java:45) ~[infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.operations.FaultTolerantPingOperation.executeOperation(FaultTolerantPingOperation.java:31) ~[infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.operations.FaultTolerantPingOperation.executeOperation(FaultTolerantPingOperation.java:17) ~[infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:54) [infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.ping(RemoteCacheImpl.java:673) [infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.resolveCompatibility(RemoteCacheImpl.java:734) [infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.RemoteCacheManager.createRemoteCache(RemoteCacheManager.java:666) [infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.RemoteCacheManager.getCache(RemoteCacheManager.java:536) [infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at org.infinispan.client.hotrod.RemoteCacheManager.getCache(RemoteCacheManager.java:532) [infinispan-remote-8.2.3.Final.jar:8.2.3.Final]
at com.encryption.TestSSL.main(TestSSL.java:29) [bin/:?]
org.infinispan.client.hotrod.exceptions.TransportException:: End of stream reached!
at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.readByte(TcpTransport.java:198)
at org.infinispan.client.hotrod.impl.protocol.Codec20.readMagic(Codec20.java:305)
at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:115)
at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56)
at org.infinispan.client.hotrod.impl.operations.PingOperation.execute(PingOperation.java:45)
at org.infinispan.client.hotrod.impl.operations.FaultTolerantPingOperation.executeOperation(FaultTolerantPingOperation.java:31)
at org.infinispan.client.hotrod.impl.operations.FaultTolerantPingOperation.executeOperation(FaultTolerantPingOperation.java:17)
at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:54)
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.ping(RemoteCacheImpl.java:673)
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.resolveCompatibility(RemoteCacheImpl.java:734)
at org.infinispan.client.hotrod.RemoteCacheManager.createRemoteCache(RemoteCacheManager.java:666)
at org.infinispan.client.hotrod.RemoteCacheManager.getCache(RemoteCacheManager.java:536)
at org.infinispan.client.hotrod.RemoteCacheManager.getCache(RemoteCacheManager.java:532)
at com.encryption.TestSSL.main(TestSSL.java:29)
Kindly please help me the resolve this problem.
Please find all attachments.
-
domain.xml.zip 3.5 KB
-
host.xml.zip 1.3 KB