Client Management Suite

Expand all | Collapse all

Failed to download package: Bad Hash (0x80090002)

  • 1.  Failed to download package: Bad Hash (0x80090002)

    Posted 10-25-2019 12:37 AM

    I created an MSI and added it to a new software release. I distributed it to all the site servers and deployed it to 3 computers along with my test computer. I had to change the MSI later on, so I had to rebuild it. I deleted the msi from the Software Library via the GUI and added my modified version. I re-distributed the package again. I normally run a SQL query to see if the package is ready:

    SELECT rrsp.Name,sps.Status,vc.Name FROM RM_ResourceSoftware_Package rrsp
    JOIN SWDPackageServer sps ON sps.PackageId = rrsp.Guid
    JOIN vComputer vc ON vc.Guid = sps.PkgSvrId
    WHERE rrsp.Name like '<%Package name%>'
    order by rrsp.Name

    When I deployed it to my test machine again I got the message in the logs:

    PackageDownload    AeXPackageDelivery.dll    AeXNSAgent.exe    Failed to download package '{55555-3333-6666-7777-abcdefabcdef}' from: \\<SoftwareLibraryShare>\55555-3333-6666-7777-abcdefabcdef, local blocks: 0/1, error: Bad Hash (0x80090002)

    PackageDownload    AeXPackageDelivery.dll    AeXNSAgent.exe    Failed to download package '{55555-3333-6666-7777-abcdefabcdef}' from: https://ns.domainname.com/Altiris/PackageShare/pkggroup_425uvxgmqczq7rghg8lxe9hmkyb2wbjh/c3e8aef3-7d33-4735-a971-2f575734e238, local blocks: 0/1, error: Bad Hash (0x80090002) 

    I checked the sig and snapshot for that package on the NS and matched it with the same package on the package server. They both matched, but when I checked the same data on the endpoint via C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery\{55555-3333-6666-7777-abcdefabcdef}, everything is from the first time I deployed the MSI. Also, when the file gets downloaded, the MSI has 0 bytes and the task fails because it took longer than expected. I deployed it throughout the day and still the same issue. If I deploy it to a computer that never had the software, it deploys just. Any insight as to why this is happening and how to resolve it?

    I have tried to delete the folder struction where the MSI is downloaded to and also deleted the whole folder C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery\{55555-3333-6666-7777-abcdefabcdef}. I noticed when I did that the folder {55555-3333-6666-7777-abcdefabcdef} never regenerates in C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery.



  • 2.  RE: Failed to download package: Bad Hash (0x80090002)

    Posted 10-28-2019 02:57 AM

    Hi WSH_vly01!

    The fact that the snapshots on the NS and PS  are updated to the new version is good, means the package information was refreshed on the NS and reached the PS and the PS is now ready to serve that renewed package. But when distributing packages there not only package delivery logic involved but also a software delivery plug-ins step into play. The Software Delivery (Managed or Quick) has their own policy which shows which version of the package is to be distributed. It could happen that the Software Delivery policy on the client machine was not refreshed and still wants the package of version e.g."1" but the NS and PS already has only the version "2". Then Software Delivery will "ask" the package download engine for package with version "1" and package delivery will see that version "1" metadata is present and has been already downloaded, so it won't download the new metadata from NS and PS and step right into downloading the files. But the new files will not match with the old metadata and hashing fails.

    The package versions "1" and "2" are illustrative, usually the version is a bigger number. The bigger number - means "newer" package.

    Deletion of package folder do not help because it does not trigger the package download, since the stored metadata reside in SecureStorage on the agent and not affected by deletion. In order the software package to be re-validated after the deletion of binaries, need to reset the cached metadata by restarting the service, but this is all a quite "rude" approach and may not help in your situation, since SWM will still expect old version.

    Normally the situation should automatically be resolved (without any deletions) by updating the Software Delivery policy.You could try running "Complete-" or "Delta Membership Update" tasks on the NS and then update policy on the Client machine. Once the Software policy updates, it start to request the latest package and situation should resolve.

    Btw, I beleive this kind of scenarios were fixed by SMF team in latest versions (not sure thought).



  • 3.  RE: Failed to download package: Bad Hash (0x80090002)

    Posted 11-05-2019 07:34 AM

    I did some more testing and I need to be a little more specific. When I pushed the software it was in a job. The job does successfully complete and the Package Delivery task also shows complete, but I still see the message about the bad hashin the logs. If I just push the Package Delivery task alone that is not in that job, then the new version gets installed. I am not pushing this software via policy, but does your advice still apply? It does suck that we would have to recycle the SMA service to get the new software.



  • 4.  RE: Failed to download package: Bad Hash (0x80090002)

    Posted 11-05-2019 09:12 AM

    Of course, it is not a proper workflow to reset agents to get a Package Delivery task to execute and download. There is definitely something went wrong and your situation is not ordinary.

    Not an expert in tasks, but AFAIK they should work the same way as policies (have the package version inside), but not sure how and when they are updated if package is changed.

    In your case seems that package is refreshed on the servers (run on fresh machines goes through with new MSI), but the job which was already executen on the machine is still have the old version while new execution. You could try to change something inside the task and the job (on the NS) to trigger their "saving" (so they catch up the package change) and then run it again.

    It is hard to say what exactly went wrong in your case without support data like SMP version and logs at least.

     

     



  • 5.  RE: Failed to download package: Bad Hash (0x80090002)

    Posted 11-05-2019 09:27 AM

    I actually did modify the job and removed the Package Delivery task that was giving me trouble. Added a Copy File task and a new script to the job install the new software cause I was in the middle of a deployment. I came in the next morning and reassociated the package to the Package Delivery task. Re-added the Package Delivery tasks to the job. I did notice in the logs though that the client was trying to download the package over and over throughout the night and it does say that the version on the Package Server was higher, but it would not download the newer package. I pushed the job again, but unfortunately the package never redownloaded. That's when I just pushed the Package Delivery task again and that worked. 

    Unfortunately, I don't have the logs anymore to see why this happened. I am on SMP 8.1 RU7.