11 Replies Latest reply on Apr 27, 2009 2:39 PM by 791266

    Cannot see local process list in JConsole of JDK6

    843798
      When I run JConsole (JDK6)without parameters I cannot see list of local proceseses. JConsole with PID as a parameter works well. JConsole of JDK5 works ok. Does anybody help me?
        • 1. Re: Cannot see local process list in JConsole of JDK6
          843798
          Hi,

          Do you have an NTFS file system?
          Can you see the processes using 'jps'?

          You may also want to read:
          http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
          although I fear this article has not much to offer for the specific problem you
          describe.

          -- daniel
          JMX, SNMP, Java, etc...
          http://blogs.sun.com/jmxetc
          • 2. Re: Cannot see local process list in JConsole of JDK6
            843798
            Yes I have NTFS. I cannot see any process by 'jps'.
            Thanks. mifeld53
            • 3. Re: Cannot see local process list in JConsole of JDK6
              843798
              Hi Michael,

              Do you mind cd'ing to the directory that TMP is defined as and see if there is a directory named hsperfdata_<user> where <user> is your login. That is the directory where the instrumentation buffers are mapped (as shared memory files). Each time a java process starts it should create a file in that directory. The file name is the pid and that is how jps and the other jvmstat tools get the process list. If you don't see any pid-like files in the directory then it might be a permission problem. Can you try to create a file in the directory? If you get an "access denied" error then that would explain the issue. If you don't get an error then it would be interesting to see the cacls.exe output on the directory - that's the Windows command line tool to print the ACL on the directory.

              A workaround might be to create a new temporary directory and just update the TMP variable in your environment (Control Panel -> System -> Advanced -> Environment Variables).

              Regards,
              Luis-Miguel Alventosa
              Java SE JMX/JConsole development team
              Sun Microsystems, Inc.
              • 4. Re: Cannot see local process list in JConsole of JDK6
                843798
                You are right. I recreated the directory and now it works ok. Thank you
                • 5. Re: Cannot see local process list in JConsole of JDK6
                  843798
                  Great help!

                  Somehow Vista had created the directory hsperfdata_Myname with only permissions for SYSTEM (!?). So I could not create files there and the directory was always empty. Even stranger, I could not change any security setting, although I am an administrator!

                  Fortunately, I could remove the directory and create a new one with the same name. And now it works!!
                  • 6. Re: Cannot see local process list in JConsole of JDK6
                    843798
                    Hello Luis-Miguel Alventosa,

                    i run into an other showstopper.

                    I start with a service wrapper a tomcat instance on a win 2000 server.
                    I start this service via a terminal session. But now the problem is that jsp or visual vm don't see this process.

                    After some time i recognize that the service create the temp file in the temp dir from the settings, but jps use
                    a subdirectiry with nummer from the terminal session as temp dir.

                    this means temp=d:\temp
                    the service create the dir d:\temp\hsperfdata_Administrator

                    But with my terminal session I work with follow dir:

                    d:\temp\{color:#ff0000}1{color}\hsperfdata_Administrator

                    When I set the temp (in my termin session) to d:\temp I can see the processes but I don't have enough rights.
                    When I go to the server all works like expect. Now I install vnc:-)

                    I hope with this comment I can help other run into the same problem.

                    regards Dietmar
                    • 7. Re: Cannot see local process list in JConsole of JDK6
                      843798
                      Hi, I have the same problem. I have recreated the tmp folder last time I used jconsole/jvisualvm, but now the issue is back.. Do I have to recreate c:\tmp after each restart?
                      cacls c:\tmp
                      c:\tmp <domain>\<user>:(OI)(CI)F
                      
                      cacls c:\tmp\hsperfdata_*
                      c:\tmp\hsperfdata_<user> <domain>\<user>:(OI)(CI)F
                      Is there another workaround? It would be preferable to avoid recreating the tmp folder each time windows restart..


                      Regards,
                      Petter
                      • 8. Re: Cannot see local process list in JConsole of JDK6
                        843798
                        Hi Windows lovers :)

                        I just got out of trouble hunting things with the hints providen in this topic.

                        My problem was a little bit different : I could see processes PID but could not connect to them (nor see the Main class)

                        The source of the problem ? : hsperfdata was named "hsperfdata_Username" where my login is "username".
                        After closing all VM I deleted the dir and re-launched java new dir was created with the good name "hsperfdata_username" and everything went OK.

                        Hope this can help someone.

                        Thanks

                        Thomas
                        • 9. Re: Cannot see local process list in JConsole of JDK6
                          843798
                          Hi Thomas,

                          thanks a lot, you saved my day.

                          More or less the same problem, a user renamed himself just case-wise, and I didn't know that.

                          Patric
                          • 10. Re: Cannot see local process list in JConsole of JDK6
                            843798
                            I had the same problem when the JVMs were having different TMP directory set because one was started through cygwin.
                            • 11. Re: Cannot see local process list in JConsole of JDK6
                              791266
                              I'm locking this resurrected thread.

                              Kaj