You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Mançaux Pierre-Alexandre (JIRA)" <ji...@apache.org> on 2017/01/05 14:18:58 UTC

[jira] [Updated] (AMQ-6553) ReplicatedLevelDB with Zookeeper : ActiveMQ Broker Stop when leader stop

     [ https://issues.apache.org/jira/browse/AMQ-6553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mançaux Pierre-Alexandre updated AMQ-6553:
------------------------------------------
    Description: 
hello,

I m using replicatedLevelDB to use zookeeper and clustering activemq broker.

all work fine when all is started.

here is my configuration

3 servicemix 
each servicemix have a bundle zookeeper 3.4.6 and a bundle zookeeper-server (my code to start zookeeper server)
each servicemix have is own activemq broker

Firslty, i start all my zookeeper-server bundle, and all work fine, i do 

echo stat | nc localhost 2181
echo stat | nc localhost 2182
echo stat | nc localhost 2183

and i have 1 Leader and 2 Followers.

After i configure each activemq broker with :

<persistenceAdapter>
        <replicatedLevelDB
            directory="${data}"
            replicas="3"
            bind="tcp://0.0.0.0:61622"
            zkAddress="localhost:2181,localhost:2182,localhost:2183"
            zkPassword="password"
            zkPath="/activemq/leveldb-stores"
            hostname="[I PUT MY IP BUT HIDE IN THIS JIRA]"
            />
        </persistenceAdapter>

the only thing that change is the bind parameter with different port.

I start all my broker and all work fine, if i launch the karaf command bstat on my servicemix, i can see my queue/topic on 1 broker, and the 2 others just show me 

smx@zookeeper2> bstat
Uptime = 46 minutes

if i stop the master broker, zookeeper elect another one to be the master and it works.

but if i stop my zookeepr Leader, master broker is stop and another one is up, but when i say broker is stop, bstat don't show me anything anymore on this instance.

so i have loose 1 broker and it can't be elected anymore.

here is the log i see: 

2017-01-05 11:22:46,415 | WARN  | spatch-DEFAULT-2 | MasterLevelDBStore               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Unexpected session error: java.io.IOException: Connection reset by peer
2017-01-05 11:22:46,429 | ERROR | meSize=104857600 | TransportConnector               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Could not accept connection : java.lang.InterruptedException
2017-01-05 11:22:46,461 | WARN  | spatch-DEFAULT-3 | MasterLevelDBStore               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Unexpected session error: java.io.IOException: Connection reset by peer

my question is :

why, when i stop the zookeeper leader, the master broker is killed?
why, in this case, we don't wait a little that another zookeeper become the leader and don't stop the master broker, but just reinitialize the connection to the new zookeeper master?

or 

when, in this case, if its necessary to stop the broker and let zookeeper reelect a new one, why the broker is kill and cannot be reelect by zookeeper anymore? does it possible to let it up to be reelected?

possibly i miss something in the configuration that can prevent this problem, but if not, how can i solve my problem?

thanks

  was:
hello,

I m using replicatedLevelDB to use zookeeper and clustering activemq broker.

all work fine when all is started.

here is my configuration

3 servicemix 
each servicemix have a bundle zookeeper 3.4.6 and a bundle zookeeper-server (my code to start zookeeper)
each servicemix have is own activemq broker

Firslty, i start all my zookeeper-server bundle, and all work fine, i do 

echo stat | nc localhost 2181
echo stat | nc localhost 2182
echo stat | nc localhost 2183

and i have 1 Leader and 2 Follower.

After i configure each activemq broker with :

<persistenceAdapter>
        <replicatedLevelDB
            directory="${data}"
            replicas="3"
            bind="tcp://0.0.0.0:61622"
            zkAddress="localhost:2181,localhost:2182,localhost:2183"
            zkPassword="password"
            zkPath="/activemq/leveldb-stores"
            hostname="[I PUT MY IP BUT HIDE IN THIS JIRA]"
            />
        </persistenceAdapter>

the only thing that change is the bind parameter with different port.

I start all my broker and all work fine, if i launch the karaf command bstat on my servicemix, i can see my queue/topic on 1 broker, and the 2 others just show me 

smx@zookeeper2> bstat
Uptime = 46 minutes

if i stop the master broker, zookeeper elect another one to be the master and it works.

but if i stop my zookeepr Leader, master broker is stop and another one is up, but when i say broker is stop, bstat don't show me anything anymore on this instance.

so i have loose 1 broker and it can't be elected anymore.

here is the log i see: 

2017-01-05 11:22:46,415 | WARN  | spatch-DEFAULT-2 | MasterLevelDBStore               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Unexpected session error: java.io.IOException: Connection reset by peer
2017-01-05 11:22:46,429 | ERROR | meSize=104857600 | TransportConnector               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Could not accept connection : java.lang.InterruptedException
2017-01-05 11:22:46,461 | WARN  | spatch-DEFAULT-3 | MasterLevelDBStore               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Unexpected session error: java.io.IOException: Connection reset by peer

my question is :

why, when i stop the zookeeper leader, the master broker is killed?
why, in this case, we don't wait a little that another zookeeper become the leader and don't stop the master broker, but just reinitialize the connection to the new zookeeper master?

or 

when, in this case, if its necessary to stop the broker and let zookeeper reelect a new one, why the broker is kill and cannot be reelect by zookeeper anymore? does it possible to let it up to be reelected?

possibly i miss something in the configuration that can prevent this problem, but if not, how can i solve my problem?

thanks


> ReplicatedLevelDB with Zookeeper : ActiveMQ Broker Stop when leader stop
> ------------------------------------------------------------------------
>
>                 Key: AMQ-6553
>                 URL: https://issues.apache.org/jira/browse/AMQ-6553
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, OSGi/Karaf, Transport
>    Affects Versions: 5.12.1
>         Environment: Servicemix 5.5.2
> Activemq-osgi 5.12.1
>            Reporter: Mançaux Pierre-Alexandre
>
> hello,
> I m using replicatedLevelDB to use zookeeper and clustering activemq broker.
> all work fine when all is started.
> here is my configuration
> 3 servicemix 
> each servicemix have a bundle zookeeper 3.4.6 and a bundle zookeeper-server (my code to start zookeeper server)
> each servicemix have is own activemq broker
> Firslty, i start all my zookeeper-server bundle, and all work fine, i do 
> echo stat | nc localhost 2181
> echo stat | nc localhost 2182
> echo stat | nc localhost 2183
> and i have 1 Leader and 2 Followers.
> After i configure each activemq broker with :
> <persistenceAdapter>
>         <replicatedLevelDB
>             directory="${data}"
>             replicas="3"
>             bind="tcp://0.0.0.0:61622"
>             zkAddress="localhost:2181,localhost:2182,localhost:2183"
>             zkPassword="password"
>             zkPath="/activemq/leveldb-stores"
>             hostname="[I PUT MY IP BUT HIDE IN THIS JIRA]"
>             />
>         </persistenceAdapter>
> the only thing that change is the bind parameter with different port.
> I start all my broker and all work fine, if i launch the karaf command bstat on my servicemix, i can see my queue/topic on 1 broker, and the 2 others just show me 
> smx@zookeeper2> bstat
> Uptime = 46 minutes
> if i stop the master broker, zookeeper elect another one to be the master and it works.
> but if i stop my zookeepr Leader, master broker is stop and another one is up, but when i say broker is stop, bstat don't show me anything anymore on this instance.
> so i have loose 1 broker and it can't be elected anymore.
> here is the log i see: 
> 2017-01-05 11:22:46,415 | WARN  | spatch-DEFAULT-2 | MasterLevelDBStore               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Unexpected session error: java.io.IOException: Connection reset by peer
> 2017-01-05 11:22:46,429 | ERROR | meSize=104857600 | TransportConnector               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Could not accept connection : java.lang.InterruptedException
> 2017-01-05 11:22:46,461 | WARN  | spatch-DEFAULT-3 | MasterLevelDBStore               | 96 - org.apache.activemq.activemq-osgi - 5.12.1 | Unexpected session error: java.io.IOException: Connection reset by peer
> my question is :
> why, when i stop the zookeeper leader, the master broker is killed?
> why, in this case, we don't wait a little that another zookeeper become the leader and don't stop the master broker, but just reinitialize the connection to the new zookeeper master?
> or 
> when, in this case, if its necessary to stop the broker and let zookeeper reelect a new one, why the broker is kill and cannot be reelect by zookeeper anymore? does it possible to let it up to be reelected?
> possibly i miss something in the configuration that can prevent this problem, but if not, how can i solve my problem?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)