以前都是正常,昨天开始使用 jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700这个命令就报错。报错提示
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportServi
e.java:204)
at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingC
nnector.java:98)
at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingCon
ector.java:72)
at com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnecti
n.java:358)
at com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:
68)
at com.sun.tools.example.debug.tty.Env.init(Env.java:64)
at com.sun.tools.example.debug.tty.TTY.main(TTY.java:1010)