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

ICMP port unreachable results in SocketException on Windows 2000

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.2.2_006, 1.3.0
    • Fix Version/s: 1.3.0_05
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      05
    • CPU:
      x86
    • OS:
      windows_2000

      Backports

        Description

        This occurs only on Windows 2000 in "receive" method of DatagramSocket class.
        When client socket comes into recieve method without any server
        socket, we get an unexpected java.net.SocketException like this:

        [thread MyThread]:exception occurred java.net.SocketException: socket closed
        java.net.SocketException: socket closed
                at java.net.PlainDatagramSocketImpl.receive(Native Method)
                at java.net.DatagramSocket.receive(DatagramSocket.java:392)
                at MyThread.run(MyThread.java:15)

        It doesn't happen on Windows NT, Solaris. And, if you start server socket
        prior to client, you will not get any exception.

        I got this exception with JDK1.1.8, JDK1.2, and JDK1.3.

        To reproduce this problem with sample code, you should do as follows;
        - compile following 3 java files attached
        - Type "java DatagramClient" in prompt.

        [Note] You need not DatagramServer.java to reproduce it.
        I'm attaching it only for reference.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                alanb Alan Bateman
                Reporter:
                duke J. Duke (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: