JDK-8187592 : docs need to describe special considerations for using the Attach API with docker
  • Type: Sub-task
  • Component: docs
  • Sub-Component: tools
  • Affected Version: 10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-09-15
  • Updated: 2018-02-07
  • Resolved: 2018-02-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10Fixed
Related Reports
Relates :  
Relates :  
Description
JDK-8179498 (the parent of this CR) describes a feature request to make the Attach API work better between a linux host and the docker containers it launches. Logically these containers are running on different machines/devices, and the Attach API does between 2 differences devices. However, since the the linux host has access to the processes in the docker containers, the Attach API can be made to work between them with some modifications and described in JDK-8179498.

Since JDK-8179498 is being pushed to 10, this enhancement should be documented. However, what should also be documented is a gap in the full docker support as also noted in JDK-8179498. More specifically, the host has no ability to find and list all the JVMs running in the docker containers. This means, for instance, they won't show up in the "jcmd -l" output, and also won't be discovered when using "jcmd <MyClassName>". Instead you need to provide the PID of the JVM process you want to attach to. Other tools that use the Attach API will show similar JVM discovery issues, but I don't know these tools well enough to say exactly how they would manifest.
Comments
I'll have a look. BTW, these docs will need to be updated again in JDK 11 to cover fixes for JDK-8193710. I've created JDK-8196447 as the doc bug for that update.
30-01-2018

Hi Chris, I have added a note based on the information you provided. Please review and let me know if there are any changes to be done. Here is the link: http://review.us.oracle.com/review2/Review.html#reviewId=348426;scope=document;status=open,fixed;documentId=2127367;noteId=4220099 Thanks!
30-01-2018