IntelliJ-远程调试-无法打开调试器端口 [英] IntelliJ - Remote debug - Unable to open debugger port

查看:1577
本文介绍了IntelliJ-远程调试-无法打开调试器端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将IntelliJ 2017.3与Payara 4.1.2.172一起使用.我以前只是从命令行启动服务器,并在端口9009上运行了远程调试,并且一切正常.

I am using IntelliJ 2017.3 with Payara 4.1.2.172. I used to just start the server from the command line had a Remote Debug running on port 9009, and everything used to work fine.

然后,我在IntelliJ中设置了一个带有附加模块的插入式服务器,以启用HotSwap.我在调试模式下运行了该服务器,并且运行正常.

Then I set up an plugged in server with attached modules in IntelliJ, to enable HotSwap. I run this server in debug mode, and it works fine.

现在,如果我不使用插入的服务器,而是想像以前那样启动服务器,那么当我运行调试遥控器时,会得到以下信息:

Now, if I don't use the plugged in server, but want to start the server as previous, when I run the debug remote, I get the following:

错误

运行"Debug Glassfish OSM"时出错:无法打开调试器端口 (localhost:9009):java.net.ConnectException连接被拒绝: 连接"

Error running 'Debug Glassfish OSM': Unable to open debugger port (localhost:9009): java.net.ConnectException "Connection refused: connect"

我已经运行了netstat,端口9009上没有任何运行.

I have run a netstat and there's nothing running on port 9009.

问题

如何在服务器上进行远程调试?

How do I get the remote debug working on the server?

更多信息

domail.xml具有:

The domail.xml has:

<system-property name="JAVA_DEBUGGER_PORT" value="9009"></system-property>

并在服务器配置的JVM设置中:

And in the server-config JVM Settings:

更多信息

我将上面的启用"复选框设置为启用,但是现在尝试启动服务器时出现以下错误,即服务器现在无法启动. (netstat显示注意到正在端口9009上运行)

I set the above 'Enable' checkbox to on, but now I get the following error when I try start the server, i.e. the server won't start now. (netstat shows noting running on port 9009)

错误:传输错误202:连接失败:连接被拒绝错误: JDWP传输dt_socket初始化失败,TRANSPORT_INIT(510) JDWP退出错误AGENT_ERROR_TRANSPORT_INIT(197):无传输 初始化的[debugInit.c:750]

ERROR: transport error 202: connect failed: Connection refused ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]

如果在damain.cml中将其设置为off,我仍然会收到错误消息,并且无法启动服务器.

If I set it to off in the damain.cml, I still get the error and am unable to start the server.

<java-config classpath-suffix="" debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUGGER_PORT}" debug-enabled="true" system-classpath="">

推荐答案

  1. 在glassfish \ domains \ domain1 \ config \ domain.xml中:

<java-config classpath-suffix="" debug-options="-agentlib:jdwp=transport=dt_socket,address=9009,server=y,suspend=n" java-home="C:\Program Files\Java\jdk1.8.0_162" debug-enabled="true" system-classpath="">

http://localhost:4848/common/index.jsf 2.在当前的想法中-服务器运行配置-调试-端口-地址

or in http://localhost:4848/common/index.jsf 2. In current Idea - Server Run Configuration - Debug - Port - address

这篇关于IntelliJ-远程调试-无法打开调试器端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆