Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6521974

DatagramSocket cannot bind to a local IPv6 address on SuSE Linux

XMLWordPrintable

    • b13
    • sparc
    • solaris_9
    • Not verified

      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

            yuwangsunw Yujiang Wang (Inactive)
            xwangsunw Xiaozhong Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: