You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by santonel <st...@tin.it> on 2013/07/02 09:42:37 UTC

Activemq 5.9 leveldb replication problem

I'm trying to setup a replicated LevelDB Store (following the instruction on
http://activemq.apache.org/replicated-leveldb-store.html).
The version i'm using of activemq is 5.9 snapshot (20130609.215120-72).

I've setup 3 zookeeper servers and 4 activemq servers (3 replica nodes so
that I can take one down without suffering a service outage) using the
following configuration for each one (all broker have the same name):

        <persistenceAdapter>
            <replicatedLevelDB
                  directory="${activemq.data}"
                  replicas="3"	  
		  hostname="192.168.56.110"     //192.168.56.111, 192.168.56.112,
192.168.56.113
                  bind="tcp://0.0.0.0:61619" 
                 
zkAddress="192.168.56.102:2181,192.168.56.103:2181,192.168.56.104:2181"
		  zkPath="/activemq/leveldb-stores"
	    />
        </persistenceAdapter>
		
The server run smooth, if I take down the master one replica will come up,
so far, so good.

The problem arise when I create a queue and put some messages in the server.
The data will not propagate to the slaves, so if I take down (activemq stop
using wrapper) the server
where i have created the queue and the messages, one slave come up but
without the master queue/messages.

I've also try the same configuration, with the options "sync" with value
quorum_disk, to be sure that any changes will be written in local disk and
remote disk,
but no lucky.

I'm wrong with some configuration? I can't figure it out, any help will be
appreciated.

Thanks!

--Stefano




--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-9-leveldb-replication-problem-tp4668775.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq 5.9 leveldb replication problem

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Hi Stefano, the replica number should be set to the total number nodes
you will be running.  Ideally you should use an odd number nodes.  For
example 3, 5, or 7.  If you use 3 nodes to can take 1 nodes down
without an outage.  If your running 5 nodes nodes, then you can take
down 2 nodes without outage and so on.

Also note that only persistent messages will be replicated.
Non-persistent messages will be lost upon a broker node failure.  How
are you sending messages to the broker?

On Tue, Jul 2, 2013 at 3:42 AM, santonel <st...@tin.it> wrote:
> I'm trying to setup a replicated LevelDB Store (following the instruction on
> http://activemq.apache.org/replicated-leveldb-store.html).
> The version i'm using of activemq is 5.9 snapshot (20130609.215120-72).
>
> I've setup 3 zookeeper servers and 4 activemq servers (3 replica nodes so
> that I can take one down without suffering a service outage) using the
> following configuration for each one (all broker have the same name):
>
>         <persistenceAdapter>
>             <replicatedLevelDB
>                   directory="${activemq.data}"
>                   replicas="3"
>                   hostname="192.168.56.110"     //192.168.56.111, 192.168.56.112,
> 192.168.56.113
>                   bind="tcp://0.0.0.0:61619"
>
> zkAddress="192.168.56.102:2181,192.168.56.103:2181,192.168.56.104:2181"
>                   zkPath="/activemq/leveldb-stores"
>             />
>         </persistenceAdapter>
>
> The server run smooth, if I take down the master one replica will come up,
> so far, so good.
>
> The problem arise when I create a queue and put some messages in the server.
> The data will not propagate to the slaves, so if I take down (activemq stop
> using wrapper) the server
> where i have created the queue and the messages, one slave come up but
> without the master queue/messages.
>
> I've also try the same configuration, with the options "sync" with value
> quorum_disk, to be sure that any changes will be written in local disk and
> remote disk,
> but no lucky.
>
> I'm wrong with some configuration? I can't figure it out, any help will be
> appreciated.
>
> Thanks!
>
> --Stefano
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-9-leveldb-replication-problem-tp4668775.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Hiram Chirino

Engineering | Red Hat, Inc.

hchirino@redhat.com | fusesource.com | redhat.com

skype: hiramchirino | twitter: @hiramchirino

blog: Hiram Chirino's Bit Mojo

Re: Activemq 5.9 leveldb replication problem

Posted by santonel <st...@tin.it>.
Hiram and Christian, thanks for the replies and suggestions.

The messages that not get persisted was my fault, because the producer was
sending a non persistent messages. 
I've corrected that behaviour and now the replication works perfectly. 

I've also setup the total number of nodes as an odd number (3).

--Stefano



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-9-leveldb-replication-problem-tp4668775p4668830.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq 5.9 leveldb replication problem

Posted by Christian Posta <ch...@gmail.com>.
Stefano,

I just tried to reproduce the issue you describe, and cannot. Persistent
messages get replicated correctly.




On Tue, Jul 2, 2013 at 3:42 AM, santonel <st...@tin.it> wrote:

> I'm trying to setup a replicated LevelDB Store (following the instruction
> on
> http://activemq.apache.org/replicated-leveldb-store.html).
> The version i'm using of activemq is 5.9 snapshot (20130609.215120-72).
>
> I've setup 3 zookeeper servers and 4 activemq servers (3 replica nodes so
> that I can take one down without suffering a service outage) using the
> following configuration for each one (all broker have the same name):
>
>         <persistenceAdapter>
>             <replicatedLevelDB
>                   directory="${activemq.data}"
>                   replicas="3"
>                   hostname="192.168.56.110"     //192.168.56.111,
> 192.168.56.112,
> 192.168.56.113
>                   bind="tcp://0.0.0.0:61619"
>
> zkAddress="192.168.56.102:2181,192.168.56.103:2181,192.168.56.104:2181"
>                   zkPath="/activemq/leveldb-stores"
>             />
>         </persistenceAdapter>
>
> The server run smooth, if I take down the master one replica will come up,
> so far, so good.
>
> The problem arise when I create a queue and put some messages in the
> server.
> The data will not propagate to the slaves, so if I take down (activemq stop
> using wrapper) the server
> where i have created the queue and the messages, one slave come up but
> without the master queue/messages.
>
> I've also try the same configuration, with the options "sync" with value
> quorum_disk, to be sure that any changes will be written in local disk and
> remote disk,
> but no lucky.
>
> I'm wrong with some configuration? I can't figure it out, any help will be
> appreciated.
>
> Thanks!
>
> --Stefano
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Activemq-5-9-leveldb-replication-problem-tp4668775.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta