Unable to establishJMS Queue connection from remote server
tharanath Aug 10, 2015 1:41 AMHi All,
I am new to JBoss and I am having problem connecting to JMS Queue from java application remotely.I have created connection factory and Queue on JBoss and tested it by accessing from local server. The same queue I am unable to establish connection from remote server. After finding queue its failing to establish connection
PFA standalone-full.xml of JBoss and the program I am using to connect from remote server.
Connection Properties:
private static final String DEFAULT_MESSAGE = "Hello, World!";
private static final String DEFAULT_CONNECTION_FACTORY = "jms/RemoteConnectionFactory";
private static final String DEFAULT_DESTINATION = "TestQ";
private static final String DEFAULT_MESSAGE_COUNT = "1";
private static final String DEFAULT_USERNAME = "admin";
private static final String DEFAULT_PASSWORD = "password1$";
private static final String INITIAL_CONTEXT_FACTORY = "org.jboss.naming.remote.client.InitialContextFactory";
private static final String PROVIDER_URL = "remote://<Server IP>:4447";
Error:
Aug 07, 2015 3:51:21 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA-redhat-1
Aug 07, 2015 3:51:21 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA-redhat-1
Aug 07, 2015 3:51:21 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.16.GA-redhat-1
Aug 07, 2015 3:51:21 PM com.tr.yildiz.jms.HelloWorldJMSClient main
INFO: Attempting to acquire connection factory "jms/RemoteConnectionFactory"
Aug 07, 2015 3:51:22 PM com.tr.yildiz.jms.HelloWorldJMSClient main
INFO: Found connection factory "jms/RemoteConnectionFactory" in JNDI
Aug 07, 2015 3:51:22 PM com.tr.yildiz.jms.HelloWorldJMSClient main
INFO: Attempting to acquire destination "TestQ"
Aug 07, 2015 3:51:22 PM com.tr.yildiz.jms.HelloWorldJMSClient main
INFO: Found destination "TestQ" in JNDI
Aug 07, 2015 3:51:32 PM org.hornetq.core.remoting.impl.netty.NettyConnector createConnection
ERROR: HQ214016: Failed to create netty connection
- java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jboss.netty.channel.socket.oio.OioClientSocketPipelineSink.connect(OioClientSocketPipelineSink.java:109)
at org.jboss.netty.channel.socket.oio.OioClientSocketPipelineSink.eventSunk(OioClientSocketPipelineSink.java:69)
at org.jboss.netty.channel.Channels.connect(Channels.java:634)
at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207)
at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229)
at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182)
at org.hornetq.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:624)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:1223)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:1069)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:246)
at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:839)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:583)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:107)
at com.tr.yildiz.jms.HelloWorldJMSClient.main(HelloWorldJMSClient.java:78)
Aug 07, 2015 3:51:32 PM com.tr.yildiz.jms.HelloWorldJMSClient main
SEVERE: Failed to create session factory
Aug 07, 2015 3:51:32 PM org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1$MessageReceiver handleEnd
ERROR: Channel end notification received, closing channel Channel ID 95df0cda (outbound) of Remoting connection 0008145f to /10.138.80.38:4447
Exception in thread "main" javax.jms.JMSException: Failed to create session factory
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:587)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:107)
at com.tr.yildiz.jms.HelloWorldJMSClient.main(HelloWorldJMSClient.java:78)
Caused by: 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)
... 2 more
-
standalone-full.xml.zip 4.1 KB
-
HelloWorldJMSClient.java 5.3 KB