gpt4 book ai didi

eclipse - 无法从主机 Windows 7 上的 Eclipse 远程调试在 CentOS 虚拟机上运行的 Tomcat

转载 作者:行者123 更新时间:2023-11-28 22:10:00 24 4
gpt4 key购买 nike

设置

VMWare 虚拟机

  • CentOS 5.5 64 位
  • OpenJDK 64 位服务器虚拟机(build 14.0-b16,混合模式)
  • Tomcat 6.0

主机

  • Windows 7 64 位
  • Oracle/Sun JDK 1.6 64 位
  • 面向 Java EE 开发人员的 Eclipse Helios

问题

我的 eclipse 远程 Java 应用程序具有以下连接属性:

Host: 192.168.94.133
Port: 8000

当我运行上面的配置时,我得到:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

tomcat 的日志中没有新内容。

但是当我从 windows box telnet 时:

bash-3.2$ telnet 192.168.94.133 8000
Trying 192.168.94.133...
Connected to 192.168.94.133.
Escape character is '^]'.
Connection closed by foreign host.

每次我尝试上面的 telnet,tomcat 都会在日志中吐出这个:

Debugger failed to attach: timeout during handshake

由于 telnet 行为,我认为问题出在 Eclipse 中...我将不胜感激任何帮助。

谢谢,
-戴夫

最佳答案

您可能正在尝试从 Eclipse 连接两次到端口 8000(没有注意到)。

显式切换到调试透视图(“窗口 - 打开透视图 - 调试”)并查看您是否已连接。

关于eclipse - 无法从主机 Windows 7 上的 Eclipse 远程调试在 CentOS 虚拟机上运行的 Tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5173141/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com