Artemis 2.1.0: Trouble connecting clients using replication failover

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Artemis 2.1.0: Trouble connecting clients using replication failover

sfmckenrick
Hi,

We are using Artemis in a HA cluster replication configuration with fail-over using static connectors. We have 1 master and 1 slave.

I followed the examples that are included with Artemis 2.1.0, but I am still having three potentially related issues.

1) Occasionally, when the master fails and the slave becomes live, the producer client will fail to connect with an exception of "Unblocking a blocking call that will never get a response". The consumers never seem to have this problem, only the producer.

2) Once the master fails over, our clients will stay connected to the cluster and continue to produce/consume messages like normal. While the master is offline, we are unable to (re)connect clients. We receive an error message similar to this, "Cannot connect to server(s). Tried with all available servers" This does not change until the master is the live server and the slave goes back to backup.

3) Our last issue is when we are using durable topics. When our clients exit gracefully, we do not have an issue. However, when the clients are not shut down cleanly, it looks like the connection is sometimes not cleaned from Artemis. When we go to reconnect the client we get an error saying there is already a connection with the same client id.

It is quite possible that all of these issues are because I am new to JMS/Artemis. I would appreciate any help and insight any of you have to offer. When I get back into the office tomorrow, I will add my broker.xml and my client connection.

Thank you!

Scott
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.1.0: Trouble connecting clients using replication failover

Justin Bertram
> Occasionally, when the master fails and the slave becomes live, the producer
client will fail to connect with an exception of  Unblocking a blocking
call that will never get a response".

This exception is expected in certain scenarios.  See the "Handling
Blocking Calls During Failover" in the HA documentation [1].


> While the master is offline, we are unable to (re)connect clients.

This sounds to me like the clients are not properly configured to find the
backup server.  Do the clients have both the live and backup details in its
URL or are they using discovery to find the live server?


> However, when the clients are not shut down cleanly, it looks like the
connection is sometimes not cleaned from Artemis.

How long are you waiting after a crash before you attempt a reconnect?
There is a server-side connection-ttl which determines how long the broker
will wait before cleaning up dead connections.


Lastly, what client library are you using?


Justin

[1] http://activemq.apache.org/artemis/docs/2.1.0/ha.html

On Thu, Jul 27, 2017 at 8:25 PM, sfmckenrick <[hidden email]> wrote:

> Hi,
>
> We are using Artemis in a HA cluster replication configuration with
> fail-over using static connectors. We have 1 master and 1 slave.
>
> I followed the examples that are included with Artemis 2.1.0, but I am
> still
> having three potentially related issues.
>
> 1) Occasionally, when the master fails and the slave becomes live, the
> producer client will fail to connect with an exception of "Unblocking a
> blocking call that will never get a response". The consumers never seem to
> have this problem, only the producer.
>
> 2) Once the master fails over, our clients will stay connected to the
> cluster and continue to produce/consume messages like normal. While the
> master is offline, we are unable to (re)connect clients. We receive an
> error
> message similar to this, "Cannot connect to server(s). Tried with all
> available servers" This does not change until the master is the live server
> and the slave goes back to backup.
>
> 3) Our last issue is when we are using durable topics. When our clients
> exit
> gracefully, we do not have an issue. However, when the clients are not shut
> down cleanly, it looks like the connection is sometimes not cleaned from
> Artemis. When we go to reconnect the client we get an error saying there is
> already a connection with the same client id.
>
> It is quite possible that all of these issues are because I am new to
> JMS/Artemis. I would appreciate any help and insight any of you have to
> offer. When I get back into the office tomorrow, I will add my broker.xml
> and my client connection.
>
> Thank you!
>
> Scott
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Artemis-2-1-0-Trouble-connecting-clients-
> using-replication-failover-tp4728995.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Artemis 2.1.0: Trouble connecting clients using replication failover

sfmckenrick
Thanks for the response! Sorry it took me so long to respond.

 I was able to get everything working. I had a collection of small errors that was causing all of my headaches.
Loading...