Wednesday, February 17, 2010

"ERROR: transport error 202: connect failed: Operation timed out"

This is a problem that can be encountered on NetBeans platform when trying to debug a project.

In another post someone said
...
deps-jar:
compile:
Shared archive: sharing disabled for server vm
ERROR: transport error 202: gethostbyname: unknown host ["transport.c",L41]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNAL(113)
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) ["debugInit.c",L500]
JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initialized
JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initializedJava Result: 134
debug:
BUILD SUCCESSFUL (total time: 6 seconds)
This worked for me on OS X:

# sudo su -
# echo 127.0.0.1 `/bin/hostname` >> /etc/hosts

Of course, there are many other commands that can be used to achieve the same thing.

After this, the debugger connected right away, instead of a lengthy timeout and then failure.

The problem occurred in my case because a VPN connection (Cisco AnyConnect) change my hostname / dns servers.

1 comment:

Yannick said...

In my case too, the problem came from an impossible loopback.
An called ZScaler (set by admin to protect the enterprise) on Windows 10 put loopback restrictions.
Fortunately, an option existed to disable loopback restrictions on ZScaler.