我正在尝试使用 jconsole 监视远程进程,这是我使用的命令
jconsole -debug localhost:4080
这是我得到的堆栈跟踪
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at sun.tools.jconsole.ProxyClient.checkSslConfig(ProxyClient.java:217)
at sun.tools.jconsole.ProxyClient.<init>(ProxyClient.java:110)
at sun.tools.jconsole.ProxyClient.getProxyClient(ProxyClient.java:463)
at sun.tools.jconsole.JConsole$3.run(JConsole.java:510)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:250)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
如果我将进程的 pid 提供给 jconsole,它能够成功附加。