[CONTROLLER-1835] ShardStatsMXBean is not a valid JMX MXBean, due to isActive in FollowerInfo Created: 08/Jun/18  Updated: 08/Jun/18  Resolved: 08/Jun/18

Status: Resolved
Project: controller
Component/s: None
Affects Version/s: None
Fix Version/s: Fluorine, Oxygen SR3

Type: Bug Priority: Medium
Reporter: Michael Vorburger Assignee: Michael Vorburger
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GENIUS-138 Improve Datastore Cluster diagstatus ... Resolved

 Description   

While working on GENIUS-138, and trying to programmatically access the org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardStatsMXBean, I've run into this obscure internal Java JMX problem, somehow it's not happy:

2018-06-08T15:19:38,504 | ERROR | pipe-diagstatus:showSvcStatus | DatastoreServiceStatusProvider   | 269 - org.opendaylight.genius.mdsalutil-impl - 0.5.0.SNAPSHOT | Unable to obtain the datastore status
java.lang.IllegalArgumentException: Cannot make MXBean proxy for org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardStatsMXBean: java.io.InvalidObjectException: @ConstructorProperties includes name isActive which does not correspond t
o a property: public org.opendaylight.controller.cluster.raft.client.messages.FollowerInfo(java.lang.String,long,long,boolean,java.lang.String,boolean)
        at com.sun.jmx.mbeanserver.ConvertingMethod.checkCallToOpen(ConvertingMethod.java:110) ~[?:?]
        at com.sun.jmx.mbeanserver.MXBeanProxy$Visitor.visitAttribute(MXBeanProxy.java:69) ~[?:?]
        at com.sun.jmx.mbeanserver.MXBeanProxy$Visitor.visitAttribute(MXBeanProxy.java:63) ~[?:?]
        at com.sun.jmx.mbeanserver.MBeanAnalyzer.visit(MBeanAnalyzer.java:68) ~[?:?]
        at com.sun.jmx.mbeanserver.MXBeanProxy.<init>(MXBeanProxy.java:60) ~[?:?]
        at javax.management.MBeanServerInvocationHandler.findMXBeanProxy(MBeanServerInvocationHandler.java:329) [?:?]
        at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:257) [?:?]
        at com.sun.proxy.$Proxy121.getRaftState(Unknown Source) [238:org.opendaylight.controller.sal-distributed-datastore:1.8.0.SNAPSHOT]
        at org.opendaylight.genius.mdsalutil.diagstatus.internal.DatastoreServiceStatusProvider.getServiceDescriptor(DatastoreServiceStatusProvider.java:89) [269:org.opendaylight.genius.mdsalutil-impl:0.5.0.SNAPSHOT]
        at Proxy07f8416e_a9cc_446d_a969_8d6bd755a3cf.getServiceDescriptor(Unknown Source) [?:?]
        at Proxya1570310_6cef_4b38_9f78_f015bdbdeecf.getServiceDescriptor(Unknown Source) [?:?]
        at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceImpl.updateServiceStatusMap(DiagStatusServiceImpl.java:142) [283:org.opendaylight.infrautils.diagstatus-impl:1.4.0.SNAPSHOT]
        at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceImpl.getAllServiceDescriptors(DiagStatusServiceImpl.java:88) [283:org.opendaylight.infrautils.diagstatus-impl:1.4.0.SNAPSHOT]
        at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceImpl.isOperational(DiagStatusServiceImpl.java:97) [283:org.opendaylight.infrautils.diagstatus-impl:1.4.0.SNAPSHOT]
        at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceMBeanImpl.acquireServiceStatusDetailed(DiagStatusServiceMBeanImpl.java:120) [283:org.opendaylight.infrautils.diagstatus-impl:1.4.0.SNAPSHOT]
        at Proxy56729cd8_0640_4be6_ac4b_b529beff2369.acquireServiceStatusDetailed(Unknown Source) [?:?]
        at org.opendaylight.infrautils.diagstatus.shell.DiagStatusCommand.getLocalStatusSummary(DiagStatusCommand.java:77) [284:org.opendaylight.infrautils.diagstatus-shell:1.4.0.SNAPSHOT]
        at org.opendaylight.infrautils.diagstatus.shell.DiagStatusCommand.execute(DiagStatusCommand.java:56) [284:org.opendaylight.infrautils.diagstatus-shell:1.4.0.SNAPSHOT]
        at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) [49:org.apache.karaf.shell.core:4.1.5]

I'll try to figure out what it takes to make it happy...

tpantelis FYI. Also skitt FYI thought this may interest you.



 Comments   
Comment by Michael Vorburger [ 08/Jun/18 ]

There are actually 2 problems in FollowerInfo, also: 

karaf@root()> feature:install odl-genius-rest
karaf@root()> diagstatus:showSvcStatus
Timestamp: Fri Jun 08 15:35:43 CEST 2018
Node IP Address: 127.0.0.1
System is operational: false
System ready state: BOOTING
 OPENFLOW : ERROR 
 IFM : OPERATIONAL 
 ITM : OPERATIONAL 
 DATASTORE : ERROR java.lang.IllegalArgumentException: Cannot make MXBean proxy for org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardStatsMXBean: java.io.InvalidObjectException: @ConstructorProperties includes name isVoting which does not correspond to a property: public org.opendaylight.controller.cluster.raft.client.messages.FollowerInfo(java.lang.String,long,long,boolean,java.lang.String,boolean)
Generated at Wed Feb 07 19:56:34 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.