Thursday, July 14, 2016

Software Update Download Folder Missing

I was going through the component status logs in ConfigMgr today, and I noticed that  SMS_DISTRIBUTION_MANAGER was in critical.


Error 2306 and 2302 repeating
The source directory "\\sc1\DeploymentPackages\DP - Critical\e22c62da-b0e7-4e78-bbc3-6d5213ce7b5d" for package "4000000B" does not exist. The operating system reported error 2: The system cannot find the file specified.

I ran this command to verify that the directory was not there: gci '\\sc1\DeploymentPackages\DP - Critical\' | ? {$_.name -like "*e22c*"}
 which confirmed that it was missing. This wasn't likely going to be a permissions issue, so I set out to google to find the cause. Luckily, I found some others who had the same issue.  

Turns out, the database thinks that the update is downloaded and is part of the package, but it isn't. 

To fix the issue, we need to find the update that isn't there, and then delete it from the distribution point. 

For the most part, the article from Ken Brumfield worked for me, but I had to make a few changes in the SQL script he had for it to work. Without his blog, I probably would have just scrapped the Deployment Package and built a new one (which would probably work in theory).  https://blogs.technet.microsoft.com/ken_brumfield/2013/01/10/troubleshooting-sccm-software-update-deployment-package-distribution-due-to-missing-directories/ 


DECLARE
@MissingSourceDirectory
NVARCHAR(512)
DECLARE
@PackageId
NVARCHAR(8)
SET
@MissingSourceDirectory =
'e22c62da-b0e7-4e78-bbc3-6d5213ce7b5d'
SET
@PackageId
= '4000000B'

SELECT
CASE
        WHEN
--ci.BulletinID LIKE
--”
--OR ci.BulletinID IS
ci.BulletinID IS NULL
THEN
'Non Security Update'
        ELSE ci.BulletinID
        END
As
BulletinID
    , ci.ArticleID
    , loc.DisplayName
    , loc.Description
    , ci.IsExpired
    , ci.DatePosted
    , ci.DateRevised
    , ci.Severity
    , ci.RevisionNumber
    , ci.CI_ID
FROM dbo.v_UpdateCIs
AS
ci
LEFT
OUTER
JOIN dbo.v_LocalizedCIProperties_SiteLoc
AS
loc
ON
loc.CI_ID = ci.CI_ID
WHERE ci.CI_ID IN
(
    SELECT [FromCI_ID]
    FROM
[dbo].[CI_ConfigurationItemRelations]
cir
    INNER
JOIN [dbo].[CI_RelationTypes]
rt
ON
cir.RelationType = rt.RelationType
    WHERE
cir.ToCI_ID IN
    (
        SELECT
CI_ID
        FROM
[dbo].[CI_ContentPackages]
cp
        INNER
JOIN [dbo].[CI_ConfigurationItemContents]
cic
ON
cp.Content_ID = cic.Content_ID
        WHERE
cp.ContentSubFolder = @MissingSourceDirectory AND cp.PkgID = @PackageId
    )
)


Running the above script for me would return the update in question. For me, it returned this:

Once you have the update number, navigate to Software Library -> Deployment Packages -> Right click the Deployment Package that is missing the update and click Show Members.
In the following window, search for the updates that weren't downloaded delete them.

After they have been deleted, you can go back into All Software Updates, search for them again, and download them back into the Deployment Package.

You can verify afterwards if the affected directory is found. 
Hopefully the newer versions of SCCM coming out in September will have some better validation features on the DPs. 

No comments:

Post a Comment