Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wildfly 8, remote debug application

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

like image 212
chris polzer Avatar asked Jun 04 '14 11:06

chris polzer


People also ask

How do I enable remote debug in WildFly?

Remote debugging WildFly with Eclipse To enable debugging in your Eclipse IDE, it is generally sufficient to select from the Menu: Run | Debug As | Remote Java application. More in detail, Eclipse won't be able to attach automatically to the JVM with suspend=y.

How do I enable remote debugging in JBoss?

You can enable it - default port is 8787. Then restart JBoss. Remote Debugging will then be enabled. You can then create a run time configuration in Eclispe to run and debug your apps in the JBoss app server.


1 Answers

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>
like image 176
chris polzer Avatar answered Oct 18 '22 03:10

chris polzer