Debian Kernel 2.6.30-1 and JVM Socket Issues

Due to an update of my linux kernel i stumbled upon a strange issue. I could not get sockets working properly. After some googling i figured out that it had to be a network configuration issue.

By default (Debian Testing) sockets bind only to ipv6.

The socket binding behaviour can be configured within:

cat /etc/sysctl.d/bindv6only.conf
Set the parameter from net.ipv6.bindv6only=1 to net.ipv6.bindv6only=0

To test the setting you can also use the following command:

  • sysctl -w net.ipv6.bindv6only=0

The error messages might be:

Caused by: Network is unreachable
	at Method)

Or for debugging java:

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