无法连接到远程VM。拒绝连接。尝试在Flash Builder 4.7中调试远程java应用程序时 [英] Failed to connect to remote VM. Connection refused. when trying to debug remote java application in Flash Builder 4.7
问题描述
我有一个flex / Java应用程序。有一个包装器启动tomcat服务器。我修改了wrapper.conf文件以包含
-Xdebug -Xrunjdwp:transport = dt_socket,address = 8000,server = y,suspend =在我的flex调试配置中,左边我有远程Java应用程序。在右边,我有标准(套接字附件)作为连接类型,127.0.0.1(我也尝试过本地主机)作为主机,8000作为端口。
以下是堆栈跟踪。
!ENTRY org.eclipse.jdt.launching 4 113 2013-09-03 11:30:49.109
!MESSAGE无法连接到远程VM。拒绝连接。 !STACK 0
java.net.ConnectException:Connection refused:connect at
java.net.PlainSocketImpl.socketConnect(Native Method)at
java.net.PlainSocketImpl.doConnect(Unknown Source)at
java.net.PlainSocketImpl.connectToAddress(Unknown Source)at
java.net.PlainSocketImpl.connect(Unknown Source)at
java.net.SocksSocketImpl.connect(Unknown Source)at
java.net.Socket.connect(Unknown Source)at
java.net.Socket.connect(Unknown Source)at
java.net.Socket。(Unknown Source)at
java .net.Socket。(未知来源)at
org.eclipse.jdi.internal.connect.SocketTransportService $ 2.run(SocketTransportService.java:136)
在java.lang.Thread.run(未知来源)
以下是调试配置的屏幕截图。
解决方案经过多次的斗争,我终于明白了。我不得不进行两个更改。
- 我添加了tomcat.enable.debug = true到我的catalina.properties文件。
在我的wrapper.conf中,我有以下几行。
wrapper.java.additional.9 = - Xmx2048m
wrapper.java.additional.10 = - XX:MaxPermSize = 1024m
我的MaxPermSize设置为比Xmx更小的尺寸。我不得不改变1024到2048.
然后我重新启动了我的tomcat,它的工作,终于!
At one point, the remote debug used to work. But for the life of me, I don't seem to be able to figure out what broke it.
I have a flex/Java application. There is a wrapper that starts the tomcat server. I modified the wrapper.conf file to include
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
In my flex debug configurations, on the left, I have Remote Java Application. On the right, I have Standard (Socket Attach) as the connection type, 127.0.0.1 (I have tried localhost too) as Host, and 8000 as Port.
The following is the stack trace.
!ENTRY org.eclipse.jdt.launching 4 113 2013-09-03 11:30:49.109 !MESSAGE Failed to connect to remote VM. Connection refused. !STACK 0 java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.(Unknown Source) at java.net.Socket.(Unknown Source) at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:136) at java.lang.Thread.run(Unknown Source)
Here is a screen shot of the debug configurations.
解决方案After much struggles, I finally got it figured out. I had to make two changes.
- I added tomcat.enable.debug=true to my catalina.properties file.
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!
这篇关于无法连接到远程VM。拒绝连接。尝试在Flash Builder 4.7中调试远程java应用程序时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!