如何调试Jboss和Eclipse调试器之间的连接失败

问题描述:

我有安装eclipse可以附加到本地JVM.但是,当我尝试通过网络对计算机执行相同操作时,会收到连接超时异常".

I have setup eclipse to attach to a local JVM. But when I try to do the same for a machine over the network I get "connection timed out exception".

我该如何调试此问题?

我尝试过:

lsof -i:8787在远程计算机上,看来Java进程实际上正在该端口上进行侦听.

lsof -i :8787 on the remote machine, and it appears that a java process is in fact listening on that port.

还有什么可能是错误的,以及如何找到它.请帮忙.

What else could be wrong and how to go about finding it. Please help.

谢谢.

注意:我的JAVA_OPT在远程计算机上看起来像这样. JAVA_OPTS ="-Xdebug -Xnoagent -Xrunjdwp:transport = dt_socket,address = 8787,server = y,suspend = n $ JAVA_OPTS"

Note: My JAVA_OPT looks like this on the remote machine. JAVA_OPTS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"

服务器通常具有多个NIC.您可以将正在使用的远程接口的主机名或IP添加到调试选项中,如下所示:-Xrunjdwp:transport=dt_socket,address=HOSTNAME_OR_IP:8787,server=y,suspend=n

Servers often have multiple NICs; you might add the hostname or IP of the remote interface you're using to your debugging options, like so: -Xrunjdwp:transport=dt_socket,address=HOSTNAME_OR_IP:8787,server=y,suspend=n