Remote debugging: No connection to Wildfly 14 on OpenJDK 11 at port 8787
The cause lies in the default behaviour that changed with Java 9 according to this answer: Beginning with Java 9, the JVM only accepts local connections unless otherwise specified.
Therefore the solution is fairly easy:
While with Java 8 it is sufficient to start Wildfly with --debug
, with Java 9 I needed to change this to --debug *:8787
.
In my case, I was using Java 8 in my machine, but the remote Wildfly instance was running on Java 11.
When I changed my Java version to 11, it worked.
For jdk 11,you should use
-agentlib:jdwp=transport=dt_socket,address=*:8787,server=y,suspend=n
instead.