Mono Jamoon
Mono Jamoon

Reputation: 4607

mvnDebug fails with a permission denied

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.

Upvotes: 2

Views: 8331

Answers (3)

Eng.Fouad
Eng.Fouad

Reputation: 117665

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

Upvotes: 1

Pankaj
Pankaj

Reputation: 121

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

Upvotes: 0

Vivin Paliath
Vivin Paliath

Reputation: 95588

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.

Upvotes: 5

Related Questions