how can I get all the mbeans about weblogic?

1.2k Views Asked by At

When I use jconsole to access weblogic's mbean,I just can get some info about jvm like 'java.lang'.But what I want to get is about 'jdbc','jta','ejb','servlet'...

I wonder if I can get these indicators through service:jmx:rmi:///jndi/rmi://10.0.99.102:7997/jmxrmi with username and password.I think it's very likely that my configuration has errors, but I don't know where the problem is.

Then I tried another way.I enabled iiop, but I can't access it via iiop. I met some errors like Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException. Try to figure this error,I add wljarbulder.jar to my project,then another error comes out,'Unhandled exception in lookup,Caused by: javax.naming.NamingException Unhandled exception in lookup [Root exception is org.omg.CORBA.NO_PERMISSION...'.

All I need is to get the mbean information for weblogic, I am trying to monitor weblogic via jmx. (I have collected weblogic's snmp oid, but it is not enough to complete my monitoring plan)

Thank you.

2

There are 2 best solutions below

0
trgbishi On BEST ANSWER

Actually,I figure out the problem. It seems that the iiop default username and password must be set the same as weblogic Admin. I don't understand why for this,but when I read one blog and try,then I get the data.

I'm not sure that I can get all the mbean data through this,but it connects successful at least and show a lot of data.

I should have used jconsole to find the value I want now.emmm,but I cannot connect by jconsole.But this is the next question.

2
Emmanuel Collin On

First add these parameters to your WebLogic Server instance :

  • -Dcom.sun.management.jmxremote
    -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
    -Dcom.sun.management.jmxremote.port=6789
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false

Second, launch jconsole :

jconsole.exe -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%WL_HOME%\server\lib\weblogic.jar;%JAVA_HOME%\lib\tools.jar

and connect to port 6789