How to debug a connection failure between Jboss and eclipse debugger

北慕城南 提交于 2019-12-02 18:35:09

问题


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".

How do I go about debugging this issue?

I tried:

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.

Thank you.

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”


回答1:


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




回答2:


You should have a look at the TCP traffic with a program like tcpdump. Perhaps it's some naming problem in DNS?




回答3:


Sounds like a firewall or routing issue. Try using telnet (or something similar) to try and open a connection to that port. If that times out, then you have a networking problem, not a programming one.



来源:https://stackoverflow.com/questions/1916709/how-to-debug-a-connection-failure-between-jboss-and-eclipse-debugger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!