Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8196743

jstatd doesn't see new Java processes inside Docker container

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 17
    • 11
    • core-svc
    • b22

      1. On the host machine start jstatd:
      sudo /jdk/bin/jstatd -J-Djava.security.policy=jstad.policy -J-Djava.rmi.server.hostname=serviceability-1&
      2. On the host machine start the Docker container with some Java process, e.g:
      docker run -d --rm --name docker-test1 serviceability/docker-test1:v0.01 /jdk/bin/java -cp /test/test.jar SimpleProcess
      3. On the client machine run jps:
       ~/Java/jdk10/jdk/bin/jps serviceability-1
      29911 Jstatd

      Expected result: both jstatd and SimpleProcess are listed
      Actual result: only jstatd process is listed

      Kill process jstatd and repeat the steps listed above in the following order: Step 2, Step1, Step 3. In this case step 3 shows both processes jstad and SimpleProcess

      ~/Java/jdk10/jdk/bin/jps serviceability-1
      30253 SimpleProcess
      29911 Jstatd

      For Java processes that run outside the Docker container both cases works as expected

            kevinw Kevin Walls
            dtitov Daniil Titov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: