When connecting to a VM via Attach API, if the client can't access the .java_pid file an AttachNotSupportedException will be thrown:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file /proc/<PID>/cwd/.attach_pid<PID>: target process 14870 doesn't respond within 10500ms or HotSpot VM not loaded
The message says that /proc/<PID>/cwd/.attach_pid<PID> can't be opened, but .attach_pid is created by the client itself; what the client waits for is the /tmp/.java_pid<PID> socket file.
The message should be changed to mention the .java_pid instead of the .attach_pid.
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file /proc/<PID>/cwd/.attach_pid<PID>: target process 14870 doesn't respond within 10500ms or HotSpot VM not loaded
The message says that /proc/<PID>/cwd/.attach_pid<PID> can't be opened, but .attach_pid is created by the client itself; what the client waits for is the /tmp/.java_pid<PID> socket file.
The message should be changed to mention the .java_pid instead of the .attach_pid.