Problem with JConsole

Discussion in 'Java' started by Anirudh, Apr 24, 2006.

  1. Anirudh

    Anirudh Guest

    hi,
    i am running a jar using
    java -Dcom.sun.management.jmxremote -jar start.jar

    i then run Jconsole and it doesnt recognize this process. I also tried
    to run jconsole with the pid and this is the error i got

    Exception in thread "main" java.lang.Exception: Could not open
    PerfMemory
    at sun.misc.Perf.attach(Native Method)
    at sun.misc.Perf.attachImpl(Perf.java:253)
    at sun.misc.Perf.attach(Perf.java:183)
    at
    sun.management.ConnectorAddressLink.importFrom(ConnectorAddressLink.java:66)
    at sun.tools.jconsole.JConsole.main(JConsole.java:779)

    Could anyone help me with this and let me know what i can do run
    jconsole properly.

    Thanks,
    Anirudh
    Anirudh, Apr 24, 2006
    #1
    1. Advertising

  2. Anirudh

    Guest

    I've got the same problem on running the JMX example software under
    Windows XP. What o/s are you using?

    I ran the sample application with the required -D option.

    Running jconsole with no parameters does not then list any JMX Agents
    that it connect to, which I expected it should do.

    Using jps from the command lists the relevant process id.

    Running jconsole with the pid gives the Exception and stack trace you
    have listed.


    Documentation indicates that JMX will not work if the Windows disk is
    formatted as a FAT32 volume, but mine is NTFS.

    Tried stopping the firewall and that appears to make no difference, so
    it does not look like a network port issue.

    Any further information available?

    Regards,
    John Rutter
    , Apr 26, 2006
    #2
    1. Advertising

  3. Anirudh

    Rut the Nut Guest

    Following on from earlier comments, I've just tried the same software
    on another machine and got better results.

    Once the main Java process is started, and goes into wait state, using
    the 'jps' command to list current Java processes lists the process id
    and also the main class name being executed.

    Using jconsole with the pid on this machine works fine.

    On the machine where jconsole cannot connect, the output indicates the
    process id(s) but, except for jps itself, the output indicates
    -- process information unavailable

    Presumably this is the same problem seen by jconsole.

    No help as to why I am getting that at present, but potentially closer
    to finding a solution.

    Regards,
    John
    Rut the Nut, Apr 26, 2006
    #3
  4. Anirudh

    Rut the Nut Guest

    Rut the Nut, Apr 26, 2006
    #4
  5. Anirudh

    Rut the Nut Guest

    The standalone machine on which the JMX software ran successfully had
    local security, not part of a Windoze domain, whereas the original
    machine (a laptop) was part of a Windoze security domain but not
    directly connected to that network at the time.

    With the machine physically on the domain network, the software runs
    correctly.

    So it looks as though there are security issues whereby cached
    credentials do not apply :(

    That's probably all I'm going to do as far as investigating the
    problem, but it will be a real nuisance if I am unable to run the
    software on a disconnected laptop for demo purposes.

    Perhaps it would work if I logged-in to the machine using local admin
    credentials rather than my off-line user account...

    Regards,
    John
    Rut the Nut, Apr 27, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter

    embed jconsole

    Peter, Mar 16, 2005, in forum: Java
    Replies:
    0
    Views:
    729
    Peter
    Mar 16, 2005
  2. John
    Replies:
    0
    Views:
    654
  3. Zsolt Koppany
    Replies:
    0
    Views:
    4,092
    Zsolt Koppany
    Nov 9, 2005
  4. Zsolt Koppany
    Replies:
    1
    Views:
    1,515
    Andrew Thompson
    Nov 10, 2005
  5. Frank D. Greco

    Jconsole with different PLAF?

    Frank D. Greco, Dec 21, 2005, in forum: Java
    Replies:
    1
    Views:
    602
    Thomas Hawtin
    Dec 22, 2005
Loading...

Share This Page