You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Mike Miljour <mm...@idanalytics.com> on 2008/03/04 03:24:26 UTC

Consumers not always being released

We are currently experiencing a problem where are consumers are not always
being released when we shutdown our consumers.  This seems to happen less
than half the time, but does force us to restart at least one of the 2
ActiveMQ servers that we have in our Shared File System Master Slave
cluster.  We are using the new AMQ persistence.  Because we normally have 2
consumers, we see the problem because every third message hangs while it
waits to find the dead consumer.

We are currently using the snapshot build
apache-activemq-5.1-20080116.172744-2 on linux.  We needed the snapshot
build to get the MasterSlave fix for AMQPersistenceAdapter.  We are also
using Jencks on the consumer side.  The jars we are using for ActiveMQ are
5.0.0.

I am not sure if it relates to the following bug:
https://issues.apache.org/activemq/browse/AMQ-1376

Thanks,
Mike M

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p15818936.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Eric Rodriguez <to...@gmail.com>.
Great, I'll try it out and let you know.

Thx,
Eric

ttmdev wrote:
> FYI - patchfile submitted.
> 
> https://issues.apache.org/activemq/browse/AMQ-1511
> 
> Joe
> Goto www.ttmsolutions.com for a free ActiveMQ user guide
> 
> 
> 
> toxicafunk wrote:
>> That'll be great.
>>
>> Thx,
>> Eric
>>
>> ttmdev wrote:
>>> I'm testing out a patch. If all goes well, I'll submit it in the next day
>>> or
>>> so...
>>>
>>> Joe
>>> Goto www.ttmsolutions.com for a free ActiveMQ user guide
>>>
>>>
>>>
>>> toxicafunk wrote:
>>>> This seems to be exactly the problem. I will try the shared master/slave 
>>>> configuration but is this bug fixable and if so when will a fix be
>>>> ready?
>>>>
>>>> Thanks,
>>>> Eric
>>>>
>>>> Joe Fernandez wrote:
>>>>>> -----Original Message-----
>>>>>> From: Rob Davies [mailto:rajdavies@gmail.com]
>>>>>> Sent: Tuesday, March 11, 2008 4:21 PM
>>>>>> To: users@activemq.apache.org
>>>>>> Subject: Re: Consumers not always being released
>>>>>>
>>>>>>
>>>>>> On 11 Mar 2008, at 19:55, Eric Rodriguez wrote:
>>>>>>
>>>>>>> Mike Miljour wrote:
>>>>>>>> After further investigation, it turns out there was a configuration
>>>>>>>> issue,
>>>>>>>> which could have been avoided with clearer documentation. (it might
>>>>>>>> have
>>>>>>>> helped if i had included my configuration as well!)  We had set the
>>>>>>>> value
>>>>>>>> for broker name differently in our two running instances of
>>>>>>>> ActiveMQ.  Doing
>>>>>>>> this caused the ActiveMQs to act as though they were load balancing
>>>>>>>> instead
>>>>>>>> of acting as Master and slave (which was our intent).  Suggested
>>>>>>>> documentation changes:In the schema reference for brokerName,
>>>>>>>> change the description from: Sets the name of this broker; which
>>>>>>>> must be
>>>>>>>> unique in the network
>>>>>>>> to:
>>>>>>>> Sets the name of this broker; which must be unique in the network,
>>>>>>>> except
>>>>>>>> for master-slave configurations, where it must be the same
>>>>>>>> Also, in the master slave shared file system documentation, include
>>>>>>>> a note
>>>>>>>> stating that the WebConsole will not load for the slave until it
>>>>>>>> becomes the
>>>>>>>> master if the setup is done correctly.  Also mention that the value
>>>>>>>> for
>>>>>>>> brokerName must be the same for the master and all slaves.
>>>>>>> What does "if the setup is done correctly" means? Documentation
>>>>>>> states:
>>>>>>>
>>>>>>> "Whilst a Slave is actively connected to the Master - it does not
>>>>>>> allow or start any network or transport connectors, it's sole
>>>>>>> purpose is to duplicate the state of the master."
>>>>>>>
>>>>>>> I am using the same name on both master and slave, if I try to
>>>>>>> consume from the slave while the master is active it doesn't consume
>>>>>>> messages, which is good. But if I produce against the Slave it
>>>>>>> accepts messages, it doesn't rely them to the consumers but it does
>>>>>>> accepts them.
>>>>>>>
>>>>>>> The problem with this is if there were a network problem and a
>>>>>>> producer connects to a Slave while the master is active, while the
>>>>>>> failover transport has some properties such as maxReconnectAttempts,
>>>>>>> maxReconnectDelay, etc. they seem to have effect if both Master and
>>>>>>> Slave fail (I'm referring to a Pure Master-Slave conf). Any ideas?
>>>>>>>
>>>>>>> Thx,
>>>>>>> Eric
>>>>>> That's odd - a Salve doesn't start its transport connectors until the
>>>>>> master dies
>>>>> With a 'shared' master/slave configuration, the slave runs as
>>>>> documented
>>>>> (i.e., keeps its transports closed while connected to the master).
>>>>> However,
>>>>> in a 'pure' master/slave configuration, the slave opens its transports
>>>>> and
>>>>> accepts connection requests while connected to the master. See the
>>>>> following
>>>>> JIRA.
>>>>>
>>>>> https://issues.apache.org/activemq/browse/AMQ-1511
>>>>>  
>>>>> Joe
>>>>>
>>>>>>
>>>>>> cheers,
>>>>>>
>>>>>> Rob
>>>>>>
>>>>>> http://open.iona.com/ -Enterprise Open Integration
>>>>>> http://rajdavies.blogspot.com/
>>>>>>
>>
> 

Re: Consumers not always being released

Posted by ttmdev <jo...@ttmsolutions.com>.
FYI - patchfile submitted.

https://issues.apache.org/activemq/browse/AMQ-1511

Joe
Goto www.ttmsolutions.com for a free ActiveMQ user guide



toxicafunk wrote:
> 
> That'll be great.
> 
> Thx,
> Eric
> 
> ttmdev wrote:
>> I'm testing out a patch. If all goes well, I'll submit it in the next day
>> or
>> so...
>> 
>> Joe
>> Goto www.ttmsolutions.com for a free ActiveMQ user guide
>> 
>> 
>> 
>> toxicafunk wrote:
>>> This seems to be exactly the problem. I will try the shared master/slave 
>>> configuration but is this bug fixable and if so when will a fix be
>>> ready?
>>>
>>> Thanks,
>>> Eric
>>>
>>> Joe Fernandez wrote:
>>>>
>>>>> -----Original Message-----
>>>>> From: Rob Davies [mailto:rajdavies@gmail.com]
>>>>> Sent: Tuesday, March 11, 2008 4:21 PM
>>>>> To: users@activemq.apache.org
>>>>> Subject: Re: Consumers not always being released
>>>>>
>>>>>
>>>>> On 11 Mar 2008, at 19:55, Eric Rodriguez wrote:
>>>>>
>>>>>> Mike Miljour wrote:
>>>>>>> After further investigation, it turns out there was a configuration
>>>>>>> issue,
>>>>>>> which could have been avoided with clearer documentation. (it might
>>>>>>> have
>>>>>>> helped if i had included my configuration as well!)  We had set the
>>>>>>> value
>>>>>>> for broker name differently in our two running instances of
>>>>>>> ActiveMQ.  Doing
>>>>>>> this caused the ActiveMQs to act as though they were load balancing
>>>>>>> instead
>>>>>>> of acting as Master and slave (which was our intent).  Suggested
>>>>>>> documentation changes:In the schema reference for brokerName,
>>>>>>> change the description from: Sets the name of this broker; which
>>>>>>> must be
>>>>>>> unique in the network
>>>>>>> to:
>>>>>>> Sets the name of this broker; which must be unique in the network,
>>>>>>> except
>>>>>>> for master-slave configurations, where it must be the same
>>>>>>> Also, in the master slave shared file system documentation, include
>>>>>>> a note
>>>>>>> stating that the WebConsole will not load for the slave until it
>>>>>>> becomes the
>>>>>>> master if the setup is done correctly.  Also mention that the value
>>>>>>> for
>>>>>>> brokerName must be the same for the master and all slaves.
>>>>>> What does "if the setup is done correctly" means? Documentation
>>>>>> states:
>>>>>>
>>>>>> "Whilst a Slave is actively connected to the Master - it does not
>>>>>> allow or start any network or transport connectors, it's sole
>>>>>> purpose is to duplicate the state of the master."
>>>>>>
>>>>>> I am using the same name on both master and slave, if I try to
>>>>>> consume from the slave while the master is active it doesn't consume
>>>>>> messages, which is good. But if I produce against the Slave it
>>>>>> accepts messages, it doesn't rely them to the consumers but it does
>>>>>> accepts them.
>>>>>>
>>>>>> The problem with this is if there were a network problem and a
>>>>>> producer connects to a Slave while the master is active, while the
>>>>>> failover transport has some properties such as maxReconnectAttempts,
>>>>>> maxReconnectDelay, etc. they seem to have effect if both Master and
>>>>>> Slave fail (I'm referring to a Pure Master-Slave conf). Any ideas?
>>>>>>
>>>>>> Thx,
>>>>>> Eric
>>>>> That's odd - a Salve doesn't start its transport connectors until the
>>>>> master dies
>>>> With a 'shared' master/slave configuration, the slave runs as
>>>> documented
>>>> (i.e., keeps its transports closed while connected to the master).
>>>> However,
>>>> in a 'pure' master/slave configuration, the slave opens its transports
>>>> and
>>>> accepts connection requests while connected to the master. See the
>>>> following
>>>> JIRA.
>>>>
>>>> https://issues.apache.org/activemq/browse/AMQ-1511
>>>>  
>>>> Joe
>>>>
>>>>>
>>>>>
>>>>> cheers,
>>>>>
>>>>> Rob
>>>>>
>>>>> http://open.iona.com/ -Enterprise Open Integration
>>>>> http://rajdavies.blogspot.com/
>>>>>
>>>>
>>>
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16039191.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Eric Rodriguez <to...@gmail.com>.
That'll be great.

Thx,
Eric

ttmdev wrote:
> I'm testing out a patch. If all goes well, I'll submit it in the next day or
> so...
> 
> Joe
> Goto www.ttmsolutions.com for a free ActiveMQ user guide
> 
> 
> 
> toxicafunk wrote:
>> This seems to be exactly the problem. I will try the shared master/slave 
>> configuration but is this bug fixable and if so when will a fix be ready?
>>
>> Thanks,
>> Eric
>>
>> Joe Fernandez wrote:
>>>
>>>> -----Original Message-----
>>>> From: Rob Davies [mailto:rajdavies@gmail.com]
>>>> Sent: Tuesday, March 11, 2008 4:21 PM
>>>> To: users@activemq.apache.org
>>>> Subject: Re: Consumers not always being released
>>>>
>>>>
>>>> On 11 Mar 2008, at 19:55, Eric Rodriguez wrote:
>>>>
>>>>> Mike Miljour wrote:
>>>>>> After further investigation, it turns out there was a configuration
>>>>>> issue,
>>>>>> which could have been avoided with clearer documentation. (it might
>>>>>> have
>>>>>> helped if i had included my configuration as well!)  We had set the
>>>>>> value
>>>>>> for broker name differently in our two running instances of
>>>>>> ActiveMQ.  Doing
>>>>>> this caused the ActiveMQs to act as though they were load balancing
>>>>>> instead
>>>>>> of acting as Master and slave (which was our intent).  Suggested
>>>>>> documentation changes:In the schema reference for brokerName,
>>>>>> change the description from: Sets the name of this broker; which
>>>>>> must be
>>>>>> unique in the network
>>>>>> to:
>>>>>> Sets the name of this broker; which must be unique in the network,
>>>>>> except
>>>>>> for master-slave configurations, where it must be the same
>>>>>> Also, in the master slave shared file system documentation, include
>>>>>> a note
>>>>>> stating that the WebConsole will not load for the slave until it
>>>>>> becomes the
>>>>>> master if the setup is done correctly.  Also mention that the value
>>>>>> for
>>>>>> brokerName must be the same for the master and all slaves.
>>>>> What does "if the setup is done correctly" means? Documentation
>>>>> states:
>>>>>
>>>>> "Whilst a Slave is actively connected to the Master - it does not
>>>>> allow or start any network or transport connectors, it's sole
>>>>> purpose is to duplicate the state of the master."
>>>>>
>>>>> I am using the same name on both master and slave, if I try to
>>>>> consume from the slave while the master is active it doesn't consume
>>>>> messages, which is good. But if I produce against the Slave it
>>>>> accepts messages, it doesn't rely them to the consumers but it does
>>>>> accepts them.
>>>>>
>>>>> The problem with this is if there were a network problem and a
>>>>> producer connects to a Slave while the master is active, while the
>>>>> failover transport has some properties such as maxReconnectAttempts,
>>>>> maxReconnectDelay, etc. they seem to have effect if both Master and
>>>>> Slave fail (I'm referring to a Pure Master-Slave conf). Any ideas?
>>>>>
>>>>> Thx,
>>>>> Eric
>>>> That's odd - a Salve doesn't start its transport connectors until the
>>>> master dies
>>> With a 'shared' master/slave configuration, the slave runs as documented
>>> (i.e., keeps its transports closed while connected to the master).
>>> However,
>>> in a 'pure' master/slave configuration, the slave opens its transports
>>> and
>>> accepts connection requests while connected to the master. See the
>>> following
>>> JIRA.
>>>
>>> https://issues.apache.org/activemq/browse/AMQ-1511
>>>  
>>> Joe
>>>
>>>>
>>>>
>>>> cheers,
>>>>
>>>> Rob
>>>>
>>>> http://open.iona.com/ -Enterprise Open Integration
>>>> http://rajdavies.blogspot.com/
>>>>
>>>
>>
> 

Re: Consumers not always being released

Posted by ttmdev <jo...@ttmsolutions.com>.
I'm testing out a patch. If all goes well, I'll submit it in the next day or
so...

Joe
Goto www.ttmsolutions.com for a free ActiveMQ user guide



toxicafunk wrote:
> 
> This seems to be exactly the problem. I will try the shared master/slave 
> configuration but is this bug fixable and if so when will a fix be ready?
> 
> Thanks,
> Eric
> 
> Joe Fernandez wrote:
>> 
>> 
>>> -----Original Message-----
>>> From: Rob Davies [mailto:rajdavies@gmail.com]
>>> Sent: Tuesday, March 11, 2008 4:21 PM
>>> To: users@activemq.apache.org
>>> Subject: Re: Consumers not always being released
>>>
>>>
>>> On 11 Mar 2008, at 19:55, Eric Rodriguez wrote:
>>>
>>>>
>>>> Mike Miljour wrote:
>>>>> After further investigation, it turns out there was a configuration
>>>>> issue,
>>>>> which could have been avoided with clearer documentation. (it might
>>>>> have
>>>>> helped if i had included my configuration as well!)  We had set the
>>>>> value
>>>>> for broker name differently in our two running instances of
>>>>> ActiveMQ.  Doing
>>>>> this caused the ActiveMQs to act as though they were load balancing
>>>>> instead
>>>>> of acting as Master and slave (which was our intent).  Suggested
>>>>> documentation changes:In the schema reference for brokerName,
>>>>> change the description from: Sets the name of this broker; which
>>>>> must be
>>>>> unique in the network
>>>>> to:
>>>>> Sets the name of this broker; which must be unique in the network,
>>>>> except
>>>>> for master-slave configurations, where it must be the same
>>>>> Also, in the master slave shared file system documentation, include
>>>>> a note
>>>>> stating that the WebConsole will not load for the slave until it
>>>>> becomes the
>>>>> master if the setup is done correctly.  Also mention that the value
>>>>> for
>>>>> brokerName must be the same for the master and all slaves.
>>>> What does "if the setup is done correctly" means? Documentation
>>>> states:
>>>>
>>>> "Whilst a Slave is actively connected to the Master - it does not
>>>> allow or start any network or transport connectors, it's sole
>>>> purpose is to duplicate the state of the master."
>>>>
>>>> I am using the same name on both master and slave, if I try to
>>>> consume from the slave while the master is active it doesn't consume
>>>> messages, which is good. But if I produce against the Slave it
>>>> accepts messages, it doesn't rely them to the consumers but it does
>>>> accepts them.
>>>>
>>>> The problem with this is if there were a network problem and a
>>>> producer connects to a Slave while the master is active, while the
>>>> failover transport has some properties such as maxReconnectAttempts,
>>>> maxReconnectDelay, etc. they seem to have effect if both Master and
>>>> Slave fail (I'm referring to a Pure Master-Slave conf). Any ideas?
>>>>
>>>> Thx,
>>>> Eric
>>> That's odd - a Salve doesn't start its transport connectors until the
>>> master dies
>> 
>> With a 'shared' master/slave configuration, the slave runs as documented
>> (i.e., keeps its transports closed while connected to the master).
>> However,
>> in a 'pure' master/slave configuration, the slave opens its transports
>> and
>> accepts connection requests while connected to the master. See the
>> following
>> JIRA.
>> 
>> https://issues.apache.org/activemq/browse/AMQ-1511
>>  
>> Joe
>> 
>>>
>>>
>>>
>>> cheers,
>>>
>>> Rob
>>>
>>> http://open.iona.com/ -Enterprise Open Integration
>>> http://rajdavies.blogspot.com/
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16025545.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Eric Rodriguez <to...@gmail.com>.
This seems to be exactly the problem. I will try the shared master/slave 
configuration but is this bug fixable and if so when will a fix be ready?

Thanks,
Eric

Joe Fernandez wrote:
> 
> 
>> -----Original Message-----
>> From: Rob Davies [mailto:rajdavies@gmail.com]
>> Sent: Tuesday, March 11, 2008 4:21 PM
>> To: users@activemq.apache.org
>> Subject: Re: Consumers not always being released
>>
>>
>> On 11 Mar 2008, at 19:55, Eric Rodriguez wrote:
>>
>>>
>>> Mike Miljour wrote:
>>>> After further investigation, it turns out there was a configuration
>>>> issue,
>>>> which could have been avoided with clearer documentation. (it might
>>>> have
>>>> helped if i had included my configuration as well!)  We had set the
>>>> value
>>>> for broker name differently in our two running instances of
>>>> ActiveMQ.  Doing
>>>> this caused the ActiveMQs to act as though they were load balancing
>>>> instead
>>>> of acting as Master and slave (which was our intent).  Suggested
>>>> documentation changes:In the schema reference for brokerName,
>>>> change the description from: Sets the name of this broker; which
>>>> must be
>>>> unique in the network
>>>> to:
>>>> Sets the name of this broker; which must be unique in the network,
>>>> except
>>>> for master-slave configurations, where it must be the same
>>>> Also, in the master slave shared file system documentation, include
>>>> a note
>>>> stating that the WebConsole will not load for the slave until it
>>>> becomes the
>>>> master if the setup is done correctly.  Also mention that the value
>>>> for
>>>> brokerName must be the same for the master and all slaves.
>>> What does "if the setup is done correctly" means? Documentation
>>> states:
>>>
>>> "Whilst a Slave is actively connected to the Master - it does not
>>> allow or start any network or transport connectors, it's sole
>>> purpose is to duplicate the state of the master."
>>>
>>> I am using the same name on both master and slave, if I try to
>>> consume from the slave while the master is active it doesn't consume
>>> messages, which is good. But if I produce against the Slave it
>>> accepts messages, it doesn't rely them to the consumers but it does
>>> accepts them.
>>>
>>> The problem with this is if there were a network problem and a
>>> producer connects to a Slave while the master is active, while the
>>> failover transport has some properties such as maxReconnectAttempts,
>>> maxReconnectDelay, etc. they seem to have effect if both Master and
>>> Slave fail (I'm referring to a Pure Master-Slave conf). Any ideas?
>>>
>>> Thx,
>>> Eric
>> That's odd - a Salve doesn't start its transport connectors until the
>> master dies
> 
> With a 'shared' master/slave configuration, the slave runs as documented
> (i.e., keeps its transports closed while connected to the master). However,
> in a 'pure' master/slave configuration, the slave opens its transports and
> accepts connection requests while connected to the master. See the following
> JIRA.
> 
> https://issues.apache.org/activemq/browse/AMQ-1511
>  
> Joe
> 
>>
>>
>>
>> cheers,
>>
>> Rob
>>
>> http://open.iona.com/ -Enterprise Open Integration
>> http://rajdavies.blogspot.com/
>>
> 
> 

RE: Consumers not always being released

Posted by Joe Fernandez <jo...@ttmsolutions.com>.


> -----Original Message-----
> From: Rob Davies [mailto:rajdavies@gmail.com]
> Sent: Tuesday, March 11, 2008 4:21 PM
> To: users@activemq.apache.org
> Subject: Re: Consumers not always being released
> 
> 
> On 11 Mar 2008, at 19:55, Eric Rodriguez wrote:
> 
> >
> >
> > Mike Miljour wrote:
> >> After further investigation, it turns out there was a configuration
> >> issue,
> >> which could have been avoided with clearer documentation. (it might
> >> have
> >> helped if i had included my configuration as well!)  We had set the
> >> value
> >> for broker name differently in our two running instances of
> >> ActiveMQ.  Doing
> >> this caused the ActiveMQs to act as though they were load balancing
> >> instead
> >> of acting as Master and slave (which was our intent).  Suggested
> >> documentation changes:In the schema reference for brokerName,
> >> change the description from: Sets the name of this broker; which
> >> must be
> >> unique in the network
> >> to:
> >> Sets the name of this broker; which must be unique in the network,
> >> except
> >> for master-slave configurations, where it must be the same
> >> Also, in the master slave shared file system documentation, include
> >> a note
> >> stating that the WebConsole will not load for the slave until it
> >> becomes the
> >> master if the setup is done correctly.  Also mention that the value
> >> for
> >> brokerName must be the same for the master and all slaves.
> > What does "if the setup is done correctly" means? Documentation
> > states:
> >
> > "Whilst a Slave is actively connected to the Master - it does not
> > allow or start any network or transport connectors, it's sole
> > purpose is to duplicate the state of the master."
> >
> > I am using the same name on both master and slave, if I try to
> > consume from the slave while the master is active it doesn't consume
> > messages, which is good. But if I produce against the Slave it
> > accepts messages, it doesn't rely them to the consumers but it does
> > accepts them.
> >
> > The problem with this is if there were a network problem and a
> > producer connects to a Slave while the master is active, while the
> > failover transport has some properties such as maxReconnectAttempts,
> > maxReconnectDelay, etc. they seem to have effect if both Master and
> > Slave fail (I'm referring to a Pure Master-Slave conf). Any ideas?
> >
> > Thx,
> > Eric
> That's odd - a Salve doesn't start its transport connectors until the
> master dies

With a 'shared' master/slave configuration, the slave runs as documented
(i.e., keeps its transports closed while connected to the master). However,
in a 'pure' master/slave configuration, the slave opens its transports and
accepts connection requests while connected to the master. See the following
JIRA.

https://issues.apache.org/activemq/browse/AMQ-1511
 
Joe

> 
> 
> 
> 
> cheers,
> 
> Rob
> 
> http://open.iona.com/ -Enterprise Open Integration
> http://rajdavies.blogspot.com/
> 



Re: Consumers not always being released

Posted by Rob Davies <ra...@gmail.com>.
On 11 Mar 2008, at 19:55, Eric Rodriguez wrote:

>
>
> Mike Miljour wrote:
>> After further investigation, it turns out there was a configuration  
>> issue,
>> which could have been avoided with clearer documentation. (it might  
>> have
>> helped if i had included my configuration as well!)  We had set the  
>> value
>> for broker name differently in our two running instances of  
>> ActiveMQ.  Doing
>> this caused the ActiveMQs to act as though they were load balancing  
>> instead
>> of acting as Master and slave (which was our intent).  Suggested  
>> documentation changes:In the schema reference for brokerName,
>> change the description from: Sets the name of this broker; which  
>> must be
>> unique in the network
>> to:
>> Sets the name of this broker; which must be unique in the network,  
>> except
>> for master-slave configurations, where it must be the same
>> Also, in the master slave shared file system documentation, include  
>> a note
>> stating that the WebConsole will not load for the slave until it  
>> becomes the
>> master if the setup is done correctly.  Also mention that the value  
>> for
>> brokerName must be the same for the master and all slaves.
> What does "if the setup is done correctly" means? Documentation  
> states:
>
> "Whilst a Slave is actively connected to the Master - it does not  
> allow or start any network or transport connectors, it's sole  
> purpose is to duplicate the state of the master."
>
> I am using the same name on both master and slave, if I try to  
> consume from the slave while the master is active it doesn't consume  
> messages, which is good. But if I produce against the Slave it  
> accepts messages, it doesn't rely them to the consumers but it does  
> accepts them.
>
> The problem with this is if there were a network problem and a  
> producer connects to a Slave while the master is active, while the  
> failover transport has some properties such as maxReconnectAttempts,  
> maxReconnectDelay, etc. they seem to have effect if both Master and  
> Slave fail (I'm referring to a Pure Master-Slave conf). Any ideas?
>
> Thx,
> Eric
That's odd - a Salve doesn't start its transport connectors until the  
master dies




cheers,

Rob

http://open.iona.com/ -Enterprise Open Integration
http://rajdavies.blogspot.com/




Re: Consumers not always being released

Posted by Eric Rodriguez <to...@gmail.com>.

Mike Miljour wrote:
> After further investigation, it turns out there was a configuration issue,
> which could have been avoided with clearer documentation. (it might have
> helped if i had included my configuration as well!)  We had set the value
> for broker name differently in our two running instances of ActiveMQ.  Doing
> this caused the ActiveMQs to act as though they were load balancing instead
> of acting as Master and slave (which was our intent).  
> 
> Suggested documentation changes:In the schema reference for brokerName,
> change the description from: Sets the name of this broker; which must be
> unique in the network
> to:
> Sets the name of this broker; which must be unique in the network, except
> for master-slave configurations, where it must be the same
> 
> Also, in the master slave shared file system documentation, include a note
> stating that the WebConsole will not load for the slave until it becomes the
> master if the setup is done correctly.  Also mention that the value for
> brokerName must be the same for the master and all slaves.
> 
What does "if the setup is done correctly" means? Documentation states:

"Whilst a Slave is actively connected to the Master - it does not allow 
or start any network or transport connectors, it's sole purpose is to 
duplicate the state of the master."

I am using the same name on both master and slave, if I try to consume 
from the slave while the master is active it doesn't consume messages, 
which is good. But if I produce against the Slave it accepts messages, 
it doesn't rely them to the consumers but it does accepts them.

The problem with this is if there were a network problem and a producer 
connects to a Slave while the master is active, while the failover 
transport has some properties such as maxReconnectAttempts, 
maxReconnectDelay, etc. they seem to have effect if both Master and 
Slave fail (I'm referring to a Pure Master-Slave conf). Any ideas?

Thx,
Eric

Re: Consumers not always being released

Posted by Ramit Arora <ra...@gmail.com>.
Yeah, I guess doing it the way the website recommends is the correct method
to configure Master/Slave.

Thanks,
Ramit

Mike Miljour wrote:
> 
> I just checked our logs, and I am seeing the same message about the Master
> not being able to connect to the slave.  I will be removing the Network of
> Brokers setting form our config.  We are using queues, not topics.
> Thanks for pointing out the Network of Brokers issue!  I forgot to check
> the logs after we got things working again.
> Mike M
> 
> Ramit Arora wrote:
>> 
>> Hi Mike,
>> Thanks for the reply. I think I understand the way you have set it up
>> now, but doesn't the slave just sit waiting for the lock to be released?
>> As its connectors are not yet started, the store & forward network can't
>> be established. My master keeps complaining that it can't connect to the
>> slave. Can someone from the development team please confirm how shared
>> file system needs to be set up?
>> Anyways, can you please check whether the following test case works on
>> your snapshot (the one you are using is no longer in the repo):
>> 1. Create a producer sending persistent messages to a topic.
>> 2. Create a non-durable topic subscriber.
>> 3. Kill the master when the publisher has sent 100 messages & the
>> subscriber has received 50 messages.
>> 4. Try to receive the remaining 50 messages from the slave.
>> 
>> In my case, step 4 doesn't work. But according to the JMS spec, it
>> should.
>> 
>> Many thanks,
>> Ramit 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16330165.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Mike Miljour <mm...@idanalytics.com>.
I just checked our logs, and I am seeing the same message about the Master
not being able to connect to the slave.  I will be removing the Network of
Brokers setting form our config.  We are using queues, not topics.
Thanks for pointing out the Network of Brokers issue!  I forgot to check the
logs after we got things working again.
Mike M

Ramit Arora wrote:
> 
> Hi Mike,
> Thanks for the reply. I think I understand the way you have set it up now,
> but doesn't the slave just sit waiting for the lock to be released? As its
> connectors are not yet started, the store & forward network can't be
> established. My master keeps complaining that it can't connect to the
> slave. Can someone from the development team please confirm how shared
> file system needs to be set up?
> Anyways, can you please check whether the following test case works on
> your snapshot (the one you are using is no longer in the repo):
> 1. Create a producer sending persistent messages to a topic.
> 2. Create a non-durable topic subscriber.
> 3. Kill the master when the publisher has sent 100 messages & the
> subscriber has received 50 messages.
> 4. Try to receive the remaining 50 messages from the slave.
> 
> In my case, step 4 doesn't work. But according to the JMS spec, it should.
> 
> Many thanks,
> Ramit 
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16330162.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Ramit Arora <ra...@gmail.com>.
Hi Mike,
Thanks for the reply. I think I understand the way you have set it up now,
but doesn't the slave just sit waiting for the lock to be released? As its
connectors are not yet started, the store & forward network can't be
established. My master keeps complaining that it can't connect to the slave.
Can someone from the development team please confirm how shared file system
needs to be set up?
Anyways, can you please check whether the following test case works on your
snapshot (the one you are using is no longer in the repo):
1. Create a producer sending persistent messages to a topic.
2. Create a non-durable topic subscriber.
3. Kill the master when the publisher has sent 100 messages & the subscriber
has received 50 messages.
4. Try to receive the remaining 50 messages from the slave.

In my case, step 4 doesn't work. But according to the JMS spec, it should.

Many thanks,
Ramit 


Mike Miljour wrote:
> 
> Yes, the /data is my shared directory.  Persistence can be set up either
> way according to the config examples I have seen.
> 
> I used the network of brokers to keep the slaves up to date when I was
> originally having problems with the behavior of the slaves.  I am not sure
> if having this configured is still useful, but we do not lose messages
> when the Master goes down.  I will try removing this and see if I
> encounter any problem.  Can anyone else answer if using Network of Brokers
> is useful in the Master/Slave topology?
> 
> 
> Ramit Arora wrote:
>> 
>> Hi Mike,
>> Thanks for your time. I am a bit confused here. The config that you have
>> sent me seems to be of a broker network rather than a Master/Slave
>> topology. Shouldn't we be setting the shared datastore like this:
>> <persistenceAdapter>
>>       <amqPersistenceAdapter directory="/shared/activemq/datastore" />
>> </persistenceAdapter> 
>> 
>> Is /data in your config the shared directory? 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16329387.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Mike Miljour <mm...@idanalytics.com>.
Yes, the /data is my shared directory.  Persistence can be set up either way
according to the config examples I have seen.

I used the network of brokers to keep the slaves up to date when I was
originally having problems with the behavior of the slaves.  I am not sure
if having this configured is still useful, but we do not lose messages when
the Master goes down.  I will try removing this and see if I encounter any
problem.  Can anyone else answer if using Network of Brokers is useful in
the Master/Slave topology?


Ramit Arora wrote:
> 
> Hi Mike,
> Thanks for your time. I am a bit confused here. The config that you have
> sent me seems to be of a broker network rather than a Master/Slave
> topology. Shouldn't we be setting the shared datastore like this:
> <persistenceAdapter>
>       <amqPersistenceAdapter directory="/shared/activemq/datastore" />
> </persistenceAdapter> 
> 
> Is /data in your config the shared directory? 
> 
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16329247.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Ramit Arora <ra...@gmail.com>.
Hi Mike,
Thanks for your time. I am a bit confused here. The config that you have
sent me seeems to be of a broker network rather than a Master/Slave
topology. Shouldn't we be setting the shared datastore like this:
<persistenceAdapter>
      <amqPersistenceAdapter directory="/shared/activemq/datastore" />
</persistenceAdapter> 

Is /data in your config the shared directory? 

Thanks,
Ramit 	



Mike Miljour wrote:
> 
> Shared File System Master Slave does work for us.  I have attached a
> sample of our config for one of the brokers below.
> 
>  <broker xmlns="http://activemq.org/config/1.0"
> deleteAllMessagesOnStartup="true" dataDirectory="/data" persistent="true">
> 
>     <transportConnectors>
>        <transportConnector name="openwire"
> uri="tcp://host1:61616?wireFormat.maxInactivityDuration=0"/>
>     </transportConnectors>
> 
>     <!-- The store and forward broker networks ActiveMQ will listen to -->
>     <networkConnectors>
>       <!-- Change this to include the URIs for each JMS server.  Do not
> use a space around the comma or bad things will happen! -->
>       <networkConnector name="HA Queue"
> uri="static:(tcp://host1:61616,tcp://host2:61616)" />
>     </networkConnectors>
>  </broker>
> 
> i hope this helps,
> Mike M
> 
> 
> Ramit Arora wrote:
>> 
>> Hi,
>> I am facing a problem setting up shared file system master slave on the
>> latest 5.1 snapshot. The problems are mentioned in this thread 
>> http://www.nabble.com/Shared-Filesystem-Master-Slave-doesn%27t-work-even-on-5.1-SNAPSHOT-td16315761s2354.html
>> 
>> Is master/slave working fine for you? Would you mind sharing your broker
>> configs with me? Setting the same name for the two brokers does not seem
>> to help in my case. 
>> 
>> Thanks,
>> Ramit
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16323396.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Mike Miljour <mm...@idanalytics.com>.
Shared File System Master Slave does work for us.  I have attached a sample
of our config for one of the brokers below.

 <broker xmlns="http://activemq.org/config/1.0"
deleteAllMessagesOnStartup="true" dataDirectory="/data" persistent="true">

    <transportConnectors>
       <transportConnector name="openwire"
uri="tcp://host1:61616?wireFormat.maxInactivityDuration=0"/>
    </transportConnectors>

    <!-- The store and forward broker networks ActiveMQ will listen to -->
    <networkConnectors>
      <!-- Change this to include the URIs for each JMS server.  Do not use
a space around the comma or bad things will happen! -->
      <networkConnector name="HA Queue"
uri="static:(tcp://host1:61616,tcp://host2:61616)" />
    </networkConnectors>
 </broker>

i hope this helps,
Mike M


Ramit Arora wrote:
> 
> Hi,
> I am facing a problem setting up shared file system master slave on the
> latest 5.1 snapshot. The problems are mentioned in this thread 
> http://www.nabble.com/Shared-Filesystem-Master-Slave-doesn%27t-work-even-on-5.1-SNAPSHOT-td16315761s2354.html
> 
> Is master/slave working fine for you? Would you mind sharing your broker
> configs with me? Setting the same name for the two brokers does not seem
> to help in my case. 
> 
> Thanks,
> Ramit
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16320142.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Ramit Arora <ra...@gmail.com>.
Hi,
I am facing a problem setting up shared file system master slave on the
latest 5.1 snapshot. The problems are mentioned in this thread 
http://www.nabble.com/Shared-Filesystem-Master-Slave-doesn%27t-work-even-on-5.1-SNAPSHOT-td16315761s2354.html

Is master/slave working fine for you? Would you mind sharing your broker
configs with me? Setting the same name for the two brokers does not seem to
help in my case. 

Thanks,
Ramit

Mike Miljour wrote:
> 
> After further investigation, it turns out there was a configuration issue,
> which could have been avoided with clearer documentation. (it might have
> helped if i had included my configuration as well!)  We had set the value
> for broker name differently in our two running instances of ActiveMQ. 
> Doing this caused the ActiveMQs to act as though they were load balancing
> instead of acting as Master and slave (which was our intent).  
> 
> Suggested documentation changes:In the schema reference for brokerName,
> change the description from: Sets the name of this broker; which must be
> unique in the network
> to:
> Sets the name of this broker; which must be unique in the network, except
> for master-slave configurations, where it must be the same
> 
> Also, in the master slave shared file system documentation, include a note
> stating that the WebConsole will not load for the slave until it becomes
> the master if the setup is done correctly.  Also mention that the value
> for brokerName must be the same for the master and all slaves.
> 
> We are not sure why we would sometimes have 3 consumers in one queue in
> one instance of AMQ and one in the same queue of the other instance of AMQ
> (there should have been 2 in each).  With the correct master-slave setup
> now, we no longer have a problem.
> 
> Mike M
> 
> 

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p16318588.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Consumers not always being released

Posted by Mike Miljour <mm...@idanalytics.com>.
After further investigation, it turns out there was a configuration issue,
which could have been avoided with clearer documentation. (it might have
helped if i had included my configuration as well!)  We had set the value
for broker name differently in our two running instances of ActiveMQ.  Doing
this caused the ActiveMQs to act as though they were load balancing instead
of acting as Master and slave (which was our intent).  

Suggested documentation changes:In the schema reference for brokerName,
change the description from: Sets the name of this broker; which must be
unique in the network
to:
Sets the name of this broker; which must be unique in the network, except
for master-slave configurations, where it must be the same

Also, in the master slave shared file system documentation, include a note
stating that the WebConsole will not load for the slave until it becomes the
master if the setup is done correctly.  Also mention that the value for
brokerName must be the same for the master and all slaves.

We are not sure why we would sometimes have 3 consumers in one queue in one
instance of AMQ and one in the same queue of the other instance of AMQ
(there should have been 2 in each).  With the correct master-slave setup
now, we no longer have a problem.

Mike M

-- 
View this message in context: http://www.nabble.com/Consumers-not-always-being-released-tp15818936s2354p15963463.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.