search cancel

Package stuck in "Retrying Download", Cannot access file errors on Package Server: The version of the package on the server xxx is older than required xxx (0x80004005)

book

Article ID: 163475

calendar_today

Updated On:

Products

IT Management Suite Patch Management Solution

Issue/Introduction

A package such as the "Windows System Assessment Scan" will not run because it cannot download. The download history of the package will show many attempts to retry the download and will show a source location that can be accessed and downloaded through a browser or explorer. 

Error from Client Agent log:

PackageDelivery
AeXPackageDelivery.dll
Error while downloading package: The version of the package on the server(1601867730) is older than required(1601954124) (0x80004005)
AeXNSAgent.exe

 

Error from Package Server Agent log:

Failed to perform file operation ‘create’ on “...\Altiris Agent\Package Delivery\{6d417916-467c-46a7-a870-6d86d9345b61}\snapshot.xml” with retries: The process cannot access the file because it is being used by another process (0x00000020)

Or just if as package server itself can provide this package to itself:

Error while downloading package: The version of the package on the server(1601867730) is older than required(1601954124) (0x80004005)

Cause

Unknown but possibly another computer is trying to download the files and has somehow locked them, similar to a situation that can happen on the SMP server.

Environment

ITMS 8.x

Resolution

Rebooting the Package Server should stop the problem if it is caused by another computer trying to download the files.

If that does not resolve the problem locate the package folder on the package server and delete the Snapshot.xml file. This may require elevating permissions in a command prompt by using psexec. Open the agent on the package server and try to redownload or check integrity on the problem package to recreate the Snapshot.xml file.

Steps:

1. Make sure that the database has the right package version. Check that SWDPackage, SWDPackageCodebase, SWDPackageServer tables have the right entries, especially the package version.

select * from SWDPackage
where packageid = '6D417916-467C-46A7-A870-6D86D9345B61'

select * from SWDPackageCodebase
where packageid = '6D417916-467C-46A7-A870-6D86D9345B61'

select * from SWDPackageServer
where packageid = '6D417916-467C-46A7-A870-6D86D9345B61'

2. Then, clean up the package snapshot references on the SMP (so, when the package server requested the package again, it could get a clean version of it):

a) Navigate to where the package snapshots are stored; "C:\ProgramData\Symantec\SMP\Snapshots"

b) Locate the GUID associated with the package you are looking to recreate the codebase for, in this case {6D417916-467C-46A7-A870-6D86D9345B61}

c) Locate the '.xml' and '.sig' files for this GUID, then delete the two files

d) Next, open up Windows Task Scheduler from Start>Administrative Tools>Task Scheduler, and run "NS.DistributionPointUpdateSchedule" and "NS.PackageRefresh". These schedules can take some time to run so either wait for these schedules to kick off on their predetermined schedule or do this during a time when other processes are not using resources on the Notification Server.

e) Verify the new '.xml' and '.sig' files for that GUID are created in "C:\ProgramData\Symantec\SMP\Snapshots"

3. Clean up the package reference from the agent Secure Storage on your Package Server (depending where you see the issue, if it is on a client machine, you may need to apply the same principles on the client machine described below):

a) In order to delete the package information from Secure Storage, need to be able to access Secure Storage. For that will need to create and enable troubleshooting password from SMP console:

i. In SMP console access Settings->Agents/Plug-ins->Symantec Management Agent->Settings->Global Agent Settings

ii. Place checkmark on "Allow remote troubleshooting" and input password of your choice and click Save

iii. Update agent configuration on the package server to receive the "remote troubleshooting" password. 

b) We needed to copy SMATool.exe from the SMP server to the package server, as well Microsoft's PsExec:

i. Locate SMATool (...\Program Files\Altiris\Notification Server\Bin\Tools) and copy it to where your PsExec tool located on the package server.

ii. Start CMD with Admin privileges and navigate to PsExec tool directory

iii. Start PsExec via the following command "psexec -i -s cmd.exe". New CMD will open running under "nt authority\system" account (to check type "whoami" command). Go to Properties of new CMD and in Layout tab modify Screen buffer size Height to higher number (9999) to see all of the screen output

iv. Navigate to the same directory as PsExec tool and SMATool and issue the following commands:

            a) "net stop aexnsclient" to stop Symantec Management Agent to unlock locking handles from Secure Storage to be able to make necessary modifications

            b) "iisreset /stop" to stop IIS service

            c) delete the package reference from "Software Delivery" and "Package Delivery" folders in the Secure Storage with the following command:

Smatool.exe /storage delete  "Software Delivery\{6D417916-467C-46A7-A870-6D86D9345B61}"
Smatool.exe /storage delete  "Package Delivery\{6D417916-467C-46A7-A870-6D86D9345B61}"  

             d) You should be prompted for the "remote troubleshooting" password. Type it and click Enter.       

Notice!!! Deleting a specific package entry from Software Delivery and Package Delivery repository in Secure Storage will not remove files from "...\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery" and "...\Program Files\Altiris\Altiris Agent\Package Delivery" directories. It will only remove information about those packages from SMP.

  e) Delete the snapshot.xml file for the {6D417916-467C-46A7-A870-6D86D9345B61}. While in the psexec window that you opened to run smatool.exe, navigate to "Program Files\Altiris\Altiris Agent\Package Delivery\{6D417916-467C-46A7-A870-6D86D9345B61}" and from inside of that directory run:
                         
                   del snapshot.xml

Note: if you get "The program cannot access the file because it is being used by another process", that means that there is something holding the file, which is possibly the reason why the file was not updated with the current package version from the SMP. In order to unblock the file, you could try to use Powershell:

i) Use Get-SmbOpenFile to display all of the open files on your package server. In this case you should see that 99% of the results displayed would be referencing to this "Program Files\Altiris\Altiris Agent\Package Delivery\{6D417916-467C-46A7-A870-6D86D9345B61}" path

Note: you could use a command like this one to save what was returned:
Get-SmbOpenFile > "c:\SMBoutput.txt"

ii) Then use Close-SmbOpenFile  to close those connections. You can try the following for example to release the connection to snapshot.xml file:

                       Close-SmbOpenFile -FileId 4415226383589

Note: The following command can close all SMB connection opened on the package server.

Get-SMBOpenFile | Close-SmbOpenFile -Force 

or you could try a command like this one just to close any connection that could be using the snapshot.xml file:

Get-SmbOpenFile |Where-Object -Property ShareRelativePath -Match "snapshot.xml" |Close-SmbOpenFile -Force

Note: other good reference is this online article: How to View and Close Open Files in Windows Server SMB Share?

iii) try again del snapshot.xml

  f)  net start aexnsclient - to start SMA back
  g) iisreset /start - to start IIS

4. Open SMA window on your package server and manually request Update Configuration. In Package Server tab, click on "Check integrity" and "Resend status" for the Windows System Assessment Scan package and after few minutes go to Software Delivery tab and run the Windows System Assessment Scan task to revalidate the package.

 

8. At this point the client portion of the package server should get the Assessment scan policy and start downloading package that is assigned for it.

9. Navigate back to SMP console and disable Troubleshooting Password 

 

Note: If the issue with the snapshot.xml comes back and the SMB connections keep locking the file up for being able to be modified, you may want to consider disabling UNC codebases for that Package Server. In that way, the Package Server will only need to keep HTTP/HTTPS connections to the file rather than SMB ones for the UNC codebases. You can do this under the Global Package Service Settings (Settings>Notification Server>Site Server Settings and then under Site Management>Site Server Settings>Package Service>Package Service Settings) or just on individual Package Servers (Settings>Notification Server>Site Server Settings and then under Site Management>Site Server Settings>Site Servers>select desires Package Server and click on Package Service>Custom Settings section>Override them by custom settings, uncheck "Publish UNC Codebase" option and turn it ON)

 

Attachments