java agentless - 404 on sub directory Mbeans

classic Classic list List threaded Threaded
3 messages Options
emmanuel gouraud emmanuel gouraud
Reply | Threaded
Open this post in threaded view
|

java agentless - 404 on sub directory Mbeans

Hi there,

and really thanks for this great tool :)

I'm trying to use jolokia+chek_jmx4perl to read mbeans on solr5 (jetty), jolokia is running as proxy, and when i try to read mbeans with type and name (memorypool,garbagecollector) i always encounter a 404 error.
[root@localhost jmx4perl-1.12]# check_jmx4perl --url "http://127.0.0.1:8778/jolokia/" --name memory_used --value "java.lang:name=Metaspace,type=MemoryPool/Usage/used" --target "service:jmx:rmi:///jndi/rmi://localhost:18080/jmxrmi"
UNKNOWN - Error: 404 javax.management.InstanceNotFoundException : java.lang:name=Metaspace,type=MemoryPool

 Whereas reading java.lang:type=memory/HeapMemoryUsage is OK
[root@localhost jmx4perl-1.12]# check_jmx4perl --url "http://127.0.0.1:8778/jolokia/" --name memory_used --value "java.lang:type=Memory/HeapMemoryUsage/used" --target "service:jmx:rmi:///jndi/rmi://localhost:18080/jmxrmi"
OK - memory_used : Value 4880536 in range | memory_used=4880536;;

do you have any clue about what i am doing wrong?

thanks for our help ;)
emmanuel gouraud emmanuel gouraud
Reply | Threaded
Open this post in threaded view
|

Re: java agentless - 404 on sub directory Mbeans

i reply to myself,

it seems that i need to start the agent with a jdk1.6 and solr5 is running with jdk1.8, and when i query the jolokia agent (with the target configured) on type=MemoryPool,*, it appears that i can query a Perm Gen Mbean, which does not exist on java 8.

So my 404 error seems to come from the 1.6 agent which does not recognize the metaspace mbean

I continue trying to others mbeans to validate this hypothesis.

I also tried to run the agent with jdk1.8 but it doesn't seem to work.

cheers
roland roland
Reply | Threaded
Open this post in threaded view
|

Re: java agentless - 404 on sub directory Mbeans

Sorry for the late reply. Yes, you are right, Metaspace is a Java 8 concept and not available in previous JDKs.

Jolokia works with Java 1.8 so there should be no problem to use it with JDK 1.8. Which version are you using ?

Could you describe your issue over there at Github ? https://github.com/rhuss/jolokia/issues 

thanks ...
... roland
... roland