JDK-4219641 : Unavailable DNS servers causes proxy to wait for > 100 seconds
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.1.7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-03-11
  • Updated: 2000-09-15
  • Resolved: 2000-09-15
Related Reports
Duplicate :  
Description

Name: dbT83986			Date: 03/11/99


Using the following to test URLS
  public static void main(String[] args)
  {
    try{
    System.getProperties().put("proxySet", "true");
    System.getProperties().put("proxyHost", "128.1.200.1");
    System.getProperties().put("proxyPort", "8080");
    System.getProperties().put( "httpsProxySet", "true" );
    System.getProperties().put( "https.proxyHost", "128.1.200.1");
    System.getProperties().put( "https.proxyPort", "8080" );
    URL u = new URL("http://www.result.co.uk/");
    long t = System.currentTimeMillis();
    URLConnection uc = u.openConnection();
    InputStream is = uc.getInputStream();
    long t2 = ((System.currentTimeMillis() - t) / 1000);
    System.out.println("Delay = " + t2 + " secs.");
    }catch (Exception ex) { ex.printStackTrace(); }
  }

This works correctly when I do not have any DNS entries in my TCP networking properties.  However I also use the same
computer for dial-up networking, for use in another office, and dialling onto a customer.
This means that I have three DNS entries that are often not accessable.  I leave these three in the DNS list and all my
other applications (non java) work fine.
As soon as one of these entries is included in the list then the uc.getInputStream() call takes > 100 secs to return.
Because it works differently than other applications, our customers (as I had) will possibly have DNS entries that cause
a problem for our java app but not for everything else.  This will then be a difficult problem for use to identify and correct
because we won't know (or want to know) their network structure.
(Review ID: 54717)
======================================================================

Comments
EVALUATION The implementation of the http client always attempts to resolve the IP address of the host in the url regardless of whether the url would be fetched by a proxy or not. This EOU is a duplicate of 4084543 which we are currently commited to fix in merlin.
11-06-2004

WORK AROUND Name: dbT83986 Date: 03/11/99 Change DNS settings depending on how my computer is being used. This is fine on NT but if this issue is on 9x then a reboot is needed which is much more of a problem. ======================================================================
11-06-2004