Today I came across an unusual issue on a couple of SCCM distribution points where two particular software update packages were failing to distribute. Using the distmgr.log and the PkgXferMgr.log on the site server, as well as the Distribution Point Job Queue Manager tool, I could see that these packages were trying to distribute again and again, but returning a failure on certain files.
In the PkgXferMgr.log I found these entries repeatedly:
ExecStaticMethod failed (80041001) SMS_DistributionPoint, FinalizeContent CSendFileAction::SendContent failed; 0x80041001 Sending failed. Failure count = 2, Restart time = 24/04/2017 15:30:57 W. Europe Daylight Time
0x80041001 is a WMI error meaning “Generic failure” – not overly helpful.
So I went to the distribution point itself to investigate, and found these entries repeatedly in the smsdpprov.log
[BA4][Mon 04/24/2017 22:24:19]:MoveFile failed for \\?\C:\SCCMContentLib\DataLib\24688509-2940-44e9-9d7d-9a6c2e33c9a1.ABC002C2.temp to \\?\C:\SCCMContentLib\DataLib\24688509-2940-44e9-9d7d-9a6c2e33c9a1 [BA4][Mon 04/24/2017 22:24:19]:FileRename failed; 0x80070005 [BA4][Mon 04/24/2017 22:24:19]:CContentDefinition::Finalize failed; 0x80070005 [BA4][Mon 04/24/2017 22:24:19]:Failed to finalize content '24688509-2940-44e9-9d7d-9a6c2e33c9a1' for package 'ABC002C2'. Error code: 0X80070005
0x80070005 means “access denied”. So I browsed to the location in Explorer and sure enough:
If I try to view the Security tab on the directory, apparently I don’t have permission:
If I click Advanced, it seems we don’t have an owner, so clearly something is corrupted as the other files and directories in this location are owned by the SYSTEM account.
If I try to change the ownership in the UI, nothing happens.
So I use PSEXEC to open a cmd prompt in SYSTEM context, and try to take ownership on one of the directories, but still no joy:
Next I run Process Explorer to find if something has a handle on it, and yes, WMI does.
So I stop the WMI service, and suddenly the directory disappears!
Start the WMI service (and it’s dependencies) and then kick off the distributions again using the DP Job Queue Manager tool, and finally the packages distribute successfully 🙂