无法连接到远程VM。(Failed to connect to remote VM. Connection refused. when trying to debug remote java appl

编程入门 行业动态 更新时间:2024-10-26 05:18:07
无法连接到远程VM。(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 = n

在我的flex调试配置中,在左边,我有远程Java应用程序。 在右边,我有Standard(Socket Attach)作为连接类型,127.0.0.1(我也尝试了localhost)作为Host,而8000作为Port。

以下是堆栈跟踪。

!ENTRY org.eclipse.jdt.launching 4 2013-09-03 11:30:49.109!MESSAGE无法连接到远程VM。 拒绝连接。 !STACK 0 java.net.ConnectException:连接被拒绝:在java.net.PlainSocketImpl.doConnect(未知源)上的java.net.PlainSocketImpl.socketConnect(Native Method)处的java.net.PlainSocketImpl.connectToAddress(未知源)处的at在java.net.java.net.Socket.connect(Unknown Source)上的java.net.Socket.connect(Unknown Source)处的java.net.SocksSocketImpl.connect(Unknown Source)处的java.net.PlainSocketImpl.connect(Unknown Source)。 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(未知来源)

这是调试配置的屏幕快照。

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.

最满意答案

在-vm参数之后,每个调试参数必须放在一行中。 这应该可以做到这一点:

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

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!

更多推荐

本文发布于:2023-08-02 23:39:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1382504.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   connect   remote   Connection   refused

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!