Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
454 views
in Technique[技术] by (71.8m points)

java - Maven Eclipse Debug "JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)"

I'm trying to debug Maven tests in Eclipse. When I launch tests with the maven option maven.surefire.debug, I get this error :

ERROR: transport error 202: bind failed: Address already in use
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
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]
/bin/sh: line 1: 27500 Abort trap        

It is the same when I tried tu launch debug in my shell.

I tried to add the maven option forkMode=never, and I get another error with my weld artifact that I do not have without the maven.surefire.debug option :

Error loading Weld bootstrap, check that Weld is on the classpath

However, Weld is on my classpath.

Any ideas ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To kill a process listening on a port:

This command should list processes listening on all ports:

netstat -ano

The -o option will display the process id.

If you're using a *nix system, you can refine a little further with:

netstat -ano | grep <badport> 

When you have the process id, you can terminate it with:

Windows:

  • Open Task Manager, add the PID column with View > Select Columns > PID
  • Find the process and right-click to kill it

Others:

kill <PID>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...