Thursday, July 16, 2009

JConsole JMX to Weblogic

Hello,

We found a workaround that doesn't need to compile and run a proxy.

Just set JAVA_HOME and BEA_HOME and run:

RedHat
jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar:/usr/bea40/wlserver_10.3/server/lib/wljmxclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote

Windows
jconsole -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%BEA_HOME%\wlserver_10.3\server\lib\wljmxclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote


Connection string:
service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.domainruntime



----------------------------------------


1. After having the same issue, it turned out that it is just a CLASSPATH issue when using jConsole from the latest SUN JVM:

a) Working for connect string starting with 'service:jmx:rmi:///jndi/iiop://...' only.
set JAVA_HOME=D:\SUN_jdk1.6.0_13
set PATH=%JAVA_HOME%\bin;%PATH%
jconsole -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%bea_home%\wlserver_10.3\server\lib\wljmxclient.jar

b) Working for connect string starting with 'service:jmx:rmi:///jndi/iiop://...' and 'service:jmx:iiop:///jndi/iiop://...' .

set JAVA_HOME=D:\SUN_jdk1.6.0_13
set PATH=%JAVA_HOME%\bin;%PATH%
jconsole -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%bea_home%\wlserver_10.3\server\lib\weblogic.jar

NOTE: The RMI or IIOP in the connect string!

c) I tried the following URLs that worked fine:

* service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.runtime

* service:jmx:iiop:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.runtime

* service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.domainruntime

* service:jmx:iiop:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.domainruntime

2. In addition, the parameter -J-Djmx.remote.proto.provider.pkgs=weblogic.management.remote can be set if the current version of the JVM has any issue:

jconsole -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%bea_home%\wlserver_10.3\server\lib\wljmxclient.jar -J-Djmx.remote.proto.provider.pkgs=weblogic.management.remote

I hope this helps a bit!

No comments: