JDK-6364414 : ServerSocket call in jdk 1.4.2_08 not throwing expected IOException for a used port #.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.4.2_08
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2005-12-16
  • Updated: 2011-12-27
  • Resolved: 2006-05-02
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.
Other
1.4.2_08Resolved
Related Reports
Relates :  
Description
Oracle reported this during Oracle 10g Grid Control testing. On jdk 1.4.2_08, the ServerSocket call does not throw an expected IOException for a used port #, whereas the call throws the expected IOException on jdk 1.2.2 for the same, used port #.

Oracle is asking if there is a method to obtain a free port #, instead of cycling through all port #s serially.

Also, on the 1.4.2_08 m/c, another used port gave the expected IOException. Hence, this issue is not seen consistently for all port #s in the 1.4.2_08 m/c.

Test case (file socketport.txt) is attached. The port # that Oracle used may be different from that on our m/c's.

Comments
EVALUATION Submitter to install latest J2SE patch cluster (see comments).
02-05-2006

EVALUATION There isn't sufficient information in this bug report to diagnose the issue. One possibility is that IPv6 is enabled and the system hasn't been patched to the J2SE required prerequisites. Since J2SE 1.4 all sockets are IPv6 sockets if IPv6 is enabled on the system. As Solaris has seperate port spaces for IPv4 and IPv6 sockets the TCP_EXCLBIND option is used to give the illusion of a unified port space. The submitter can quickly check this by running with the java.net.preferIPv4Stack system property set to true (ie: run with -Djava.net.preferIPv4Stack=true). If that cures the issue for 1.4.x then the system will required to be patched. I will mark this bug as incomplete until there is further details appended to the bug report.
02-01-2006