United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6640196 BackgroundDownloader dies after installation.
JDK-6640196 : BackgroundDownloader dies after installation.

Details
Type:
Bug
Submit Date:
2007-12-11
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-04-08
Component:
deploy
OS:
windows_xp,windows
Sub-Component:
deployment_toolkit
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
beta,6u10
Fixed Versions:
6u10 (b21)

Related Reports
Duplicate:
Duplicate:

Sub Tasks

Description
BackgroundDownloader dies just after installation from the b08 build.  This doesnt happen when using our own bundles using registry entry.

( CSG wide WAT  Build - http://javadl.sun.com/webapps/download/GetFile/1.6.0_10-ea-b08/windows-i586/jre-6u10-ea-windows-i586-p-iftw-k.exe) 

Where as it starts after  a java -version or any java applicaiton invocation. It is a regression introduced in b08.  Almost in all of the platform ( Vista, XP, 2K, 2003 etc) 

Install Kernel JRE 
and check ps -ef | grep java  

BackgroundDownloader will appear for around 30 sec and dies there. Invoking manually works fine.

                                    

Comments
EVALUATION

> I did some investigation, the background downloader fails and exits because we try to connect to:
>
> http://javadl.sun.com/webapps/download/GetList/1.6.0_10-b311-kernel/windows-i586/
>
> We do a HttpSendRequest (DownloadHelper.cpp, function DownloadFile) on it, and it fails with error code:
>
> ERROR_INTERNET_NAME_NOT_RESOLVED
>    12007
>
> For some reason, it only fails with the initial background downloader instance.  subsequent instance works fine.
>
> Also, I cannot reproduce the problem on my own xp machine.  But it can always be reproduced on the east coast lab machine.  

I tried with another xp lab machine in the west coast, and I cannot reproduce the problem on that machine either (both with or without proxy set).
                                     
2008-01-09
EVALUATION

SQE cannot reproduce this bug anymore in the latest PIT.  They suggest to move it to Fix-Delivered status - after the promotion build. They will verify in promotion and close the bug.
                                     
2008-01-11
EVALUATION

Marking as Fix Available so this gets verified.
                                     
2008-01-14
EVALUATION

At this point we have no reproducable testcase, and cannot reproduce.
I am reverting to incomplete untill reproducable scenerio is reached.
                                     
2008-02-12
EVALUATION

This problem only occurs when jbroker is running as SYSTEM user, which is the default case when jbroker launches by the installer after installation.   Also, the machine setup must requires proxy to connect to the internet.

That's why all the machines in SCA cannot reproduce, as all machines are directly connected to the internet now.

When the background downloader (running as SYSTEM) dies, HttpSendRequest fails and returns:

12007       ERROR_INTERNET_NAME_NOT_RESOLVED
              The server name could not be resolved.

But if we relaunch the process as Administrator (or any other admin user), it actually works.

With Ken's suggestion, we played around the argument to InternetOpen.   Current code uses INTERNET_OPEN_TYPE_PRECONFIG, which will always get the proxy settings from registry automatically.

I changed it to use INTERNET_OPEN_TYPE_PROXY, and pass in the proxy server myself.  And now it works!

So there might be a problem for InternetOpen to detect the proxy automatically when the process is associated to user "SYSTEM".

A possible fix for this bug is when we encounter 12007 from HttpSendRequest, we re-try the connection from the beginning, and call InternetOpen with INTERNET_OPEN_TYPE_PROXY and the proxy listed.  We will need to add code to query registry directly for proxy settings.

Workaround for the problem for now is to kill the jbroker that is associated with SYSTEM, and then just do a "java -version" in the command prompt again to start both jbroker and the background downloader.  This time it will work, as the user will now be administrator instead.
                                     
2008-02-15
SUGGESTED FIX

we can get IE proxy settings from registry:

HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ProxyServer

value is in format:

proxyServer:proxyPort (e.g  scaweb1.sfbay.sun.com:8080)
                                     
2008-02-22
SUGGESTED FIX

the ProxyServer registry is not available for the "SYSTEM" user.

probably that's why InternetOpen failed to get the proxy for "SYSTEM" user.

maybe we need to launch jbroker and the background download process as the admin user running the installer process; instead of launching them as "SYSTEM" user from the installer process.
                                     
2008-02-27



Hardware and Software, Engineered to Work Together