当用eclipse远程调试tomcat上的应用时,如果没有配置远程调试端口,可能会出现如下错误:
Failed to connect to remote VM. Connection refused.Connection refused: connect
解决方法:
在tomcat\bin目录下,编辑catalina.bat,在其中添加如下代码:
set CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8090
注意:
a. 上面的代码应放在使用变量%CATALINA_OPTS%之前
b. 设置的address端口号
不能与应用的端口号相同
分享到:
相关推荐
在处理这类问题时,遵循这个说明进行操作,同时结合上述分析的可能原因进行排查,一般能够解决问题。 总的来说,“cannot connect to VM”错误是一个涉及多方面因素的问题,需要从JRE/JDK配置、网络设置、内存分配...
解决Failed to connect to remote VM com.sun.jdi.connect.spi.ClosedConnectionException错误,tomcat远程调试
- 错误提示:“Failed to connect to remote VM. Connection refused.” - 解决方法:检查Tomcat是否正在运行且配置正确。确保Eclipse中的主机地址和端口号与Tomcat配置匹配。 - **多个连接问题**: - 错误提示:...
You can install a VNC in Linux and connect it via VNC Viewer, works like Remote Server. It's a pity that the offical kernel(vmlinux + modules) don't support CONFIG_DEVTMPFS=y. This will make Linux ...
Note: To run a system test, you must install the System Test Remote Agent Add-in and the Mercury Quality Center Connectivity Add-in on the machine where the test is to be run. For more information on ...