-
Bug
-
Resolution: Fixed
-
P4
-
1.1.5
-
1.2.2
-
sparc
-
solaris_2.6
Name: yyC67448 Date: 01/25/98
The java.net.ServerSocket allways refuses connections on Solaris 2.6
if backlog is set to Integer.MAX_VALUE
Here is the test demonstrating the bug:
-------------------------------- Test.java -----------------------------
import java.io.*;
import java.net.*;
class test
{
public static void main(String args[])
{
ServerSocket soc = null;
Socket csoc = null;
int port = 0;
try {
soc = new ServerSocket(port, Integer.MAX_VALUE);
port = soc.getLocalPort();
} catch(Exception e)
{
System.out.println("Failed. Unexpected exception:" + e);
System.exit(-1);
}
try {
csoc = new Socket(InetAddress.getLocalHost(), port);
} catch(Exception e)
{
System.out.println("Failed. Unexpected exception:" + e);
System.exit(-1);
}
try {
soc.close();
csoc.close();
} catch(Exception e) {}
System.out.println("Passed. OKAY");
}
}
------------------- Output from the test on Solaris 2.6 ------------------
Failed. Unexpected exception:java.net.ConnectException: Connection refused
---------------------------------------------------------------------------
------------------- Output from the test on Solaris 2.4, 2.5.x ------------
Passed. OKAY
---------------------------------------------------------------------------
======================================================================
- relates to
-
JDK-4190775 java virtural machine s/w causes tcp BOUND state under Solaris 2.6
- Closed