Java Wildfly 8,远程调试应用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24036740/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 09:50:36  来源:igfitidea点击:

Wildfly 8, remote debug application

javajbossremote-debuggingwildfly

提问by chris polzer

I need to remotely debug y node in a JBoss 8 / Wildfly Cluster. (Running two nodes on one machine)

我需要远程调试 JBoss 8 / Wildfly 集群中的 y 节点。(在一台机器上运行两个节点)

For this in our host-slave config we have the two nodes configured:

为此,在我们的主机从配置中,我们配置了两个节点:

<servers>
        <server name="node1" group="main-server-group" auto-start="true"> 
            <jvm name="wicket" debug-enabled="false">
                <heap size="1024m" max-size="1536m"/>
                <jvm-options>
                     <option value="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"/>
                </jvm-options>
            </jvm>
        </server>
        <server name="node2" group="main-server-group" auto-start="true">
            <jvm name="wicket" debug-enabled="false">
                <heap size="1024m" max-size="1536m"/>
                <jvm-options>
                    <option value="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8788"/>                       
                </jvm-options>
            </jvm>
            <socket-bindings port-offset="100"/>
        </server>
</servers>

When I now try to connect to each of the remote debugging ports Intellij tells me:

当我现在尝试连接到每个远程调试端口时,Intellij 告诉我:

Error running node2: Unable to open debugger port : java.net.ConnectException "Connection refused: connect"

运行 node2 时出错:无法打开调试器端口:java.net.ConnectException“连接被拒绝:连接”

I can confirm the nodes have startet up via the Wildfly management panel.

我可以通过 Wildfly 管理面板确认节点已启动。

Also I have checked via telnet on the machine running the nodes, that telnetting the pots is not possible.

此外,我还通过运行节点的机器上的 telnet 进行了检查,无法通过 telnet 连接罐子。

Any help appriciated. If anyone has useful links towards a proper documentation of the wildfly config files, this would be appreciated even more.

任何帮助appriciated。如果有人拥有有关 wildfly 配置文件的正确文档的有用链接,我们将不胜感激。

Thanks in advance

提前致谢

采纳答案by chris polzer

Got it. The option values need to be seperated.

知道了。选项值需要分开。

 <jvm-options>
      <option value="-Xdebug "/>
      <option value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"/>
 </jvm-options>