Name: dk106046 Date: 08/05/2002
Windows XP- v5.1.2600
JDK 1.4.0-b92 and 1.4.1.
In the 1.4 JDK, once one socket is opened when the default socks proxy settings are in effect, we can no longer dynamically take over control of an another socks proxy.
Even though we are opening a socket to natchez.raleigh.ibm.com (since we changed the socksProxyHost system property) the socket was actually getting opened on socks.raleigh.ibm.com (which is the default proxy).
This can viewed using the utility, tcpview, which can be downloaded from www.sysinternals.com, to monitor open sockets, and too show the process owner of the socket host.
1. In the failing scenerio, tcpview will show you a socket open to socks server socks.raleigh.ibm.com (usually redirects open-a-socket requests to a different socks server usually with a name like ss07.raleigh.ibm.com - the '07 can be any number')
2. In the passing scenerio, tcpview will only show a socket open to natchez.raleigh.ibm.com with no socket opened to ss??.raleigh.ibm.com.
Exact steps to reproduce:
Note the socks server names are internal to us, and are only provided as examples. The source code is available on request.
For the failing Scenario:
1.Compile the files SocksSocket.java and sockstest.java
2.Change the browser setting to use socks.raleigh.ibm.com
3.Run tcpview by double clicking on the tcpview.exe
4. Run sockstest.html using Internet Explorer.
5. Open the tcpview window to observe that for iexplore.exe process,remote address is ss??.raleigh.ibm.com (the one set in the browser) instead of natchez.raleigh.ibm.com.
For the Passing Scenario:
1. Comment the following code in the file sockstest.java
System.out.println("creating socket to "+otherHostStr);
otherHost = InetAddress.getByName(otherHostStr);
otherHostSocket = create_Other_Socket(otherHost);
catch (Exception e)
System.out.println("exception occured while opening socket to 'other' host");
Then follow the steps as given for the failing scenario. Here the tcpview window shows that for the iexplore.exe process, remote Address was natchez.raleigh.ibm.com. This is the excepted output.
NB: The problem is not recreatable with Netscape/JDK 1.4. Neither is the problem recreatable with either browser using JDK 1.3.1.