开发者

Cannot remotely debug JVM via SSH tunnel

I need to debug a Java application using remote debugger via an SSH tunnel. I configured putty on my PC and I'm able to connect to any other service running on the server using tunnel开发者_开发知识库 however eclipse remote debugger fails to connect.

On the server side I use Java 1.6.0_21-b06 started with following debug options:

-Xrunjdwp:transport=dt_socket,address=8686,server=y,suspend=n

On my laptop ssh tunnel is configured as:

L8686 IP_ADDR:8686

Are there any limitations for JVM debugger when running session over ssh tunnel?

One more thing, when I try to connect, on the server console I can see following log mesage:

Listening for transport dt_socket at address: 8686


I have the same scenario and everything is working fine, here is how I run my java app:

 java -Xmx120m -agentlib:jdwp=transport=dt_socket,server=y,address=8000 -jar bla.jar

probably the most relevant part is the -agentlib one.


Can you try L8686 localhost:8686 instead, as the JVM may be refusing connections from non-local addresses? Note that 'localhost' is the address from the server's point of view.


That Listening for transport dt_socket at address: 8686 usually occurs if the VM is started or an existing debug session is closed and the VM starts listening for a debug connection again. Maybe running tcpdump on the server could give a clue which peer closes the connection and look a bit deeper on that side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜