使用 Eclipse 和 tomcat 进行远程调试
我在Linux服务器上部署了一个应用程序,其中一些IP为11.22.33.44
服务器详细信息
Java版本-“1.6.0_14”
IP-11.22.33.44
当我启动服务器时,我在服务器控制台上收到以下o/p '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8004'
这意味着我已经设置了在调试模式下启动服务器所需的所有信息
客户端设置(其他 Windows 7 计算机)
对于 Eclipse 上的连接属性详情如下 主持人:11.22.33.44(如上所述) 端口:8004(如上所述)
我想每件事都正确完成,但仍然出现
无法连接到远程虚拟机。连接被拒绝。连接超时:连接
错误
从运行 Eclipse 的客户端计算机,我能够 ping 通服务器计算机,即 11.22.33.44
I have an application deployed on linux server with some ip say 11.22.33.44
Server Details
Java version - "1.6.0_14"
IP - 11.22.33.44
when i start the server i am getting the following o/p on server console
'-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8004'
This means i had set all the required information for starting the server in debug mode
Client side Setting (Other windows 7 machine)
For connection properties on eclipse the details are as follows
Host : 11.22.33.44 (As above)
Port : 8004 (As above)
I guess every thing is done correctly but still getting the
Failed to connect to remote VM. Connection refused.Connection timed out: connect
error
From my client machine where eclipse is running i am able to ping the server machine i.e. 11.22.33.44
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来像是防火墙问题。
您可以从给定机器/端口上的命令行进行telnet吗?
尝试一下:
如果失败,则意味着您的端口未打开 - 要么您的 JVM 忽略了参数并且没有侦听该端口,要么有防火墙阻止您的访问。
为了识别它是哪一个,您可以登录到运行 tomcat 的计算机,
如果成功,则意味着您的 jvm 正在该端口上接受远程调试连接,因此问题出在您网络中的防火墙,如果失败则意味着您尚未使用正确的远程调试参数启动 JVM。
sounds like a firewall issue.
Can you telnet from the command line on the given machine / port?
Try this:
if this fails then it means your port is not open -- either your JVM ignored the parameters and is not listening on that port or there is a firewall blocking your access.
In order to identify which one it is, you can log onto the machine running tomcat and
if this succeeds it means your jvm is accepting remote debug connections on that port and therefore the problem is a firewall in your network, if it fails it means you haven't started the JVM with the correct remote debug params.
检查以下内容后,发现另一个错误源:连接类型。因此,对于其他遇到相同问题的人,应遵循以下问题解决路径:
这应该可以做到。如果没有,请留言,我帮忙。
After checking the following there is another source of error: Connection Type. So for others having the same issue, shall follow this problem resolution path:
This should do it. If not, drop a message and I help out.