Nanthrax

NanthraxWiki

Blog


About Me
Links
Documentation
Open Source Projects

Enter your name on
UserPreferences



Main

Changes between version 50 and version 49:
At line 2 added 30 lines.
+ !!Java network issue after the latest Debian upgrade __(2009-12-23)__
+
+ Today, I got some strange network issue in java applications (such as maven, eclipse, ...). After some investigation, I found that the issue is due to IPv4 and IPv6 stack cooperation.
+
+ Adding -Djava.net.preferIPv4Stack=true argument to maven (in the MAVEN_OPTS variable) or in the eclipse.ini file correct my issue, but it's not very efficient.
+
+ So I checked what's happened on my Debian box. In fact, in the latest Debian upgrade, a new file has been added:
+
+ {{{
+ /etc/sysctl.d/bindv6only.conf
+ }}}
+
+ AHAHA. It's the guilty (this file has been added the 22th of december, the beginning of my issue). In this file, we can see:
+
+ {{{
+ # This sysctl sets the default value of the IPV6_V6ONLY socket option.
+ #
+ # When disabled, IPv6 sockets will also be able to send and receive IPv4
+ # traffic with addresses in the form ::ffff:192.0.2.1 and daemons listening
+ # on IPv6 sockets will also accept IPv4 connections.
+ #
+ # When IPV6_V6ONLY is enabled, daemons interested in both IPv4 and IPv6
+ # connections must open two listening sockets.
+ # This is the default behaviour of almost all modern operating systems.
+
+ net.ipv6.bindv6only = 1
+ }}}
+
+ Turning the bindv6only to 0 and system reboot solve the issue. Now all my java applications are working like a charm.
+

Back to Main, or page history.