Details
-
Enhancement
-
Resolution: Fixed
-
P3
-
11, 14
-
b27
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8256269 | 13.0.6 | Yuri Nesterenko | P3 | Resolved | Fixed | b01 |
JDK-8247540 | 11.0.9-oracle | Fairoz Matte | P3 | Resolved | Fixed | b01 |
JDK-8248202 | 11.0.9 | Rahul Raghavan | P3 | Resolved | Fixed | b01 |
Description
When you start JConsole, a list is shown of the JVMs you can connect to (obtained from VirtualMachine.list()), but since JDK 9, it is not possible to attach to yourself, so when you try, it fails without any explanation.
It is possible to override this behavior by specifying -Djdk.attach.allowAttachSelf=true at command line. It would be good if this was added to jconsole launcher, located at:
make/launcher/Launcher-jdk.jconsole.gmk
Self-attach was blocked to prevent users from programatically breaking the integrity of the runtime by loading an agent into the current VM. This is not an issue for jconsole
An alternative would be remove the running process from the list you see in start dialog, but it is very convenient to have it for demo purposes, tutorials and exploration of JDK MBeans, so I don't think that is the correct action to take.
It is possible to override this behavior by specifying -Djdk.attach.allowAttachSelf=true at command line. It would be good if this was added to jconsole launcher, located at:
make/launcher/Launcher-jdk.jconsole.gmk
Self-attach was blocked to prevent users from programatically breaking the integrity of the runtime by loading an agent into the current VM. This is not an issue for jconsole
An alternative would be remove the running process from the list you see in start dialog, but it is very convenient to have it for demo purposes, tutorials and exploration of JDK MBeans, so I don't think that is the correct action to take.
Attachments
Issue Links
- backported by
-
JDK-8247540 Jconsole can't connect to itself
- Resolved
-
JDK-8248202 Jconsole can't connect to itself
- Resolved
-
JDK-8256269 Jconsole can't connect to itself
- Resolved