Network unreachable in java only

Bug #486215 reported by Kjella
This bug affects 5 people
Affects Status Importance Assigned to Milestone
openjdk-6 (Debian)
Fix Released
openjdk-6 (Ubuntu)
Fix Released
sun-java6 (Ubuntu)

Bug Description

After the last apt-get update/dist-upgrade, my java applications have stopped working. I can browse, play online games, chat and whatever else applications run fine, but my java applications all error out like this:

Error while sending packet to Network is unreachable

I have not changed any settings, firewalls or anything else related to the network in this timeperiod. Everything looks normal to me, I can for example without problems complete a traceroute:

kjellrs@arrakis:~$ sudo tracert
[sudo] password for kjellrs:
traceroute to (, 30 hops max, 60 byte packets
 1 ( 0.130 ms 0.131 ms *
 2 * * *
 3 * * *
 4 * * *
 5 * * *
 6 * ( 14.940 ms 14.950 ms
 7 ( 14.965 ms 15.007 ms 14.973 ms
 8 ( 19.675 ms * 20.050 ms
 9 * * *
10 * * *
11 * * *
12 * * *
13 * ( 37.923 ms 37.764 ms
14 ( 38.719 ms 38.741 ms 38.763 ms
15 ( 38.619 ms 41.915 ms 41.998 ms
16 ( 135.875 ms 135.896 ms 135.775 ms
17 ( 130.292 ms 130.367 ms 130.390 ms
18 ( 159.882 ms 159.961 ms *
19 * * *
20 * * *
21 * * *
22 * * *
23 * ( 166.913 ms 171.963 ms

Is there possibly some sort of policy that could be blocking java? I have made absolutely no such policy configuration, but this is an upgrade from jaunty to karmic...

ProblemType: Bug
Architecture: i386
Date: Sat Nov 21 10:46:20 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: sun-java6-bin 6-15-1
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: sun-java6
Uname: Linux 2.6.31-14-generic i686
XsessionErrors: (polkit-gnome-authentication-agent-1:2532): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Revision history for this message
Kjella (kjella79) wrote :
Revision history for this message
Heikki Henriksen (heikkih) wrote :

This is a symptom of a bug in sun's java6 regarding ipv6.

$ /sbin/sysctl net.ipv6.bindv6only

If this value is 1 you need to disable the setting:

$ sudo /sbin/sysctl net.ipv6.bindv6only=0

For a persistent fix:
Check /etc/sysctl.conf and /etc/sysctl.d/* for this setting and restart procfs after changing it.

If this was your problem, you should have networking back :)


Changed in openjdk-6 (Debian):
status: Unknown → Confirmed
Revision history for this message
guysoft (guysoft) wrote :

Hello there,
Debian here, had the same problem in a file /etc/sysctl.d/bindv6only.conf
The above fixed it

Revision history for this message
Matthias Klose (doko) wrote :

fixed in 6b18~pre3-0ubuntu1; the debian report has more details

Changed in openjdk-6 (Ubuntu):
status: New → Fix Released
Changed in openjdk-6 (Debian):
status: Confirmed → Fix Released
Revision history for this message
estranged1977 (estranged1977) wrote :

Hi everybody, I was trying to solve this for about a month, and the truth is that was something very stupid, I have 5 pc all with ubuntu and 3 of them were working good without any problem connecting to a firebird server with java, the problem was with the others two, first I was thinking in the version of ubuntu with problems in java ...but the problem was only that the file /etc/hosts was with with a diferent name of the name provided at /etc/hostname, that was /etc/hosts was localhost then myserver.mydomain myserver and my file /etc/hostname was myserver2 so I just edited /etc/hosts and wrote localhost and myserver2 nothing else...and IT WORKS...

I don`t know what is the tech reason for this but I fixed and now im going to drink a full bottle of tequila to celebrate...cheers...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sun-java6 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.