johnrengelman / gradle-processes

Gradle Processes Plugin - Create and manage forked processes
Apache License 2.0
40 stars 18 forks source link

Cannot debug multiple JavaFork tasks #14

Closed xaviarias closed 2 years ago

xaviarias commented 5 years ago

I have defined a JUnit integration test which depends on three JavaFork tasks:

integrationTest.dependsOn  'service1Start', 'service2Start', 'service2Start'

When running the test in Gradle with debug mode, I get this error three times:

ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [:732]

Is it possible that there is a port conflict with the test?

xaviarias commented 5 years ago

When setting the JavaFork tasks to debug=true the message changes to:

Error occurred during initialization of VM
ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.
agent library failed to init: jdwp