Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
5.12.1
-
None
-
None
-
Servicemix 5.5.2
Activemq-osgi 5.12.1
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