Connecting HornetQ using SSl connection JBoss EAP 6.1 messaging subsystem
ravi21588 May 10, 2017 10:06 AMIam trying to connect to HornetQ server using SSL in JBoss EAP 6.1. I have added the connector,acceptor,SSL Connection factory in hornetQ server configuration.
Configuration in HornetQ server messaging subsytem is as below:
Connector configuration:
<connectors>
<netty-connector name="netty" socket-binding="messaging"/>
<netty-connector name="netty-throughput" socket-binding="messaging-throughput">
<param key="batch-delay" value="50"/>
</netty-connector>
<netty-connector name="netty-ssl" socket-binding="ssl-messaging">
<param key="ssl-enabled" value="true"/>
<param key="trust-store-path" value="/opt/jboss/security/CompanyServerTruststore.jks"/>
<param key="trust-store-password" value="changeit"/>
</netty-connector>
<in-vm-connector name="in-vm" server-id="0"/>
</connectors>
Acceptor Configuration:
<acceptors>
<netty-acceptor name="netty" socket-binding="messaging"/>
<netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
<param key="batch-delay" value="50"/>
<param key="direct-deliver" value="false"/>
</netty-acceptor>
<netty-acceptor name="netty-ssl" socket-binding="ssl-messaging">
<param key="ssl-enabled" value="true"/>
<param key="key-store-path" value="${jboss.web.ssl.keystore:/opt/jboss/security/CompanyServerKeyFile.jks}"/>
<param key="key-store-password" value="${VAULT::CompanyKeystore::pw::1}"/>
</netty-acceptor>
<in-vm-acceptor name="in-vm" server-id="0"/>
</acceptors>
Connectionfactory configuration:
<connection-factory name="SSLRemoteConnectionFactory">
<connectors>
<connector-ref connector-name="netty-ssl"/>
</connectors>
<entries>
<entry name="java:jboss/exported/jms/SSLRemoteConnectionFactory"/>
</entries>
</connection-factory>
Iam connecting to the server using hermes jms with remoting port and context factory org.jboss.naming.remote.client.InitialContextFactory and using the SSLRemoteConnectionFactory .
Error:
HornetQException[errorType=NOT_CONNECTED message=HQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:863)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:583)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:107)
at hermes.JNDIConnectionFactory.createConnection(JNDIConnectionFactory.java:113)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:126)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:92)
at hermes.impl.jms.ConnectionSharedManager.reconnect(ConnectionSharedManager.java:81)
at hermes.impl.jms.ConnectionSharedManager.connect(ConnectionSharedManager.java:91)
at hermes.impl.jms.ConnectionSharedManager.getConnection(ConnectionSharedManager.java:104)
at hermes.impl.jms.ConnectionSharedManager.getObject(ConnectionSharedManager.java:142)
at hermes.impl.jms.ThreadLocalSessionManager.connect(ThreadLocalSessionManager.java:190)
at hermes.impl.jms.ThreadLocalSessionManager.getSession(ThreadLocalSessionManager.java:570)
at hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:387)
at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:323)
at hermes.browser.tasks.BrowseDestinationTask.invoke(BrowseDestinationTask.java:122)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:745)
is there anything wrong with my configuration.Do i need to create connectors,Acceptors and connection factory in HornetQ server.?
-
Hermes.jpg 29.1 KB