dennis lucero created MNG-8538:
----------------------------------

             Summary: Handling "address already in use" in mvnDebug
                 Key: MNG-8538
                 URL: https://issues.apache.org/jira/browse/MNG-8538
             Project: Maven
          Issue Type: Bug
         Environment: Maven 3.9.9, OpenJDK 21, Windows 10
            Reporter: dennis lucero


If debugging is already running,
{code:bash}
$ mvnDebug clean verify
Preparing to execute Maven in debug mode
Listening for transport dt_socket at address: 8000
{code}
a parallel attempt will fail:
{code:bash}
$ mvnDebug clean verify
Preparing to execute Maven in debug mode
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized 
[s\open\src\jdk.jdwp.agent\share\native\libjdwp\debugInit.c:687]
{code}
Instead it should simply use another port:
{code:bash}
$ mvnDebug clean verify
Preparing to execute Maven in debug mode
Listening for transport dt_socket at address: 8001
{code}
Alternatively Maven should display a message showing how to use 
{{{}MAVEN_DEBUG_ADDRESS{}}}, but an automatic approach would be preferred.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to