Failed to connect to remote VM. Connection refused. when trying to debug remote java application in Flash Builder 4.7

蹲街弑〆低调 提交于 2019-12-03 17:36:24

After much struggles, I finally got it figured out. I had to make two changes.

  1. I added tomcat.enable.debug=true to my catalina.properties file.
  2. In my wrapper.conf, I had the following lines.

    wrapper.java.additional.9="-Xmx2048m" wrapper.java.additional.10="-XX:MaxPermSize=1024m"

My MaxPermSize was set to a smaller size than Xmx. I had to change that 1024 to 2048.

I then restarted my tomcat and it worked, finally!

Each debug argument must be placed in a line by itself, after the -vm argument. This should do the trick:

-vmargs
-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
Dilip M D

Eclipse is not very verbose for this error "Connection refused". One has to check three entries here.
1. Fully qualified host name or IP
2. Correct port number.
3. At Tomcat level heck below:

Some versions of Tomcat has "dt_shmem" entry instead of "dt_socket". Change it to dt_socket in catalina.bat. The line should looks like this:
set JPDA_TRANSPORT=dt_socket

Mustafa Kemal

We must start Tomcat in remote mode rightly, otherwise just setting related variable cannot solve the problem. My solution is below and that works for my situation: Connection refused problem solution

If you validate Eclipse configuration settings and see that both hostname/IP and port name are correct, try to restart eclipse

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