jcmd's VM.command_line option becomes unavailable after restarting JavaVM (1.8.0_222)

128 Views Asked by At

In order to get the application start command of JavaVM (1.8.0_222) running in the server (based on RHEL7 / CentOS7), add jcmd (jdk1.8.0_66) with VM.command_line option as shown below (1 per minute). Running (continuously) times.

"jcmd {process ID} VM.command_line" will return an error after restarting the JavaVM (1.8.0_222) app.

java.io.IOException: Connection refused
        at sun.tools.attach.LinuxVirtualMachine.connect(Native Method)
        at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:124)
        at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
        at sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:147)
        at sun.tools.jcmd.JCmd.main(JCmd.java:131)

I also run "jcmd {process ID} PerfCounter.print" once a minute and it's working fine.

Currently, I have identified the cause and restarted the JavaVM (1.8.0_222) app at intervals (15 minutes).

I am trying to create 10 same servers. Occurs after about 3000 reboots in total. Although the probability of occurrence of an event is very low,

I can't identify the cause of this.

0

There are 0 best solutions below