PkgXferMgr.log: CSendFileAction::SendContent failed; 0x80041001

I came in this morning to find a package that was distributed overnight had failed to distribute to one distribution point.  Checking the PkgXferMgr.log, I saw:

ExecStaticMethod failed (80041001) SMS_DistributionPoint, FinalizeContent
CSendFileAction::SendContent failed; 0x80041001

Checking the log file smsdpprov.log on the distribution point, it showed 0x80070002 (ERROR_FILE_NOT_FOUND):

[4A0][Wed 03/13/2024 19:06:17]:CreateFileW failed for K:\SCCMContentLib\FileLib\0182\01826CBC5986BB6108A23578DD01A63E2E99C7ADFC64DD5CB367062AA192B937.SIG
[4A0][Wed 03/13/2024 19:06:17]:FileOpen failed; 0x80070002
[4A0][Wed 03/13/2024 19:06:17]:FileAddToTar failed; 0x80070002
[4A0][Wed 03/13/2024 19:06:17]:CContentDefinition::PackSignatures failed; 0x80070002
[4A0][Wed 03/13/2024 19:06:17]:CContentDefinition::CreatePackedSignature failed; 0x80070002
[4A0][Wed 03/13/2024 19:06:17]:Failed to create packed signatures for content '116B2AD4-07E0-4E66-BA32-F996AAA6B7F7' for package 'XYZ02546'. Error code: 0X80070002

I looked at the folder K:\SCCMContentLib\FileLib\0182 and the SIG file was indeed missing:

I tried a few things – I verified the site server could write to the folder, restarted the copy job, removed and readded the package, restarting the winmgmt service on the DP, all to no avail.

There were no errors in the event log on the DP, so I decided to delete the 0182 folder and try the distribution again:

Once I restarted the distribution, it completed without errors:

I validated the content for good measure, and it came back successful:

Problem solved!

ConfigMgr: SQL query to find the DNS server addresses for a domain

I was asked to find all the DNS server addresses that were being used in a certain domain.  By using DNSServerSearchOrder0 in v_GS_NETWORK_ADAPTER_CONFIGUR I was able to generate a list of IP addresses, but they are comma delimited:

declare @SearchDomain varchar (100) = 'ABC.DEF.LOCAL';

select nac.ResourceID, nac.DNSServerSearchOrder0
from v_GS_NETWORK_ADAPTER_CONFIGUR nac
inner join v_r_system s on s.ResourceID = nac.ResourceID
where s.Full_Domain_Name0 = @SearchDomain
and nac.DNSServerSearchOrder0 is not null

I remembered having to convert comma-delimited rows to columns before, so I modified that query for this situation.

declare @SearchDomain varchar (100) = 'ABC.DEF.LOCAL';

with DNSData as (
select nac.ResourceID, nac.DNSServerSearchOrder0
from v_GS_NETWORK_ADAPTER_CONFIGUR nac
inner join v_r_system s on s.ResourceID = nac.ResourceID
where s.Full_Domain_Name0 = @SearchDomain
and nac.DNSServerSearchOrder0 is not null
)

, DNSRows as (
select
SelectedData.ResourceID
, trim (ParsedData.ElementValue.value ('.', 'varchar (100)')) [DNSServer]
from
(
select
ResourceID
, DNSServerSearchOrder0
, cast ('<DNSServer>' + REPLACE(DNSServerSearchOrder0, ',', '</DNSServer><DNSServer>') + '</DNSServer>' as xml) XMLString
from DNSData
) SelectedData
outer apply SelectedData.XMLString.nodes ('/DNSServer') ParsedData (ElementValue)
)

select DNSServer, count (*) [Count] from DNSRows
group by DNSServer
order by DNSServer

PkgXferMgr.log: ExecStaticMethod failed (80070016) SMS_DistributionPoint, AddFile

Reviewing the distribution of a package, I came across the following in the PkgXferMgr.log:

ExecStaticMethod failed (80070016) SMS_DistributionPoint, AddFile
CSendFileAction::AddFile failed; 0x80070016
Failed to add the file access-x-none.cab in content 17548160-600a-4903-9776-89f3143e0e50. Error 0x80070016
CSendFileAction::AddFileMetaData failed; 0x80070016
CSendFileAction::SendFiles failed for path access-x-none.cab. Error code = 0x80070016
CSendFileAction::SendContent failed; 0x80070016
Sending failed. Failure count = 2, Restart time = 3/4/2024 2:56:26 PM -0500

Checking the smsdpprov.log on the destination distribution point, it shows:

[12FC][Mon 03/04/2024 14:26:27]:_wfopen_s() failed for \\?\E:\SCCMContentLib\DataLib\17548160-600a-4903-9776-89f3143e0e50.XYZ01A40.temp\access-x-none.cab.INI.000582c4 with error 22
[12FC][Mon 03/04/2024 14:26:27]:WritePrivateProfileStringW failed for \\?\E:\SCCMContentLib\DataLib\17548160-600a-4903-9776-89f3143e0e50.XYZ01A40.temp\access-x-none.cab.INI
[12FC][Mon 03/04/2024 14:26:27]:ProfileWriteStringEx failed; 0x80070016
[12FC][Mon 03/04/2024 14:26:27]:ProfileWriteHexIntEx failed; 0x80070016
[12FC][Mon 03/04/2024 14:26:27]:CContentDefinition::AddFile failed; 0x80070016
[12FC][Mon 03/04/2024 14:26:27]:Failed to add file 'access-x-none.cab' to content library. Error code: 0X80070016

Checking the file in the destination distribution point SMS_DP$ share, I get an error “File not found”, even when it should show a listing of files:

C:\Users\_tdurning\Client>dir \\DistributionPoint.DomainName\E$\SCCMContentLib\DataLib\1*
Volume in drive \\DistributionPoint.DomainName\E$ is New Volume
Volume Serial Number is BABD-7F1E

Directory of \\DistributionPoint.DomainName\E$\SCCMContentLib\DataLib

01/09/2024 08:29 PM <DIR> 10005a2d-a292-4c71-a0ec-4d7221b67be7
File Not Found

C:\Users\_tdurning\Client>

Seems like disk errors.  Sure enough, checking the event log on the distribution point:

I put the distribution point in maintenance mode, scheduled a chkdsk for the next reboot, and restarted the server.

C:\WINDOWS\system32>chkdsk /r E:
The type of the file system is NTFS.

Chkdsk cannot run because the volume is in use by another
process. Chkdsk may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N) n

Chkdsk cannot run because the volume is in use by another
process. Would you like to schedule this volume to be
checked the next time the system restarts? (Y/N) y

This volume will be checked the next time the system restarts.

C:\WINDOWS\system32>

During the reboot…

4 ½ hours later…

Retrying the distribution, smsdpprov.log shows:

[13C8][Tue 03/05/2024 08:10:58]:Content '17548160-600a-4903-9776-89f3143e0e50' for package 'XYZ01A40' has been added to content library successfully

Probably should run a full content validation on the server, see what else may be hosed.