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

Javaws.exe doesn't support multi-IP addresses hostname in URL

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 6u10
    • deploy
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.6.0_10"
      Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
      Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      We deploy jcash.jnlp file on a clustered Weblogic 10.3 servers: server1.test.com (IP:141.128.89.195) and server2.test.com(IP:141.128.89.196)
      We also setup the DNS name qa.test.com which resolved to two IP addresses.
      Therefore, on client machine, the nslookup will return these wo IP addresses. Suppose the 141.128.89.195 is the first one in the resolved IP addresses for qa.test.com.
      We try to launch jcash.jnlp by the javaws command line:
      javaws http://qa.test.com:8000/jcash.jnlp.

      This command only works when our server1(141.128.89.195:8000) server is up. Seems the javaws command didn't even bother to try the 2nd IP address (141.128.89.196). However, if we put the same URL into the IE6 or IE7 address and start the web start from browser, it is working and connecting to server2.

      The attached error messages are the the exception from javaws.







      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Setup two web server at same port, e.g. 8000. Then setup any DNS name that returns the IP addresses of both servers (one IP from each).
      Then deploy any jnlp file to both servers.

      One any client machine, try javaws.exe http://<dnsname>:8000/<jnlp filename>



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The javaws.exe should iterate all the resolved IP addresses in the jnlp URL and try one by one, so it would fail over to the other IP address if the first one fails.
      Just like the direct web start from IE.
      ACTUAL -
      The javaws.exe will report exception when failed connecting to the first IP address even if the hostname might have multiple IP addresses resolved.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      ===============================================
      #### Java Web Start Error:
      #### Could not load file/URL specified: http://qa.test.com:8000/jcash.jnlp
      ===============================================
      CouldNotLoadArgumentException[ Could not load file/URL specified: http://qa.test.com:8000/jcash.jnlp]
      at com.sun.javaws.Main.launchApp(Main.java:268)
      at com.sun.javaws.Main.continueInSecureThread(Main.java:219)
      at com.sun.javaws.Main$1.run(Main.java:107)
      at java.lang.Thread.run(Thread.java:619)
      ==============================================
      java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
      at java.net.Socket.connect(Socket.java:519)
      at java.net.Socket.connect(Socket.java:469)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
      at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
      at sun.net.www.http.HttpClient.New(HttpClient.java:306)
      at sun.net.www.http.HttpClient.New(HttpClient.java:323)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:837)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:778)
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:703)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1026)
      at com.sun.deploy.net.HttpUtils.followRedirects(HttpUtils.java:45)
      at com.sun.deploy.net.BasicHttpRequest.doRequest(BasicHttpRequest.java:176)
      at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(BasicHttpRequest.java:68)
      at com.sun.deploy.net.DownloadEngine.isUpdateAvailable(DownloadEngine.java:886)
      at com.sun.deploy.net.DownloadEngine.isUpdateAvailable(DownloadEngine.java:792)
      at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1505)
      at com.sun.deploy.net.DownloadEngine.getCachedFile(DownloadEngine.java:559)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:77)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:260)
      at com.sun.javaws.Main.launchApp(Main.java:263)
      at com.sun.javaws.Main.continueInSecureThread(Main.java:219)
      at com.sun.javaws.Main$1.run(Main.java:107)
      at java.lang.Thread.run(Thread.java:619)


      REPRODUCIBILITY :
      This bug can be reproduced always.

            herrick Andy Herrick (Inactive)
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: