java.net.ConnectException: network is unreachable

Under Debian (and I think other distros) if you receive this error on commandline when running java applications,

you can solve it simply setting this kernel parameter will solve the problem

 

sysctl net.ipv6.bindv6only=0

Comments (3)

  1. 8:51 pm, November 27, 2013Thomas  / Reply

    You are a live saver!!!
    I googled for hours now without success, until I found your suggestion.
    Thanks a lot for sharing!

  2. 8:55 pm, November 27, 2013Thomas  / Reply

    As java debugging goes over sockets to, this is what you see, when you try to debug with eclipse. I put it here, so search engines can better find this page.

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

    • 4:43 pm, November 28, 2013Umberto  / Reply

      Thanks to you Thomas,
      also I spent many hour to figure out the problem, so I’m glad my post help someone

Leave a Reply


*