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.