0 Replies Latest reply on Sep 6, 2013 5:02 AM by Poonam Kamboj

    client fails to connect to embedded HornetQ configured with SSL in JBOSS EAP 6.1.0

    Poonam Kamboj Newbie

      SSL Configuration in Hornetq Server subsystem in standalone-full-ha.xml

       

      <connector name="netty-ssl-connector">

      <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

      <param key="host" value="localhost"/>

      <param key="port" value="5500"/>

      <param key="ssl-enabled" value="true"/>

      </connector>

       

      <acceptor name="netty-ssl-acceptor">

      <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

      <param key="host" value="localhost"/>

      <param key="port" value="5500"/>

      <param key="ssl-enabled" value="true"/>

      <param key="key-store-path" value="/home/jboss-eap-6.1/certs/broker.jks"/>

      <param key="key-store-password" value="test"/>

      <param key="trust-store-path" value="/home/jboss-eap-6.1/certs/broker.ts"/>

      <param key="trust-store-password" value="test"/>

      </acceptor>

       

      <broadcast-groups>

      <broadcast-group name="bg-group1">

      <socket-binding>messaging-group</socket-binding>

      <broadcast-period>5000</broadcast-period>

      <connector-ref>

      netty

      </connector-ref>

      <connector-ref>netty-ssl-connector</connector-ref>

      </broadcast-group>

      </broadcast-groups>

       

       

      When the client tries to connect to server I get below error on client side

       

      $ java -Djavax.net.ssl.keyStore=/home/certs/client.ks -Djavax.net.ssl.keyStorePassword=test -Djavax.net.ssl.trustStore=/home/certs/client.ts -Djavax.net.ssl.trustStorePassword=test  Test

       

      1. java.lang.IllegalStateException: Unable to create NettyConnector for localhost

              at org.hornetq.core.remoting.impl.netty.NettyConnector.start(NettyConnector.java:348)

              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:1137)

              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:994)

              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:225)

              at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:753)

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:601)

              at org.hornetq.jms.client.HornetQConnectionFactory.createQueueConnection(HornetQConnectionFactory.java:131)

      Caused by: java.lang.Exception: Failed to find a store at hornetq.keystore

              at org.hornetq.core.remoting.impl.ssl.SSLSupport.validateStoreURL(SSLSupport.java:200)

              at org.hornetq.core.remoting.impl.ssl.SSLSupport.loadKeystore(SSLSupport.java:145)

              at org.hornetq.core.remoting.impl.ssl.SSLSupport.loadKeyManagers(SSLSupport.java:168)

              at org.hornetq.core.remoting.impl.ssl.SSLSupport.createClientContext(SSLSupport.java:73)

              at org.hornetq.core.remoting.impl.ssl.SSLSupport.getInstance(SSLSupport.java:87)

              at org.hornetq.core.remoting.impl.netty.NettyConnector.start(NettyConnector.java:343)

       

       

      Please let me know what configuration changes are required at server/client side to resolve this error.

       

      thank you.