JDK-6521974 : DatagramSocket cannot bind to a local IPv6 address on SuSE Linux
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2007-02-06
  • Updated: 2012-03-22
  • Resolved: 2011-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b13Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
DatagramSocket sometimes fails to bind to a local IPv6 address due to IOException, or fails to send/receive datagram. See attached program.

Output:

/java/re/j2se/6.0/archive/fcs/binaries/linux-i586/bin/java -classpath . IPv6DatagramTest fe80:0:0:0:207:e9ff:fe62:7e18
java.net.BindException: Cannot assign requested address
	at java.net.PlainDatagramSocketImpl.bind0(Native Method)
	at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
	at java.net.DatagramSocket.bind(DatagramSocket.java:368)
	at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
	at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
	at IPv6DatagramTest.test2(IPv6DatagramTest.java:37)
	at IPv6DatagramTest.main(IPv6DatagramTest.java:77)
Can not create server:java.net.BindException: Cannot assign requested address

When test1() is commented out, the program times out instead.

Network configuration:

eth0      Link encap:Ethernet  HWaddr 00:07:E9:62:7E:18  
          inet addr:129.145.163.163  Bcast:129.145.163.255  Mask:255.255.254.0
          inet6 addr: fe80::207:e9ff:fe62:7e18/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7241647 errors:30 dropped:0 overruns:0 frame:30
          TX packets:1662825 errors:1 dropped:0 overruns:0 carrier:1
          collisions:437134 txqueuelen:1000 
          RX bytes:2099012579 (2001.7 Mb)  TX bytes:272021323 (259.4 Mb)
          Base address:0xcc00 Memory:ff8e0000-ff900000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:94579 errors:0 dropped:0 overruns:0 frame:0
          TX packets:94579 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:18048989 (17.2 Mb)  TX bytes:18048989 (17.2 Mb)

Host information:

Linux d-usca22-163-163 2.6.4-52-smp #1 SMP Wed Apr 7 02:11:20 UTC 2004 i686 i686 i386 GNU/Linux

Comments
EVALUATION Yes, will fix.
18-04-2007