-
1. Re: Unable to connect Remote JMS client while trying to connect with Standalone hornetq server (with bind address as 0.0.0.0)
gaohoward Jan 13, 2015 2:14 AM (in response to ajinkya.bambal)I think you can't use 0.0.0.0 at client side, you need to tell client which IP to use to connect to. The server can bind to 0.0.0.0 however.
-
2. Re: Unable to connect Remote JMS client while trying to connect with Standalone hornetq server (with bind address as 0.0.0.0)
ajinkya.bambal Jan 13, 2015 3:00 AM (in response to gaohoward)Hi Yong ,
Thanks for the quick answer . But I am not using 0.0.0.0 from JMS client side for look up . I am using proper address for look up (192.168.75.206) . But JMS client is still failing to connect if JMS client is at remote machine.
-
3. Re: Unable to connect Remote JMS client while trying to connect with Standalone hornetq server (with bind address as 0.0.0.0)
gaohoward Jan 13, 2015 6:02 AM (in response to ajinkya.bambal)Ah Ok, I thought you were using the ConnectionFactory which uses netty-throughput connector. Can you show me what your client code looks like? espeically how to estabilish the connection against the servers?
-
4. Re: Unable to connect Remote JMS client while trying to connect with Standalone hornetq server (with bind address as 0.0.0.0)
ajinkya.bambal Jan 13, 2015 11:39 PM (in response to gaohoward)I have attached the JMS client code alonwith Hornetq server conf in the main thread . PFA for the same and let me know if you need any inputs from my side .
-
5. Re: Re: Unable to connect Remote JMS client while trying to connect with Standalone hornetq server (with bind address as 0.0.0.0)
gaohoward Jan 14, 2015 12:24 AM (in response to ajinkya.bambal)Thanks. I can see you use jndi lookup to find a connection factory:
cf = (javax.jms.QueueConnectionFactory)ic.lookup("/ConnectionFactory");
which you will get one that uses connector "netty" as shown in your hornetq-jms.xml. The netty connector is configured as this:
<connector name="netty">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${hornetq.remoting.netty.host:0.0.0.0}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
So your client will use 0.0.0.0 as host to connect to. I'd suggest you add a specific connector to point to a specific IP of your nodes.
Howard
-
6. Re: Re: Unable to connect Remote JMS client while trying to connect with Standalone hornetq server (with bind address as 0.0.0.0)
ajinkya.bambal Jan 14, 2015 3:38 AM (in response to gaohoward)Since I have added 0.0.0.0 as a acceptor host , JMS client should connect to either one of the interface IP automatically without explicitely mentioning connector host IP .
-
7. Re: Re: Unable to connect Remote JMS client while trying to connect with Standalone hornetq server (with bind address as 0.0.0.0)
gaohoward Jan 14, 2015 1:50 AM (in response to ajinkya.bambal)I don't think this could work at client side. How can a remote client know the address of your servers given only 0.0.0.0? If you like your client to work with multiple servers transparently I suggest you use discovery group which uses UDP (or jgroups) broadcasting to find the server.