systemd managed java can not be attached
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tomcat9 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The default `/lib/systemd/
```
➜ tomcat9 ps -ef | grep java
tomcat 86960 1 99 13:50 ? 00:00:02 /usr/lib/
ubuntu 86992 72538 0 13:50 pts/0 00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn java
➜ tomcat9 sudo su -l tomcat -s /bin/bash
tomcat@ubuntu:/$ jstack 86960
86960: Unable to open socket file /proc/86960/
```
If related options are removed, jstack can work
```
➜ tomcat9 sudo vim /lib/systemd/
➜ tomcat9 sudo systemctl daemon-reload && sudo systemctl restart tomcat9
➜ tomcat9 ps -ef | grep java
tomcat 87095 1 81 13:50 ? 00:00:03 /usr/lib/
ubuntu 87129 72538 0 13:51 pts/0 00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn java
➜ tomcat9 sudo su -l tomcat -s /bin/bash
tomcat@ubuntu:/$ jstack 87095
2022-07-13 13:51:09
Full thread dump OpenJDK 64-Bit Server VM (11.0.15+
Threads class SMR info:
........
```
description: | updated |