Discussion:
Neverending Transient Error
(too old to reply)
Edward
2005-05-05 09:28:07 UTC
Permalink
Hi I'm using BITS in my program to download files. The bits code works
on most machines but fails on a certain test machine. I've traced the
problem to a neverending BG_JOB_STATE_TRANSIENT_ERROR. Calling
IBackgroundCopyJob::Resume doesn't seem to continue the download.

Here is a pseudo code of the download loop: [Note this is done on a
worker thread]

while( !m_userCancelledDownload ) {
m_downloadJob->GetState( &jobState );

if( jobState == BG_JOB_STATE_TRANSFERRED ) {
break;
}
else if( jobState == BG_JOB_STATE_TRANSIENT_ERROR ) {
m_downloadJob->Resume();
}
// handle other specific conditions

::Sleep( pollingLength );
}

That code is a stripped down version, minus all status setting code.
That code works fine except on one machine and I traced the problem
down to a jobState that was continuously returning
BG_JOB_STATE_TRANSIENT_ERROR. The machine in question is running
Win2k.sp4. Any ideas what could be wrong?

Thanks,
Edward
Edward
2005-05-05 09:41:15 UTC
Permalink
Another observation I've made is none of the bits??.tmp files are
appearing in the target directory of the download.
Edward
2005-05-06 04:18:03 UTC
Permalink
I used BitsAdmin.exe to diagnose the problem and under DHCP
configuration I was getting:
ERROR CODE: 0x80072ee7 - The server name or address could not be
resolved
ERROR CONTEXT: 0x00000005 - The error occurred while the remote file
was being processed.

When the machine's configuration was changed to static BITS could
proceed with the downloads. I would like to know if there are any
limitations to the client machine's configuration where BITS would not
work.

Thanks,
Edward
Narayana Mahankali [MSFT]
2005-05-09 20:16:56 UTC
Permalink
There are no limitations imposed by BITS on IP address configuration. You
were probably getting the error under DHCP configuration because of DNS
problems. Check if you could resolve the fully qualified name of the server
by pinging it from the client machine.

By the way, you don't need to resume a job entering into a transient error.
BITS will automatically do this for you guided by the parameter
MinimumRetryDelay
(http://msdn.microsoft.com/library/en-us/bits/bits/ibackgroundcopyjob_setminimumretrydelay.asp).
The default retry delay is 10 minutes. You can reduce it if you want BITS to
retry often using the API pointed to by the above link.
--
Narayana Mahankali
Microsoft, BITS

This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Post by Edward
I used BitsAdmin.exe to diagnose the problem and under DHCP
ERROR CODE: 0x80072ee7 - The server name or address could not be
resolved
ERROR CONTEXT: 0x00000005 - The error occurred while the remote file
was being processed.
When the machine's configuration was changed to static BITS could
proceed with the downloads. I would like to know if there are any
limitations to the client machine's configuration where BITS would not
work.
Thanks,
Edward
Edward
2005-05-10 09:06:00 UTC
Permalink
Hi Narayana,

It was indeed a problem with the DNS. I'm wondering as to why BITS was
not able to download the file whereas the browsers could download the
file in that machine?

Thanks for the tip on SetMinimumRetryDelay, I'll use that instead of
resume.

Thanks,
Edward

Loading...