Search code examples
weblogic-10.xjmc

How to monitor WebLogic using Java Mission Control?


I'd like to monitor performance on a web app we have hosted on WebLogic 10.3.6 using Java Mission Control. I am closely following the procedure discussed in a Java One 2013 talk on Java Mission Control.

When I try to Start Flight Recording, I get an error message:

enter image description here

As far as I can tell, I've set up the right Java command line arguments, etc. My Java is:

java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

I start up WebLogic as follows:

C:\dev\dev-tools\Glassfish\jdk7\bin\java
-client
-Xms512m
-Xmx1024m
-XX:CompileThreshold=8000
-XX:PermSize=512m
-XX:MaxPermSize=512m
-Dweblogic.Name=AdminServer
-Djava.security.policy=C:\dev\servers\Oracle\WLS_10~1.6\WLSERV~1.3\server\lib\weblogic.policy
-Djava.net.preferIPv4Stack=true
-Xms2048m
-Xmx4096m
-XX:CompileThreshold=8000
-XX:PermSize=1024m
-XX:MaxPermSize=1536m
-verbose:gc
-XX:+PrintGCTimeStamps
-XX:+PrintGCDetails
-Xloggc:C:/Temp/gcsVBMS.txt
-XX:+PrintTenuringDistribution
-XX:-HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=c:\Temp\dump.hprof
    -XX:+UnlockCommercialFeatures
    -XX:+FlightRecorder
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false
-Xverify:none
-da
-Djavax.net.ssl.keyStore=XXX
-Djavax.net.ssl.keyStorePassword=jvmpassword
-Djavax.net.ssl.trustStore=XXX
-Djavax.net.ssl.keyStore=XXX
-Djavax.net.ssl.keyStorePassword=jvmpassword
-Djavax.net.ssl.trustStore=XXX
-Dplatform.home=C:\dev\servers\Oracle\WLS_10~1.6\WLSERV~1.3
-Dwls.home=C:\dev\servers\Oracle\WLS_10~1.6\WLSERV~1.3\server
-Dweblogic.home=C:\dev\servers\Oracle\WLS_10~1.6\WLSERV~1.3\server
-Dweblogic.management.discover=true
-Dwlw.iterativeDev=
-Dwlw.testConsole=
-Dwlw.logErrorsToConsole=
-Dweblogic.ext.dirs=C:\dev\servers\Oracle\WLS_10~1.6\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\dev\servers\Oracle\WLS_10~1.6\patch_ocp371\profiles\default\sysext_manifest_classpath
weblogic.Server

I thought that jmc should be able to auto-connect to the discovered JVM, given that I've provided the recommended Java arguments (indented above). What do I need to do to get this to work?


Solution

  • Hopefully you have already got an answer for this somewhere else, but if not:

    If I would guess, the issue is related somehow to the network config of your machine, you could try adding -Djava.rmi.server.hostname=localhost or -Djava.rmi.server.hostname=

    You could also add -Dcom.sun.management.jmxremote.port=

    and create a custom connection to localhost: or :

    // Klara, Java Mission Control Dev