2

I am trying to debug my project, built with maven, on a new system. The command mvn tomcat:run runs fine but however, it fails with mvnDebug tomcat:run.

C:\project>mvnDebug tomcat:run
Preparing to Execute Maven in Debug Mode
ERROR: transport error 202: bind failed: Permission denied
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)

The plugin defined in pom.xml is:

            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.0</version>
            </plugin>

I am unable to find a solution that explains the issue with a "Permission denied". I did find a post hereon SO, but it had a "Address already in use" issue.

Community
  • 1
  • 1
Mono Jamoon
  • 4,437
  • 17
  • 42
  • 64

3 Answers3

5

It's possible that something else is bound to port 8000, or it might be blocked somehow. Try using another port and see if you are able to bind to that. There are details here. Basically you have to change the mvnDebug.bat batch-file to use another port.

Community
  • 1
  • 1
Vivin Paliath
  • 94,126
  • 40
  • 223
  • 295
1

For me, it was because of the port being excluded in Windows:

netsh int ipv4 show excludedportrange protocol=tcp

I resolved it after executing the following command:

net stop winnat

reference: https://superuser.com/a/1610009/84873

Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
0

Reason for this issue to come could be that your port 8000 is blocked or used some where else.

For me, restarting of machine has fixed this issue.

Thanks

Pankaj
  • 121
  • 7