You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pwalter <pa...@nasa.gov> on 2014/10/02 19:12:29 UTC

Backup Server - Failover

I'm using the following client configuration :

failover:(tcp://primary:61616,tcp://secondary:61616)?initialReconnectDelay=3000&maxReconnectDelay=2000&randomize=false&startupMaxReconnectAttempts=10

When we publish a message we see the message being published to both primary
and secondary servers by viewing the admin web pages. There are no consumers
on the secondary server but we see numbers on the Massages Enqueued column
and no numbers on the Messages Dequeued column.

Any ideas? Are there more config items to put in the failover command?

thanks for your help!



--
View this message in context: http://activemq.2283324.n4.nabble.com/Backup-Server-Failover-tp4686109.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Backup Server - Failover

Posted by Tim Bain <tb...@alumni.duke.edu>.
Yes, the web console will show you those things.  But it won't show you the
things I mentioned, such as which consumers are subscribed to a topic, or
the list of not just which clients are currently connected but also some
(all?) of the clients that have previously connected, which is why I
suggested you use JConsole to view those things in JMX.  JMX shows you far
more information than the web console does, so if the web console isn't
telling you what you need to know, you need to move to the more
fully-featured tool.

Randomize=false will try the brokers in the order they exist in the list of
URIs.  So if the primary broker is up and stays up, then yes, any client
connecting to that failover URI should try primary first, connect
successfully, and not attempt to connect to secondary.  If you're seeing
connections to secondary when you look at it in JConsole, then 1) they're
using another URI, 2) they're failing to connect to primary (which doesn't
have to be because it's down; maybe there's a firewall in the way?), or
3) there's a bug in the failover protocol's handling of randomize=false.

On Thu, Oct 2, 2014 at 12:21 PM, pwalter <pa...@nasa.gov> wrote:

> The Web Admin console for each server (primary and backup) identifies all
> the
> topics/Number of Consumers/Enqueued Messages/Dequeued Messages.
>
> What about the randomize=false option? Shouldn't that disable secondary?
>
> thanks !!
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Backup-Server-Failover-tp4686109p4686113.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Backup Server - Failover

Posted by pwalter <pa...@nasa.gov>.
The Web Admin console for each server (primary and backup) identifies all the
topics/Number of Consumers/Enqueued Messages/Dequeued Messages.

What about the randomize=false option? Shouldn't that disable secondary?

thanks !!





--
View this message in context: http://activemq.2283324.n4.nabble.com/Backup-Server-Failover-tp4686109p4686113.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Backup Server - Failover

Posted by Tim Bain <tb...@alumni.duke.edu>.
JConsole has an MBeans tab for viewing the JMX beans for the app it
attaches to, and you can drill down to the topic and then see what
consumers are attached to it.  You might take a look there to see if there
are any consumers attached that you're not aware of, or any durable
subscriptions for consumers who are offline.  You can also look
clientConnectors->openwire->clientId at the root of your broker and see
what clients have connected (I think it shows prior connections and current
ones together) to see who's connected to that backup host...

On Thu, Oct 2, 2014 at 11:46 AM, pwalter <pa...@nasa.gov> wrote:

> There were no topics when the clients started.
> At startup the primary has consumers but secondary does not.
> For each publish request the numbers of Enqueued message values increase on
> both primary and secondary servers.
> I'm using the randomize=false option, so what is causing secondary to even
> be involved until the primary is not available.
> thanks again!!
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Backup-Server-Failover-tp4686109p4686111.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Backup Server - Failover

Posted by pwalter <pa...@nasa.gov>.
There were no topics when the clients started.
At startup the primary has consumers but secondary does not.
For each publish request the numbers of Enqueued message values increase on
both primary and secondary servers.
I'm using the randomize=false option, so what is causing secondary to even
be involved until the primary is not available.
thanks again!!



--
View this message in context: http://activemq.2283324.n4.nabble.com/Backup-Server-Failover-tp4686109p4686111.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Backup Server - Failover

Posted by Tim Bain <tb...@alumni.duke.edu>.
Are the numbers in the Enqueued column increasing, or just non-zero?  If
it's not increasing, could you have stranded messages on secondary when you
took primary down (and everyone failed over to backup) and then consumers
eventually migrated back to primary?  (See the Stuck Messages section of
http://activemq.apache.org/networks-of-brokers.html for a description of
the problem and how to solve it.)

On Thu, Oct 2, 2014 at 11:12 AM, pwalter <pa...@nasa.gov> wrote:

> I'm using the following client configuration :
>
>
> failover:(tcp://primary:61616,tcp://secondary:61616)?initialReconnectDelay=3000&maxReconnectDelay=2000&randomize=false&startupMaxReconnectAttempts=10
>
> When we publish a message we see the message being published to both
> primary
> and secondary servers by viewing the admin web pages. There are no
> consumers
> on the secondary server but we see numbers on the Massages Enqueued column
> and no numbers on the Messages Dequeued column.
>
> Any ideas? Are there more config items to put in the failover command?
>
> thanks for your help!
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Backup-Server-Failover-tp4686109.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>