O R G A N I C / F E R T I L I Z E R: sccm: client stuck downloading package with bit .tmp files in cache directory

Apr 15, 2011

sccm: client stuck downloading package with bit .tmp files in cache directory

honestly, it's very early (by my standards). my creativity is not quite awake yet hence the very bad subject name of this post. I can't really find a good error message that would capture the essence of this problem. so... I guess you'll just have to read my rambling instead.

let's get started. when this problem spurs up it looks as if the client is attempting to download the package but never gets anywhere with it. what's the first thing any sccm admin does? read logs, yes. one of the best ways I've found of reading logs is to start by running a search against the logs directory and dumping out anything matching the package id, advertisement id, etc to a new txt file. this is what I found.

in the cas.log, the client is clearly getting the policy and location of the package.

Matching DP Location found 0 - \\mySMSServer\SMSPKGC$\XYZ00017\
Requesting content XYZ00017.1, size(KB) 60833, under context S-0-0-00-1111111111-1111111111-111111111-111111 with priority Low
Target location for content XYZ00017.1 is C:\WINDOWS\system32\CCM\Cache\XYZ00017.1.S-0-0-00-1111111111-1111111111-111111111-111111

datatransferservice.log is pretty busy too setting up directories.

Created directory 'C:\WINDOWS\system32\CCM\Cache\XYZ00017.1.S-0-0-00-1111111111-1111111111-111111111-111111\Lang/zh-TW'.

I think that gives us enough to go on. there's stuff in execmgr.log and policyevaluator.log, but we're all familiar with those by now. instead, I started looking at the conditions about this problem. so far I knew that the client was getting the policy and beginning the process to the point that it started creating directories but never going any further. I went to the directory highlighted above and noticed that the entire directory structure was there but no actual content. instead, there were a bunch of BIT*.TMP files.

I happened across this post on technet which explained quite vividly the problem at hand. I looked at the iis logs to determine if there was a transfer problem to the client. I found this in the logs (again by searching for the package id):

2011-04-14 15:16:28 192.168.0.2 HEAD /SMS_DP_SMSPKGC$/XYZ00017/Graphics/Gfxres.he-IL.resources - 80 - 192.168.0.3 Microsoft+BITS/6.7 404 7 0 60

okay, now we're getting somewhere. what do we with that though? well, the http codes specific to iis7 are in this kb article. in this case, I was looking for 404.7. here's how it maps back:

...
404.3 - MIME type restriction.
404.4 - No handler configured.
404.5 - Denied by request filtering configuration.
404.6 - Verb denied.
404.7 - File extension denied.
404.8 - Hidden namespace.
404.9 - File attribute hidden.
...

so, it's not your usual 404 (not talking about the ATL either).

as it turns out, the applicationHost.config file contains a section called <requestFiltering> that blocks certain extension types. by modifying this section of the .config file, it will allow the transfer of these file types over http -- exactly what BITS is using to transfer.

...
<requestFiltering>
<fileExtensions allowUnlisted="true" applyToWebDAV="true">
<add fileExtension=".asax" allowed="false" />
<add fileExtension=".ascx" allowed="false" />
<add fileExtension=".master" allowed="false" />
<add fileExtension=".skin" allowed="false" />
<add fileExtension=".browser" allowed="false" />
<add fileExtension=".sitemap" allowed="false" />
<add fileExtension=".config" allowed="false" />
<add fileExtension=".cs" allowed="false" />
<add fileExtension=".csproj" allowed="false" />
<add fileExtension=".vb" allowed="false" />
<add fileExtension=".vbproj" allowed="false" />
<add fileExtension=".webinfo" allowed="false" />
<add fileExtension=".licx" allowed="false" />
<add fileExtension=".resx" allowed="false" />
<add fileExtension=".resources" allowed="false" />
<add fileExtension=".mdb" allowed="false" />
<add fileExtension=".vjsproj" allowed="false" />
<add fileExtension=".java" allowed="false" />
<add fileExtension=".jsl" allowed="false" />
<add fileExtension=".ldb" allowed="false" />
<add fileExtension=".dsdgm" allowed="false" />
<add fileExtension=".ssdgm" allowed="false" />
<add fileExtension=".lsad" allowed="false" />
<add fileExtension=".ssmap" allowed="false" />
<add fileExtension=".cd" allowed="false" />
<add fileExtension=".dsprototype" allowed="false" />
<add fileExtension=".lsaprototype" allowed="false" />
<add fileExtension=".sdm" allowed="false" />
<add fileExtension=".sdmDocument" allowed="false" />
<add fileExtension=".mdf" allowed="false" />
<add fileExtension=".ldf" allowed="false" />
   <add fileExtension=".ad" allowed="false" />
<add fileExtension=".dd" allowed="false" />
<add fileExtension=".ldd" allowed="false" />
<add fileExtension=".sd" allowed="false" />
<add fileExtension=".adprototype" allowed="false" />
<add fileExtension=".lddprototype" allowed="false" />
<add fileExtension=".exclude" allowed="false" />
<add fileExtension=".refresh" allowed="false" />
<add fileExtension=".compiled" allowed="false" />
<add fileExtension=".msgx" allowed="false" />
<add fileExtension=".vsdisco" allowed="false" />
<add fileExtension=".asa" allowed="false" />
...

in my case, it was .resources. make the change, initiate iis reset, and away you go.