Bug 1193276 - NumberFormatException in clustered Attributes(definedCacheNames, members and version)
Summary: NumberFormatException in clustered Attributes(definedCacheNames, members and ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Server
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 6.5.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-17 03:22 UTC by ksuzumur
Modified: 2019-03-22 07:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-09 06:19:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description ksuzumur 2015-02-17 03:22:28 UTC
Description of problem:
The following attributes are "Unavailable" status in JConsole.
- definedCacheNames 
- members
- version

Version-Release number of selected component (if applicable):
JBoss Data Grid
- 6.4.0

How reproducible:
Check the attribute with JConsole

Steps to Reproduce:
1. start clustered.sh
2. ./bin/jconsole.sh with "service:jmx:remoting-jmx://<host>:9999"
3. Check Mbeans Tab -> jboss.as -> infinispan -> clustered -> Attributes

The following attributes are "Unavailable" status
- definedCacheNames 
- members
- version

Additionally, you can check the following WARN log in server.log

11:42:27,223 WARN  [org.jboss.remotingjmx.protocol.v2.ServerCommon] (pool-2-thread-1) Unexpected internal error: java.lang.NumberFormatException: For input string: "[localhost/clustered]"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) [rt.jar:1.8.0_31]                              
        at java.lang.Integer.parseInt(Integer.java:580) [rt.jar:1.8.0_31]                                                               
        at java.lang.Integer.parseInt(Integer.java:615) [rt.jar:1.8.0_31]                                                               
        at org.jboss.dmr.StringModelValue.asInt(StringModelValue.java:139) [jboss-dmr-1.2.0.Final-redhat-1.jar:1.2.0.Final-redhat-1]    
        at org.jboss.dmr.ModelNode.asInt(ModelNode.java:240) [jboss-dmr-1.2.0.Final-redhat-1.jar:1.2.0.Final-redhat-1]                  
        at org.jboss.as.jmx.model.TypeConverters$IntegerValueAccessor.fromModelNode(TypeConverters.java:778)                            
        at org.jboss.as.jmx.model.TypeConverters$SimpleTypeConverter.fromModelNode(TypeConverters.java:223)                             
        at org.jboss.as.jmx.model.TypeConverters.fromModelNode(TypeConverters.java:114)                                                 
        at org.jboss.as.jmx.model.ModelControllerMBeanHelper.getAttribute(ModelControllerMBeanHelper.java:245)                          
        at org.jboss.as.jmx.model.ModelControllerMBeanHelper.getAttribute(ModelControllerMBeanHelper.java:200)                          
        at org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.getAttribute(ModelControllerMBeanServerPlugin.java:96)               
        at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:383)                                    
        at org.jboss.remotingjmx.protocol.v2.ServerProxy$GetAttributeHandler.handle(ServerProxy.java:691)                               
        at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)                                
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)                                
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)                                
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_31]                                                 
        at javax.security.auth.Subject.doAs(Subject.java:422) [rt.jar:1.8.0_31]                                                         
        at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94) [jboss-as-controller-7.4.2.Final-redhat-2.jar:7.4.2.Final-redhat-2]
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70)                          
        at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)                                  
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]                            
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]                            
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31



Expected results:
We can check the attributes.

Additional info:

Comment 2 Martin Gencur 2015-03-12 09:35:50 UTC
Can't reproduce the bug. 

When I start JDG 6.4, the relevant MBean has address jboss.infinispan:type=CacheManager,name="clustered",component=CacheManager and I can normally see all the statistics mentioned above: definedCacheNames, clusterMembers, version

Statistics under jboss.as domain are EAP specific. The correct statistics for JDG are under jboss.infinispan domain by default.
I can't find infinispan MBean under jboss.as domain.

Comment 4 Osamu Nagano 2015-03-13 04:45:37 UTC
Have you used a remote connection, "service:jmx:remoting-jmx://<host>:9999"?  This is not reproducible if a local connection is used.

I changed the component from Infinispan to Server.  It seems definedCacheNames, members, and version have a wrong type.

Comment 5 Martin Gencur 2015-03-13 11:49:10 UTC
OK. When remote connection is used, "infinispan" suddenly appears under "jboss.as" domain and there I get the exception you described.

Anyway, the correct domain is "jboss.infinispan" where this works correctly, without any exception being thrown.

Comment 7 Martin Gencur 2015-04-09 06:19:54 UTC
Created https://bugzilla.redhat.com/show_bug.cgi?id=1210176 for the removal of redundant Infinispan MBeans. Closing this one as this is not a bug.

Comment 8 Osamu Nagano 2015-04-10 02:55:35 UTC
Some attributes found in MBean A are not available in MBean B.

A. "jboss.as:subsystem=infinispan,cache-container=clustered"
B. "jboss.infinispan:type=CacheManager,name="clustered",component=CacheManager"

For example "isCoordinator" will be lost and this is acutually used in the customer code.  Can you add this into MBean B?


Note You need to log in before you can comment on or make changes to this bug.