VisualVM
  1. VisualVM
  2. VISUALVM-537

JVisualVM is unable to connect to a service using the "--openpid [PID]" commandline arg.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: 1.3.2
    • Fix Version/s: None
    • Component/s: code
    • Labels:
      None
    • Environment:

      Win7

      Description

      I have an application that is running as a win-service (using Apache-Procrun). I want to monitor that application with JVisualVM. I've used the commandline argument --openpid <PID> without success, ironically the old JConsole managed to connect to that application.

      I also checked all issues with the %TMP%\hsperfdata_username-Directory that are described in the JVisualVM-Trouble Shooting Guide. Its all well.

      How can i get the JVisualVM to monitor my app?

      Please also answer to the corresponding stackoverflow question : http://stackoverflow.com/questions/13625812/jvisualvm-is-unable-to-connect-to-process-using-the-openpid-argument

        Activity

        Hide
        thurka added a comment -

        See the following page <https://blogs.oracle.com/nbprofiler/entry/monitoring_java_processes_running_as>. It will show you how you can monitor your application.

        Show
        thurka added a comment - See the following page < https://blogs.oracle.com/nbprofiler/entry/monitoring_java_processes_running_as >. It will show you how you can monitor your application.
        Hide
        chriss.dev added a comment -

        Ohh this a lot of work to do, why is the old jconsole able to connect and JvisualVM not? Its feel like a bug? At a failed startup the JVVM should give a hint what to do, like presenting a link to the blog you posted.

        This should be fixed.

        Show
        chriss.dev added a comment - Ohh this a lot of work to do, why is the old jconsole able to connect and JvisualVM not? Its feel like a bug? At a failed startup the JVVM should give a hint what to do, like presenting a link to the blog you posted. This should be fixed.
        Hide
        thurka added a comment -

        It should work the same way as jconsole. Can you attach Java VisualVM log file? Do you see your application when you run Java VisualVM (without any parameter)?
        VisualVM cannot give you link to the blog, since there could a lot of other different cases, not just the one with monitoring windows service app.

        Show
        thurka added a comment - It should work the same way as jconsole. Can you attach Java VisualVM log file? Do you see your application when you run Java VisualVM (without any parameter)? VisualVM cannot give you link to the blog, since there could a lot of other different cases, not just the one with monitoring windows service app.
        Hide
        chriss.dev added a comment - - edited

        Can you attach Java VisualVM log file?

        Here is the requested Log-File: messages.log

        Do you see your application when you run Java VisualVM without any parameter)?

        No, there is nothing!

        Show
        chriss.dev added a comment - - edited Can you attach Java VisualVM log file? Here is the requested Log-File: messages.log Do you see your application when you run Java VisualVM without any parameter)? No, there is nothing!
        Hide
        thurka added a comment - - edited

        I was able to reproduce it, but jconsole only works this way on Windows XP and it is probably a side-effect of Attach API bug and not a jconsole feature. jconsole itself does not display windows service app, you need to specify PID directly. I think it is more convenient to start your windows service app with enabled JMX service and use JMX connection on a specific port. This way you don't need to look up process PID.

        Show
        thurka added a comment - - edited I was able to reproduce it, but jconsole only works this way on Windows XP and it is probably a side-effect of Attach API bug and not a jconsole feature. jconsole itself does not display windows service app, you need to specify PID directly. I think it is more convenient to start your windows service app with enabled JMX service and use JMX connection on a specific port. This way you don't need to look up process PID.
        Hide
        chriss.dev added a comment -

        Thanks using a JMX connection works! For the record here one can find how to setup a JMX connection-> Connecting to JMX Agents Explicitly

        Show
        chriss.dev added a comment - Thanks using a JMX connection works! For the record here one can find how to setup a JMX connection-> Connecting to JMX Agents Explicitly
        Hide
        thurka added a comment -

        Closing.

        Show
        thurka added a comment - Closing.

          People

          • Assignee:
            thurka
            Reporter:
            chriss.dev
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: