Udostępnij za pośrednictwem


Software Distribution 8041 warning

fixHere’s a problem which we’ve seen a couple of times which can be caused by bad packages in software distribution.  This problem can arise when Software Distribution is being used, and you notice that devices don’t seem to be getting packages, nor getting updated in the Software Distribution console.  As well as this, the following message is logged in the MDM event log on the Device Management Server:

Event Type:        Warning
Event Source:    Device Manager
Event ID:              8041
Description:
Software Distribution service received insufficient query results from device {DeviceSID}.
Missing LocUri ./Vendor/MSFT/SwMgmt/Download?list=StructData.

You will also notice that in the Device History tab in the ‘./Vendor/MSFT/SwMgmt/Download?list=StructData’ URI will have returned a status of ‘Failed’.

Firstly, let’s look at what this means.  ‘./Vendor/MSFT/SwMgmt/Download?list=StructData’ is part of the Download Configuration Service Provider, which you can find documented at https://msdn.microsoft.com/en-us/library/cc563003.aspx.  This is described as “Parent characteristic for the components that are ready to download or are in the process of downloading”.  So this stores information about packages which are in the process of being distributed, before they have finished installing.

The Device management server is requesting this information, so it can know which packages are in the process of being downloaded.  In this situation, the data returned is showing an error – so we know the problem occurs on the mobile device itself when we ask for this info.

This situation can typically occur in situations such as:
- A package is distributed which requires user interaction, for example to click a button or agree to some terms.  If the user cancels this or ignores it, the install may fail.
- A package is distributed which restarts the mobile device forcefully, before the install process has completely finished.

When a scenario like these happens, the package distribution process doesn’t finish installing the software and cleaning up the download list.  Therefore, the device gets left in a state where the software installer has finished, but the data at ‘./Vendor/MSFT/SwMgmt/Download?list=StructData’ hasn’t been cleared up.  We then get left with some orphaned information left in the download list, which causes the error which you see on the Device Management Server.

How to fix it

To stop the error & to get software distributing again, you need to do two things.  Firstly, you need to clear up that orphaned data, then check your software packages to see which is the culprit.
To clear up the download list, we can use some provisioning XML:
- Download the _Setup.xml file which is attached to this entry
- Use ‘makecab.exe’ to convert this into a .cab file.  The easiest way to do this is to load up the Visual Studio 2008 Command Prompt and run:
o Makecab _setup.xml SWDist.cab
- Now you need to install this cab on the devices.  The easiest way to do this is to import the cab into the SCMDM Software Distribution console.
- Once it’s imported, click on the ‘File Information’ button & copy out the ‘File URI’.
- Email this link out to the mobile devices, click it & run the file!

After this has been applied to the devices, you should see software distribution working again & ‘./Vendor/MSFT/SwMgmt/Download?list=StructData’ will start reporting success in the MDM console.  Remember to go and test out your packages afterwards!

Please note:  As this change removes information about packages which are downloading, this process shouldn’t be done at the same time a new software deployment is being pushed out.
Rob Davies | Senior Support Engineer

_setup.xml