This discussion is archived
4 Replies Latest reply: Mar 7, 2013 2:01 AM by 991074 RSS

Unable to start JRockit Mission Control Memory Leak Detector

773949 Newbie
Currently Being Moderated
Hi, I've configured JRockit mission control by giving the below options in the startup.

export JAVA_OPTIONS="$JAVA_OPTIONS -Xbootclasspath/a:/usr/appl/w003/weblogic/config-agent.jar -Xmanagement:class=com.bea.misc.ConfigurableJMXAgent -Dconfig.registry.host=`hostname` -Dconfig.registry.port=40037 -Dconfig.rmi.host=`hostname` -Dconfig.rmi.port=40036"

I'm successfully able to connect to the WLS instance from Mission Control. And start console works I'm able to see the running graphs.

How ever, StartMemLeak is not work. I'm getting below error.

Could not open Memory Leak Detector for wls-iaj11l-w003-1.appzone.wpc.ntrs.com:40037.
javax.management.RuntimeMBeanException: java.lang.RuntimeException: Not a directory
javax.management.RuntimeMBeanException: java.lang.RuntimeException: Not a directory
     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:856)
     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:869)
     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:838)
     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
     at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
     at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
     at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
     at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
     at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
     at sun.rmi.transport.Transport$1.run(Transport.java:159)
     at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:619)
     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
     at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
     at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
     at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993)
     at com.jrockit.mc.rjmx.proxy.internal.AbstractProxyOperations.invokeMethodWithException(AbstractProxyOperations.java:121)
     at com.jrockit.mc.rjmx.proxy.internal.AbstractProxyOperations.invokeMethodWithException(AbstractProxyOperations.java:144)
     at com.jrockit.mc.rjmx.proxy.internal.JMXR27Operations.startMemleakServer(JMXR27Operations.java:346)
     at com.jrockit.mc.rjmx.proxy.internal.AbstractProxyOperations.startMemleakServer(AbstractProxyOperations.java:427)
     at com.jrockit.mc.memleak.ui.RjmxMemleakEditorInput.connect(Unknown Source)
     at com.jrockit.mc.memleak.ui.actions.StartMemleak$1.preConnect(Unknown Source)
     at com.jrockit.mc.browser.utils.PreConnectJob.run(PreConnectJob.java:74)
     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.RuntimeException: Not a directory
     at com.bea.jvm.DiagnosticCommand.execute(DiagnosticCommand.java:245)
     at com.bea.jvm.DiagnosticCommand.execute(DiagnosticCommand.java:261)
     at com.bea.jvm.DiagnosticCommand$Command.execute(DiagnosticCommand.java:357)
     at bea.jrockit.management.MemLeak.startServer(MemLeak.java:91)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
     at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
     at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
     at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
     at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
     at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
     at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
     at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
     at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
     at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
     at sun.rmi.transport.Transport$1.run(Transport.java:159)
     at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:619)


Please adivse ASAP. Thanks in advance..
  • 1. Re: Unable to start JRockit Mission Control Memory Leak Detector
    706153 Newbie
    Currently Being Moderated
    This error does not seem to be Memleak specific, since Memleak itself doesn't access any file system. What happens if you run jrcmd on your WLS instance?

    That is, on the machine running WLS, are there any errors displayed when you run any of the following?
    jrcmd <pid> help
    jrcmd <pid> print_threads
    jrcmd <pid> memleakserver

    (Where <pid> is the process ID of the JRockit process running WLS. If you don't know it, you may run jrcmd without parameters to list all running JVMs with their process IDs. And "jrcmd" should be in the <JDK>/bin directory.)

    If the last command line succeds, it should display something like "Memleak started at port 7095.". If so, you may connect to that Memleak server directly using JRockit Mission Control by adding a connection with a custom service URL like "service:jmx:mlp://localhost:7095/" (adapting host and port as needed). You may only connect once for each start of the Memleak server.

    /Markus
  • 2. Re: Unable to start JRockit Mission Control Memory Leak Detector
    773949 Newbie
    Currently Being Moderated
    I'm able to run the 3 commands successfully. By the way, I have firewall running in front of my server. So, I'm using a custom RMI configuration.

    /usr/appl/w003/home/uatw003 $ jrcmd 28309 memleakserver
    28309:
    Memleak started at port 7095.

    [uatw003@ut81366] /usr/appl/w003/home/uatw003 $

    By the way, I'm getting the same error "Runtime Exception: Not a directory" even while executing threadDump command in WLST on this server.

    I'm wondering if these both are related somehow.
  • 3. Re: Unable to start JRockit Mission Control Memory Leak Detector
    706153 Newbie
    Currently Being Moderated
    Good.

    Then I would guess that the "Not a directory" error is due to your custom RMI configuration or the com.bea.misc.ConfigurableJMXAgent. It's not something I'm familiar with, but I'm guessing someone on the WLS team might be.

    Anyway, it doesn't really matter that much if all you want to do now is to run the JRMC Memory Leak Detector. To elaborate on the workaround I mentioned in my previous post, you could do as follows to bypass RMI and JMX completely:

    1. In the JRMC JVM Browser, create a new connection. In the dialog, select custom JMX service URL, and write "service:jmx:mlp://localhost:7095/".
    2. Create a tunnel, perhaps using SSH, through your firewall so that port 7095 on your machine (running JRMC) listens for incoming connections and tunnel them to your WLS server on port 7095. (You may change port and host as needed, as long as the service URL in the connection is changed accordingly. You could even open a port in the firewall and connect directly, depending how secure you'd want it to be.)
    3. On the WLS server, run the "jrcmd <pid> memleakserver" command.
    4. In JRMC, use the connection created in step 1 to "Start Memleak".
    5. When done with the Memleak session, close the connection in JRMC.

    Repeat steps 3-5 as needed.

    /Markus
  • 4. Re: Unable to start JRockit Mission Control Memory Leak Detector
    991074 Newbie
    Currently Being Moderated
    Thanks a lot

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points