Remote debugging: No connection to Wildfly 14 on OpenJDK 11 at port 8787

后端 未结 3 1153
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-07 18:57

I\'m trying to connect my debugger to Wildlfy running on Open JDK 11.

Despite Wildfly says:

Listening for transport dt_socket at addres

相关标签:
3条回答
  • 2021-01-07 19:30

    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.

    0 讨论(0)
  • 2021-01-07 19:36

    For jdk 11,you should use

    -agentlib:jdwp=transport=dt_socket,address=*:8787,server=y,suspend=n
    

    instead.

    0 讨论(0)
  • 2021-01-07 19:37

    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.

    0 讨论(0)
提交回复
热议问题