无法通过SSH隧道远程调试JVM [英] Cannot remotely debug JVM via SSH tunnel

查看:345
本文介绍了无法通过SSH隧道远程调试JVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过SSH隧道使用远程调试器调试Java应用程序。我在我的电脑上配置了油灰,我可以使用隧道连接到服务器上运行的任何其他服务,但eclipse远程调试器无法连接。

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.

在服务器端我使用Java 1.6.0_21-b06从以下调试选项开始:

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

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

在我的笔记本电脑ssh隧道配置为:

On my laptop ssh tunnel is configured as:

L8686 IP_ADDR:8686

在通过ssh隧道运行会话时,JVM调试器是否有任何限制?

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:

聆听运输dt_socket在地址:8686

推荐答案

我有同样的场景,一切都是工作正常,这里是我如何运行我的java应用程序:

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

可能最相关的部分是-agentlib。

probably the most relevant part is the -agentlib one.

这篇关于无法通过SSH隧道远程调试JVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆