Maven Eclipse Debug “JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)”

安稳与你 提交于 2019-11-29 01:01:50

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>
Jasonw

Go to Debug configuration -> Remote Java Application -> Connect tab, check Allow termination of remote JVM.

Then, when you are going to restart the server/maven, go to Debug perspective and click the read / stop button.....

There is a long time the question was asked but i had the same problem recently.

  1. Open Task Manager

  2. Kill all "java.exe" process

  3. Relaunch the mvn debug

Hope it will help

Usually the problem is that another process keeps Maven debug port 5005 open. On my mac I checked which process keeps this port open by executing:

lsof -i tcp:5005

The output was:

COMMAND  PID        USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
java    9089 my_user    7u  IPv4 0xe88ec542fd4cffc9      0t0  TCP *:avt-profile-2 (LISTEN)

And then I killed the process:

kill -9 9089

If you want these 2 process to be able to run together, you'll have to change the Maven debug port of at least one of them. See: http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html.

Just for documentation, I had the exact same error, running on my local:

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)

in my case the port wasn't the issue, but the host file. The solution is to add/re-add/uncomment:

127.0.0.1 localhost

The config file sets localhost as default, so a solution is add that host or change it for a custom one.

To add on.. I had the similar issue last week, when debugging using eclipse was made impossible.

FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_LOAD(196)
ERROR: transport library not found: dt_socket
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_LOAD(509)
JDWP exit error AGENT_ERROR_TRANSPORT_LOAD(196): No transports initialized [../../../src/share/back/debugInit.c:690]

Sadly non of the solution I can possibly find online was helpful.

The issue turned out to be that somehow firewall removed all the dlls in my JRE bin... (so dt_socket.dll went completely missing).

Reinstalling the entire JRE helped.

Marcos Steckert Pessôa

The solution to me was removing the breakpoints of project! If you have many branches and changed recently sometimes eclipse lost some's breakpoints.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!