In order to obtain application launch commands for JavaVM (1.8.0_222) running in the server (based on RHEL7/CentOS7) we run jcmd (1.8.0_66) with VM.command_line option as shown below (once a minute continuously):
jcmd {Process ID} VM.command_line
The following error will be returned immediately after JavaVM (1.8.0_222) is restarted:
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)
atcom.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 works fine.
There are more than 100 other servers running in the same environment, but only one server has been designated to occur.
The previous question was an error due to a missing file under the /tmp/
directory, but this time there is no missing file under the /tmp/
directory.
The VM.command_line option in jcmd becomes unavailable over time
We are in dire straits because we cannot determine the cause.
java centos java8 exception
The reason is that the server you are connecting to is down or the port you are using for communication is closed.
I think so.
© 2024 OneMinuteCode. All rights reserved.