Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 727
michal.slocinski Avatar asked Oct 04 '11 08:10

michal.slocinski


1 Answers

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.

like image 131
LordDoskias Avatar answered Oct 02 '22 01:10

LordDoskias