I am trying to debug an application remotely. While configuring i am giving Standard(Socket Attach) Connection type.
After when I debug it I got following exception.
com.sun.jdi.connect.spi.ClosedConnectionException
at org.eclipse.jdi.internal.connect.SocketTransportService.readHandshake(SocketTransportService.java:209)
at org.eclipse.jdi.internal.connect.SocketTransportService.access$7(SocketTransportService.java:201)
at org.eclipse.jdi.internal.connect.SocketTransportService$3.run(SocketTransportService.java:172)
at java.lang.Thread.run(Unknown Source)
What can be the possible reason of it?
I had a similar issue when I needed to debug in on OSGI server.
There were a combination of trouble and after solving them I could debug well.
I answered it in this thread
By the way, you can try by stopping your firewall, in case of iptables you have to do:
service iptables stop
You can try by modifying your debugging port and trying to access it. Another test you can do is to debug with another tool like JDebugTool to check if you Eclipse is the problem.
If you use Ant, verify you have your javac configured well:
<javac srcdir="..." destdir="..." classpathref="..." debug="true" debuglevel="lines,vars,source" />
In Eclipse verify you have this:
windows > preferences > Java > compiler -> "Classfile generation" -> check "Add line number attributes to generated class file"
Hope to help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With