search cancel

Package download attempt fails with error "Error while downloading package: HTTP error: 302 Found (-2147209951)"

book

Article ID: 174640

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

The Altiris Agent is unable to get package information or download packages. In the local logs are the following warnings and error events:

Process: AeXNSAgent.exe (444)
Thread ID: 404
Module: AeXNetComms.dll
Source: AeXNetworkTransport
Description: Get 'http://slmgt05/Altiris/NS/Agent/GetPackageInfo.aspx?xml=<request resource="f1ba3537-3c53-4a77-b86e-684bd926edf3" version="1" type="codebases" compress="1" totalTime="1585">
<packages>
<package guid="01b54eb5-3679-4c73-9e10-e169d5a5ec59"/>
</packages>
<addresses>
<address ip="172.17.53.147"/>
</addresses>
</request>
' failed: HTTP error: 302 Found (-2147209951)

Process: AeXNSAgent.exe (444)
Thread ID: 404
Module: AeXNetComms.dll
Source: CoNetworkTransport(116)
Description: HTTP error: 302 Found (-2147209951)

Process: AeXNSAgent.exe (444)
Thread ID: 404
Module: AexPackageDelivery.dll
Source: PackageDownload
Description: Download package sources failed: HTTP error: 302 Found (-2147209951)

Process: AeXNSAgent.exe (444)
Thread ID: 404
Module: AexPackageDelivery.dll
Source: PackageDelivery
Description: Error while downloading package: HTTP error: 302 Found(-2147209951)

An examination of the NS log files during the same time period shows the following trace entry:

Process: aexsvc.exe (5284)
Thread ID: 4216
Module: AltirisNativeHelper.dll
Source: Altiris.NS.ClientConfigManagement.ClientConfigManager.GetPackageCodebases
Description: No sites have been defined or imported. Returning package server codebases in subnet. (Request: <request resource="f1ba3537-3c53-4a77-b86e-684bd926edf3" version="1" type="codebases" compress="1" totalTime="29757">
<packages>
<package guid="01b54eb5-3679-4c73-9e10-e169d5a5ec59"/>
</packages>
<addresses>
<address ip="172.17.53.147"/>
</addresses>
</request>
)

In Notification Server's IIS logs (under .\Windows\System32\LogFiles\W3SVC1), there are many of the following entries relating to the same event/failure for multiple computers:

2006-11-22 00:00:06 W3SVC1 128.170.12.57 GET /Altiris/NS/Agent/GetPackageInfo.aspx xml=%3Crequest%20resource%3d%22% f1ba3537-3c53-4a77-b86e-684bd926edf3%7D%22%20version%3d%221%22%20type%3d%22codebases%22%20compress%3d%221%22%20totalTime%3d%2245%22%3E%0A%3Cpackages%3E%0A%09%3Cpackage%20guid%3d%22%01b54eb5-3679-4c73-9e10-e169d5a5ec59%7D%22/%3E%0A%3C/packages%3E%0A%3Caddresses%3E%0A%09%3Caddress%20ip%3d%22128.170.25.21%22/%3E%0A%3C/addresses%3E%0A%3C/request%3E%0A 80 – 172.17.53.147 - 302 0 64

The 302 in the previous IIS log entry is the result of the request (as per the prior agent logs excerpts), which seems to signify that the request was being redirected.

The problem was that it was a redirection that kept looping over and over. This was proven by actually converting the log contents to a valid URL and copying it into IE and attempting to go straight to the package information page.When this was done all that could be seen in the lower left corner of the IE page was repeated attempts to request the package codebase then it would show a redirection take place, then it would start all over again. The page would never load.

It is interesting to note that if the package GUID was replaced in the URL with the package GUID of another item in the IIS log (where the result was 200 instead of 302) that the page opened up and showed the package information completely.

So the problem was with specific packages.

Cause

All of the 302 failures were being returned when requesting information about packages that had no codebases.  In this case there were many of them including most of the Agent install packages, and Patch Management Updates (500+ total)

 

The number of affected packages was able to be determined by running the following SQL query in the query analyzer against the Altiris database:

 

SELECT [Name], PackageId

FROM swdpackage

WHERE _latest = 1

  AND packageid NOT IN

           (select packageId from swdpackagecodebase)

ORDER BY [Name]

 

The root cause of why this happened is not totally clear. However, it did occur after all of the sites (under Site Maintenance) were arbitrarily deleted from the NS.

Resolution

  1. It is possible that going into Scheduled Tasks and manually running the task: “NS.Package Distribution Point Update Schedule.{29a2b641-222a-43b0-830c-a25c59e93fe4}, will cause the code bases to be rebuild. But since this task runs every 10 minutes it should probably have taken care of it by now if it was really able to do so.
  2. If running the Distribution Point Update task does not do the trick, and if most of the packages are Patch Management update packages, then first try re-creating the packages as per article 23881. Then run the scheduled task again.
  3. If any packages remain that still don’t have code bases then go into them individually via resource explorer and simply click Apply, then run the scheduled Package Distribution Point Update task. An easy way to find the affected packages is to do the following:
    1. In the Notification Server Console go to Resources > Software Management > Software Delivery Packages > Windows
    2. Double-click on any package in the right column.
    3. Run the previous SQL query and copy the the value from the PackageID column in the first row and paste it in replacing the ItemGuid in the package URL as per the following screen shot. Then press Enter or click Go. The correct package should appear.

    4. Once the package appears, click Apply and Update Distribution Points. Repeat the process until all rows in the query have been processed in this manner.

      Note: There are some packages that have no codebases. These packages are those that, in the "Package Source" box contains Package does not contain source files. Do not bother with these.

Applies To
Notification Server 6.0.6074 SP3

Attachments