You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Vdlutah <vs...@gmail.com> on 2018/06/04 17:10:42 UTC

Artemis 2.5.0 - cluster with UDP multicast descovery - connection problem

Hello,

I’ve configured Artemis2.5.0  cluster of two nodes with dynamic discovery
using UDP multicast (for load balancing)
I am using simple JMS client based on example from Artemis distribution. It
just sends messages to the queue.
On client side I configured jndi.properties as 

java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
connectionFactory.ConnectionFactory=udp://231.7.7.7:9876
queue.queue/EventQueue=EventQueue

When I run the client  Artemis works as expected distributing messages for 2
nodes.
But in about 30% of all case application does not run and I get exception

Exception in thread "main" javax.jms.JMSException: Failed to create session
factory
	at
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:815)
	at
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:277)
	at
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:272)
	at
org.apache.activemq.artemis.jms.example.ScheduledMessageExample.main(ScheduledMessageExample.java:117)
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED
message=AMQ119007: Cannot connect to server(s). Tried with all available
servers.]
	at
org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:799)
	at
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:813)
	... 3 more

What could be the problem?

Thanks




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Artemis 2.5.0 - cluster with UDP multicast descovery - connection problem

Posted by Vdlutah <vs...@gmail.com>.
Thank you Clebert for quick response.
I’ll check my broadcasting. 
I’m using UDP discovery on client to avoid configuring any real IP on client
side – it’s a requirement. 




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Artemis 2.5.0 - cluster with UDP multicast descovery - connection problem

Posted by Clebert Suconic <cl...@gmail.com>.
you're using UDP discovery on the client. I would check the
Broadcaster on the servers.

Do you really need UDP on the client though? it's usually easier to
connect to a node and get the topology from that node. Say (DNS).


but if you must use UDP, check your configuration. perhaps the
broadcaster is sending an IP the client cannot understand.

On Mon, Jun 4, 2018 at 1:10 PM, Vdlutah <vs...@gmail.com> wrote:
> Hello,
>
> I’ve configured Artemis2.5.0  cluster of two nodes with dynamic discovery
> using UDP multicast (for load balancing)
> I am using simple JMS client based on example from Artemis distribution. It
> just sends messages to the queue.
> On client side I configured jndi.properties as
>
> java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
> connectionFactory.ConnectionFactory=udp://231.7.7.7:9876
> queue.queue/EventQueue=EventQueue
>
> When I run the client  Artemis works as expected distributing messages for 2
> nodes.
> But in about 30% of all case application does not run and I get exception
>
> Exception in thread "main" javax.jms.JMSException: Failed to create session
> factory
>         at
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:815)
>         at
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:277)
>         at
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:272)
>         at
> org.apache.activemq.artemis.jms.example.ScheduledMessageExample.main(ScheduledMessageExample.java:117)
> Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED
> message=AMQ119007: Cannot connect to server(s). Tried with all available
> servers.]
>         at
> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:799)
>         at
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:813)
>         ... 3 more
>
> What could be the problem?
>
> Thanks
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html



-- 
Clebert Suconic