JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-489  -  JPPFDriverAdminMBean.nbNodes() returns incorrect value when management is disabled on one or more nodes
Posted Feb 09, 2017 - updated Feb 11, 2017
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Management / Monitoring
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Always
  • Severity
    Normal
  • Targetted for
    icon_milestones.png JPPF 5.2.5
Issue description
When management is dsabed on one or more nodes attached to a server, the server's management API will return an incorrect number of nodes: it reports the number of node with a valid management connection instead of all nodes. This is true for all nbIdleNodes() and nbNodes() of the JPPFDriverAdminMBean interface

I've located the problem in the class NodeSelectionHelper, where the selection/filtering methods have a hasWorkingJmxConnection() condition, which is obviously false when management is disabled on an node. This class was first designed as a helper for the node management forwarding feature, then reused for the driver management methods that count nodes, but I forgot to take into account that nodes can have management disabled.
Steps to reproduce this issue
Setup:
  • one driver
  • one node with "jppf.management.disabled = false"
To reproduce run this code:
JMXDriverConnectionWrapper jmx = new JMXDriverConnectionWrapper("localhost", 11198, false);
jmx.connectAndWait(5000L);
System.out.println("nbNodes: " + jmx.nbNodes());
==> this will report 0 nodes instead of 1

#4
Comment posted by
 lolo4j
Feb 11, 08:31
Fixed in: