Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-10

NPE from JMX infrastructure in curator-test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-incubating
    • 2.1.0-incubating
    • General
    • None

    Description

      QuorumPeer.java contains this:

      finally

      { MBeanRegistry.getInstance().unregisterAll(); }

      Since MBeanRegistry is static, this unregisters all MBeans from ALL QuorumPeers in a TestingCluster.

      This causes:

      [ERROR] NIOServerCnxnFactory - Thread Thread[QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:41733,5,main] died <java.lang.AssertionError>java.lang.AssertionError
      at org.apache.zookeeper.jmx.MBeanRegistry.register(MBeanRegistry.java:89)
      at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:771)
      at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:912)

      and similar when connecting a new client to a server after killing another in a test suite.

      Looking for a workaround, but bringing this to your attention early.

      Note: Code against ZK 3.5.x library, although that unregisterAll() call seems to predate that by a long way, so this is presumably valid throughout?

      Attachments

        Activity

          People

            randgalt Jordan Zimmerman
            arren Shevek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: