Wildfly 8, remote debug application

chris polzer picture chris polzer · Jun 4, 2014 · Viewed 23.1k times · Source

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

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:

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

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

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

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

Thanks in advance

Answer

chris polzer picture chris polzer · Jun 4, 2014

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>