Issues with BITS
Applies To: Windows Server 2003 with SP2, Windows Server Update Services
Background Intelligent Transfer Service (BITS) is the service used by WSUS to download updates from Microsoft Update to the main WSUS server, as well as from WSUS servers to their clients. BITS also supports the transfer of files between peer computers in a domain.
Some download issues may be caused by problems with running BITS on the server or client computers. When you are troubleshooting download problems, after you have verified that all WSUS settings are correct on both the server and its clients, you should ensure that BITS is running properly on all affected computers.
BITS provides a downloadable tool called bitsadmin that allows you to verify and change BITS settings. For more information about the bitsadmin utility, see BITSAdmin Tool (https://go.microsoft.com/fwlink/?LinkId=80934). This tool is available as part of the Windows Vista operating system, and also as part of the Windows XP Service Pack 2 Support Tools.
To find the BITS service, open a command shell and type:
sc query bits
If BITS is running, you should see output like the following:
SERVICE_NAME: bits
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
If BITS is not running, you should see output like the following:
SERVICE_NAME: bits
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 1 STOPPED
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
Often it is possible to resolve BITS issues simply by stopping the service and restarting it. The following procedure shows how to stop and restart the service from the command line. You must be logged on as a local administrator to stop and restart BITS.
Note
To modify, stop, or restart BITS, you must be logged on as an administrator.
Open a command shell.
Type sc stop bits
Type sc start bits
The following sections are an incomplete list of possible problems with BITS configuration. To get more information about BITS, see Background Intelligent Transfer Service (https://go.microsoft.com/fwlink/?LinkId=81083).
By default BITS runs under the LocalSystem account.
Open a command shell.
Type:
sc config bits obj= LocalSystem
(note that a space must occur between
obj=
andLocalSystem
)Verify that output from the command is:
[SC] ChangeServiceConfig SUCCESS
Stop and restart BITS.
- BITS supports HTTP and HTTPS downloads and uploads and requires that the server support the HTTP 1.1 protocol. For downloads, the HTTP server's HEAD method must return the file size, and its GET method must support the Content-Range and Content-Length headers. BITS can use an HTTP/1.0 server as long as it meets the HEAD and GET method requirements (MIME headers must include the standard Content-Range and Content-Type headers plus a maximum of 180 bytes of other headers, and a maximum of two CR/LF characters may occur between the HTTP headers and the first boundary string).
To detect or correct a mismatch between the per-user job limit and the per-computer job limit specified through Group Policy
Run gpedit.msc, if the policy is specified locally; if the policy is a domain policy edit the Group Policy object with GPMC.
In the Group Policy Object Editor, navigate to Computer Configuration\Administrative Templates\Network\Background Intelligent Transfer Service (BITS).
Ensure that the setting "Maximum number of BITS jobs for each user" is set to a lower value than the setting "Maximum number of BITS jobs for this computer"
Type gpupdate /force
Stop and restart BITS.
Verify that there are no errors in the event logs.
If BITS jobs fail, look in the event log to find errors. You can use the following table to diagnose the cause of the errors.
Error name | Error code | Description |
---|---|---|
E_INVALIDARG |
0x80070057 |
An incorrect proxy server name was specified in the user’s Internet Explorer proxy settings. This error is also seen when credentials are supplied for authentication schemes that are not NTLM/Negotiate, but the user name or password is null. Change the user’s IE settings to be a valid proxy server or Change the credentials not to be NULL user name/password for schemes other than NTLM/Negotiate. |
ERROR_WINHTTP_NAME_NOT_RESOLVED |
0x80072ee7 |
The server/proxy could not be resolved by BITS. Internet Explorer on the same machine in the context of the job owner would see the same problem. Try downloading the same file via the web browser using the context of the job owner. |
ERROR_HTTP_INVALID_SERVER_RESPONSE |
0x80072f78 |
This is a transient error and the job will continue downloading. |
BG_E_INSUFFICIENT_RANGE_SUPPORT |
0x80200013 |
BITS uses range headers in HTTP requests to request parts of a file. If the server or proxy server doesn’t understand Range requests and returns the full file instead of the requested range, BITS puts the job into the ERROR state with this error. Capture the network traffic during the error and examine if HTTP GET requests with “Range” header are getting valid responses. Check proxy servers to ensure that they are configured correctly to support Range requests. |
BG_E_MISSING_FILE_SIZE |
0x80200011 |
When BITS sends a HEAD request and the server/proxy does not return Content-Length header in the response, BITS puts the job in ERROR state with this error. Check the proxy server and WSUS server to ensure that they are configured correctly. Some versions of the Apache 2.0 proxy server are known to exhibit this behavior. |
BG_E_HTTP_ERROR_403 |
0x80190193 |
When the server returns HTTP 403 response in any of the requests, BITS puts the job in ERROR state with this error code. HTTP 403 corresponds to “Forbidden: Access is denied." Check access permissions for the account running the job. |
ERROR_NOT_LOGGED_ON |
0x800704dd |
The SENS service is not receiving user logon notifications. BITS (version 2.0 and up) depends on logon notifications from Service Control Manager, which in turn depends on the SENS service. Ensure that the SENS service is started and running correctly. |
If the BITS service fail to start, use the following table to diagnose the cause of the error.
ERROR_SERVICE_DOES_NOT_EXIST |
0x80070424 |
See the section on repairing the BITS configuration below. |
ERROR_SERVICE_NOT_IN_EXE |
0x8007043B |
BITS is not listed as one of the services in the netsvcs svchost group (does not apply to Windows 2000). |
ERROR_SERVICE_DISABLED |
0x80070422 |
BITS has been disabled. Enable the BITS service. |
ERROR_SERVICE_DEPENDENCY_DELETED ERROR_SERVICE_DEPENDENCY_FAIL |
0x80070433, 0x8007042c |
A service appearing in the BITS service dependency list cannot be started. Make sure the dependency list for the BITS service is correct:
|
ERROR_PATH_NOT_FOUND |
0x80070003 |
Pre-Windows Vista: %ALLUSERSPROFILE%\Microsoft\Network doesn’t exist |
ERROR_FILE_NOT_FOUND |
0x80070002 |
The “Parameters” key is missing. Ensure that the following keys and values exist: HKLM\SYSTEM\CurrentControlSet\Services\BITS\Parameters\ServiceDll= %SystemRoot%\System32\qmgr.dll |
REGDB_E_CLASSNOTREG, EVENT_E_INTERNALERROR |
0x80040154, 0x80040206 |
BITS for Windows 2000 is dependent on SENS and EventSystem services. If the COM+ catalog is corrupted, BITS may fail with this error code. See KB article Q315296 for details. |
To repair corrupted BITS service configuration, you can enter the BITS service configuration manually.
Important
This action should only be taken in circumstances where all other troubleshooting attempts have failed. You must be an administrator to modify the BITS configuration.
Open a command shell.
Type:
Sc config bits binpath=”%systemroot%\system32\svchost.exe –k netsvcs“ Sc config bits depend = RpcSs EventSystem
Sc config bits start=delayed-auto
Sc config bits type=interact
Sc config bits error=normal
Sc config bits obj=LocalSystem
Sc privs bits privileges=SeCreateGlobalPrivilege/SeImpersonatePrivilege/SeTcbPrivilege/SeAssignPrimaryTokenPrivilege/SeIncreateQuotaPrivilege
Sc sidtype bits type= unrestricted
Sc failure bits reset= 86400 actions=restart/60000/restart/120000
Stop and restart BITS.