Home > Debian, Java, Linux > Java Problem in Debian: Network is unreachable

Java Problem in Debian: Network is unreachable

Ok this is a very bad bug…
In the past, I was searching for a whole day to find out what was going wrong with a program (SUN SPOT Manager) that I wanted to run and now again for another two!
And all that, just because I had lost the link with the solution.

The problem turns up with java programs, running on Debian (squeeze), that have to access IPv4 addresses and the network, for some reasons, seems to be unreachable.

The “solution” is simple. You just have to run the following command:

sudo sed -i 's/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/' \
/etc/sysctl.d/bindv6only.conf && sudo invoke-rc.d procps restart

If you want to see more about this bug, have a look at this.

Also, if you are not bored, check this out… and you ‘ll understand the use of this kernel variable (net.ipv6.bindv6only), that creates the problem.

Advertisements
Categories: Debian, Java, Linux Tags: , ,
  1. george.mei
    June 27, 2010 at 14:58

    Think You

  2. valeriy
    July 14, 2010 at 12:26

    Very big thanks for that tip. It helps me 🙂

  3. ctrace
    February 22, 2011 at 19:38

    Another workaround I found is to add -J-Djava.net.preferIPv4Stack=true [jnlp file].

    (should be able to do the same from the java command line with just -D…)

  4. March 23, 2011 at 23:13

    Yes this must be the same and it is not permanent…

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s