You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by César Álvarez Núñez <ce...@gmail.com> on 2011/10/03 17:06:45 UTC

Wrong call to MBeanRegistry.unregisterAll() at QuorumPeer.run()?

Hi all,

I'm playing with "org.apache.zookeeper.test.QuorumUtil" in order to validate
disconnected/expired logic from my Zookeeper clients but I've found the
following problem:

QuorumUtil qU = new QuorumUtil(1); // Creates a 3 servers ensemble.
qU.startAll(); // Startup the 3 servers.
qU.shutdown(firstFollower);
qU.shutdown(secondFollower);
qU.restart(firstFollower); // It throws an Assertion Error.

The problem is that an AssertionError is thrown at MBeanRegistry:89 (public
void register(ZKMBeanInfo bean, ZKMBeanInfo parent)) which is catched
internally.
I'm not really sure where the problem is, but I think that invocation to
method "MBeanRegistry.getInstance().unregisterAll();" in finally clause at
QuoumPeer.run() method is not 100% right. At least in this use case where
there are 3 QuormPeer instances running on the same JVM.

In fact, after commenting that line server restarting works fine.

I'm not pretty sure if it is a bug or I'm making an improper use of
QuorumUtil.

Any help?
/César.

Re: Wrong call to MBeanRegistry.unregisterAll() at QuorumPeer.run()?

Posted by César Álvarez Núñez <ce...@gmail.com>.
Hi Mahadev,
I've created the following ticket:
https://issues.apache.org/jira/browse/ZOOKEEPER-1214
/César.

On Wed, Oct 5, 2011 at 8:25 PM, Mahadev Konar <ma...@hortonworks.com>wrote:

> Cesar,
>  Did you take a look at the tests that are using QuorumUtil?
> QuorumTest.java uses it. Want to check it out? Might be of some help!
>
> mahadev
>
> 2011/10/3 César Álvarez Núñez <ce...@gmail.com>:
> > Hi all,
> >
> > I'm playing with "org.apache.zookeeper.test.QuorumUtil" in order to
> validate
> > disconnected/expired logic from my Zookeeper clients but I've found the
> > following problem:
> >
> > QuorumUtil qU = new QuorumUtil(1); // Creates a 3 servers ensemble.
> > qU.startAll(); // Startup the 3 servers.
> > qU.shutdown(firstFollower);
> > qU.shutdown(secondFollower);
> > qU.restart(firstFollower); // It throws an Assertion Error.
> >
> > The problem is that an AssertionError is thrown at MBeanRegistry:89
> (public
> > void register(ZKMBeanInfo bean, ZKMBeanInfo parent)) which is catched
> > internally.
> > I'm not really sure where the problem is, but I think that invocation to
> > method "MBeanRegistry.getInstance().unregisterAll();" in finally clause
> at
> > QuoumPeer.run() method is not 100% right. At least in this use case where
> > there are 3 QuormPeer instances running on the same JVM.
> >
> > In fact, after commenting that line server restarting works fine.
> >
> > I'm not pretty sure if it is a bug or I'm making an improper use of
> > QuorumUtil.
> >
> > Any help?
> > /César.
> >
>

Re: Wrong call to MBeanRegistry.unregisterAll() at QuorumPeer.run()?

Posted by Mahadev Konar <ma...@hortonworks.com>.
Cesar,
 Did you take a look at the tests that are using QuorumUtil?
QuorumTest.java uses it. Want to check it out? Might be of some help!

mahadev

2011/10/3 César Álvarez Núñez <ce...@gmail.com>:
> Hi all,
>
> I'm playing with "org.apache.zookeeper.test.QuorumUtil" in order to validate
> disconnected/expired logic from my Zookeeper clients but I've found the
> following problem:
>
> QuorumUtil qU = new QuorumUtil(1); // Creates a 3 servers ensemble.
> qU.startAll(); // Startup the 3 servers.
> qU.shutdown(firstFollower);
> qU.shutdown(secondFollower);
> qU.restart(firstFollower); // It throws an Assertion Error.
>
> The problem is that an AssertionError is thrown at MBeanRegistry:89 (public
> void register(ZKMBeanInfo bean, ZKMBeanInfo parent)) which is catched
> internally.
> I'm not really sure where the problem is, but I think that invocation to
> method "MBeanRegistry.getInstance().unregisterAll();" in finally clause at
> QuoumPeer.run() method is not 100% right. At least in this use case where
> there are 3 QuormPeer instances running on the same JVM.
>
> In fact, after commenting that line server restarting works fine.
>
> I'm not pretty sure if it is a bug or I'm making an improper use of
> QuorumUtil.
>
> Any help?
> /César.
>