Executing an MBean

classic Classic list List threaded Threaded
1 message Options
srand06 srand06
Reply | Threaded
Open this post in threaded view
|

Executing an MBean

Hey guys,

I'm using a pure python Jolokia client and get an error when I try to execute an MBean. It seems to be a parameter issue and I'd like to know if someone can give me some clues on how to fix it. As you can see in the stack below I'm trying to execute the operation takeSnapshot  of the MBean org.apache.cassandra.db:type=StorageService. That one needs a tag, a map of options and a list of objects. That's what I think I pass it but I get :

{'request': {'mbean': 'org.apache.cassandra.db:type=StorageService', 'arguments': ['tag1', {}, ['system.batches']], 'type': 'exec', 'operation': 'takeSnapshot'}, 
'stacktrace': 'java.lang.IllegalArgumentException: Operation takeSnapshot on MBean org.apache.cassandra.db:type=StorageService is overloaded. 
Signatures found: (java.lang.String, [Ljava.lang.String;),(java.lang.String,java.util.Map,[Ljava.lang.String;). Use a signature when specifying the 
operation.\n\tat org.jolokia.handler.ExecHandler.extractOperationTypes(ExecHandler.java:139)\n\tat 

org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:84)\n\tat org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40)\n\tat 
org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89)\n\tat org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109)\n\tat 
org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161)\n\tat 
org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99)\n\tat org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:413)\n\tat 
org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)\n\tat org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)\n\tat 
org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137)\n\tat org.jolokia.jvmagent.handler.JolokiaHttpHandler.executePostRequest(JolokiaHttpHandler.java:279)\n\tat
 org.jolokia.jvmagent.handler.JolokiaHttpHandler.doHandle(JolokiaHttpHandler.java:233)\n\tat org.jolokia.jvmagent.handler.JolokiaHttpHandler.handle(JolokiaHttpHandler.java:178)\n\tat 
com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)\n\tat sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)\n\tat com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)\n
\tat sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)\n\tat com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)\n\tat 
sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat 
java.lang.Thread.run(Thread.java:748)\n', 'error_type': 'java.lang.IllegalArgumentException', 'error': 'java.lang.IllegalArgumentException : 
Operation takeSnapshot on MBean org.apache.cassandra.db:type=StorageService is overloaded. Signatures found:
 (java.lang.String,[Ljava.lang.String;),(java.lang.String,java.util.Map,[Ljava.lang.String;). Use a signature when specifying the operation.', 'status': 400}

FYI, I use https://github.com/cwood/pyjolokia

Thank you for your help