如何调试Jboss和eclipse调试器之间的连接失败
我已经将 Eclipse 设置为附加到本地 JVM。但是,当我尝试通过网络对计算机执行相同操作时,我收到“连接超时异常”。
我该如何调试这个问题?
我
在远程计算机上尝试过: lsof -i :8787 ,看起来 java 进程实际上正在侦听该端口。
还有什么可能是错误的以及如何找到它。请帮忙。
谢谢。
注意:我的 JAVA_OPT 在远程计算机上看起来像这样。 JAVA_OPTS =”-Xdebug -Xnoagent -Xrunjdwp:传输= dt_socket,地址= 8787,服务器= y,挂起= n $ JAVA_OPTS”
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”
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
服务器通常有多个网卡;您可以将正在使用的远程接口的主机名或 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
您应该使用 tcpdump 之类的程序查看 TCP 流量。也许这是 DNS 中的一些命名问题?
You should have a look at the TCP traffic with a program like tcpdump. Perhaps it's some naming problem in DNS?
听起来像是防火墙或路由问题。尝试使用 telnet (或类似的东西)来尝试打开到该端口的连接。如果超时,则说明存在网络问题,而不是编程问题。
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.