Reputation: 11
I have a java application which I am trying to debug using eclipse. When I launch debugging, I see this error message in the console:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNAL(113)
ERROR: transport error 202: connect failed: Connection refused ["transport.c",L41]
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) ["debugInit.c",L500]
JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initialized
I am NOT trying to remotely debug the java application. My java application is set up as a project in eclipse itself. I created a debug configuration and attempted to launch the application using it.
Having looked at various options on this forum, I tried pinging localhost and 127.0.0.1. Both of them have succeeded (pinged with no issues). I do not have a clue on why this is happening.
The debugging is however working for a simple test class!
At the time of failure, this is what I see in eclipse log:
eclipse.buildId=4.4.1.M20140925-0400
java.version=1.7.0_71
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_IE
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product
org.eclipse.jdt.launching
Error
Mon Dec 29 15:24:26 GMT 2014
Cannot connect to VM
com.sun.jdi.connect.TransportTimeoutException
at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:105)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:59)
at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:153)
at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:110)
at java.lang.Thread.run(Unknown Source)
Can someone please guide me on what the issue could be.
Appreciate any help. Thank you.
Ravi.
Upvotes: 1
Views: 4650
Reputation: 328594
Your error message as an entry in Eclipse's Debug FAQ: https://wiki.eclipse.org/Debug/FAQ#I_can_run_a_program_but_not_debug_it.3F.3F.3F
A bit of background information: Eclipse (and every other IDE) always uses a socket to connect to a JVM to debug. It doesn't matter whether the JVM is on the same computer or not. That means your IP stack has to work, security settings must allow Java to open ports, etc.
This can fail for several reasons:
The port is used. This usually happens when you specify a port to use instead of letting Eclipse find one for you.
A firewall or some other security software is denying Java to open ports
Your network configuration has gone bad. One case is that a trojan has added IP addresses into /etc/hosts
(or your OS's variation of that) to redirect your traffic. For Windows, look into the folder %WINDOWS%\system32\drivers\etc\
The important bit is that localhost
resolves as 127.0.0.1
.
Upvotes: 1