Tuesday, March 11, 2014

transport error 202: gethostbyname: unknown host in Eclipse while debugging

FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: gethostbyname: unknown host
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]

If you come across this error while you trying to debug code from Eclipse check your /etc/hosts file and add below entry. Issue will go away.

127.0.0.1    localhost