Table of content
Introduction
In order for a computer to download a package it needs to connect to the SMP GetPackageInfo.aspx interface, and to provide a properly formatted xml requested, in order to receive a set of codebases which will point it to package server(s) snapshot files and download locations.
Before the release of 7.5 Hotifx 5 (provided you had Legacy Agent Communication turned on) you could hit the server GetPackageInfo interface and receive the codebase from a browser or vbscript [1], which was really useful for troubleshooting remote sites where the agents were failing to download packages or reporting issues [2].
However since hotfix 5 [3] the new 7.5 behaviour is now imposed on the interface for all 7.5 agents - which is to encrypt the package codebase response. There should be a way around that if you are working with a legacy agent, but for all 7.5 agents you will only get an encrypted binary stream as a response to a well-formed request.
Thus, to help our customers troubleshoot package info request issues I am glade to introduce TestPackageInfo.exe tool to Symantec connect, which is a small executable designed to interrogate the SMP process to retrieve the codebase from a given computer guid, ip address and package id set.
The attached file contains a 7.5 SP1 build and a 7.6 build.
TopCommand line help
TestPackageInfo Version 1 returns the package server(s) serving available for the provided ip and the package codebases for a given resourceguid, ip address and package id. Command line usage: Mandatory arguments: /guid=<resource guid> /ip=<ip address> /pkgid=<package guid> /version | /v Display the tool version. /help | /? Display the this help message. Examples: TestPackageInfo /guid=b682d329-0f94-4656-b72b-2dedcd51c5c4 /pkgid=e66750b1-7a89-4729-aed2-554a0b2dc30e /ip=192.168.1.234 TestPackageInfo /guid={b682d329-0f94-4656-b72b-2dedcd51c5c4} /pkgid=e66750b1-7a89-4729-aed2-554a0b2dc30e /ip=192.168.1.234 TestPackageInfo /ip=192.168.1.234 /guid=b682d329-0f94-4656-b72b-2dedcd51c5c4 /pkgid={e66750b1-7a89-4729-aed2-554a0b2dc30e}Top
Samples
Samples 1 and 2
Let's start with a couple of working samples. On sample 1 the package server details is highlighted in bold. Whilst on sample 2 we highlighted the codebase response. For both samples the command line is in italic.
C:\CWoC\packageinfoprovider>TestPackageInfo-7.6.exe /guid=0B0518B1-1A3B-478D-8609-2D45741A64E7 /pkgid=CB9362D4-DDD3-D3EE-CAFF-021170771FCB /ip=192.168.2.0 Provided resource guid = 0B0518B1-1A3B-478D-8609-2D45741A64E7, ip address = 192.168.2.0, pkgid = CB9362D4-DDD3-D3EE-CAFF-021170771FCB. 565a6767-a728-460b-ab2e-39d4994208ef:SS-W2K8-01<response type="codebases" optionalHashCheck="False"> <packages> <package guid="{cb9362d4-ddd3-d3ee-caff-021170771fcb}" sourceKey="AAAAAQABz7B3F7Z4bgyFQNoQd+ZcgVq5osQ0REgqQGPcGlGbot8fAd6Ug5ZzxlCtPRl5LkU7EDHnogBfsf9r87zD8rOLC2KI7NgKS5h0RkRhELQN+VAGbFY1drtCXcJxq6IrZ0E/JPC5M8u+VGx3ArjobgJ1W0BYBWHZmnoTUKtNYxuS9qXdpqt8WtzG6NfquiUbLafPOBoG+9yGoxLaXcKGdij9cYi5obg/T6atwUwvewD2qBlYEEUrQyRQIiYnkL4w4w3/qcWFsuyh++ScUsAkRhb6Jfwi9f3OELHWc0LMicc2zORSLBeGTuuCBdigbotPXt6gl5rWaIxGZbmh4g6TX4E3jw=="> <codebases speedTest="1"> <codebase url="http://SS-W2K8-01.EPM.local/Altiris/PS/Share/pkggroup_{dfcfefb2-86c0-44f1-b721-4d71b2c9874b}/{CB9362D4-DDD3-D3EE-CAFF-021170771FCB}/cache" snapshot="http://SS-W2K8-01.EPM.local/Altiris/PS/getpackagesnapshot.asp" /> <codebase url="file://SS-W2K8-01.EPM.local/PkgSvrHostC$/{CB9362D4-DDD3-D3EE-CAFF-021170771FCB}/cache" snapshot="file://SS-W2K8-01.EPM.local/PkgSvrHostC$/{CB9362D4-DDD3-D3EE-CAFF-021170771FCB}/snapshot.xml" /> </codebases> </package> </packages> </response> C:\CWoC\packageinfoprovider>TestPackageInfo-7.6.exe /guid=D0794656-02E1-4533-BD3A-F17606EB961B /ip=192.168.2.34 /pkgid=934EFCA4-65AB-0F01-E72A-023BF7260133 Provided resource guid = D0794656-02E1-4533-BD3A-F17606EB961B, ip address = 192.168.2.34, pkgid = 934EFCA4-65AB-0F01-E72A-023BF7260133. 565a6767-a728-460b-ab2e-39d4994208ef:SS-W2K8-01 <response type="codebases" optionalHashCheck="False"> <packages> <package guid="{934efca4-65ab-0f01-e72a-023bf7260133}" sourceKey="AAAAAQABz7B3F7Z4bgyFQNoQd+ZcgVq5osQ0REgqQGPcGlGbot8fAd6Ug5ZzxlCtPRl5LkU7EDHnogBfsf9r87zD8rOLC2KI7NgKS5h0RkRhELQN+VAGbFY1drtCXcJxq6IrZ0E/JPC5M8u+VGx3ArjobgJ1W0BYBWHZmnoTUKtNYxuS9qXdpqt8WtzG6NfquiUbLafPOBoG+9yGoxLaXcKGdij9cYi5obg/T6atwUwvewD2qBlYEEUrQyRQIiYnkL4w4w3/qcWFsuyh++ScUsAkRhb6Jfwi9f3OELHWc0LMicc2zORSLBeGTuuCBdigbotPXt6gl5rWaIxGZbmh4g6TX4E3jw=="> <codebases speedTest="1"> <codebase url="http://SS-W2K8-01.EPM.local/Altiris/PS/Share/pkggroup_{dfcfefb2-86c0-44f1-b721-4d71b2c9874b}/{934EFCA4-65AB-0F01-E72A-023BF7260133}/cache" snapshot="http://SS-W2K8-01.EPM.local/Altiris/PS/getpackagesnapshot.asp" /> <codebase url="file://SS-W2K8-01.EPM.local/PkgSvrHostC$/{934EFCA4-65AB-0F01-E72A-023BF7260133}/cache" snapshot="file://SS-W2K8-01.EPM.local/PkgSvrHostC$/{934EFCA4-65AB-0F01-E72A-023BF7260133}/snapshot.xml" /> </codebases> </package> </packages> </response>
Samples 3 and 4
Lets continue with 2 fails cases with invalid input. Note on sample 3 below that the guid is missing 2 chars in the bold section(it's the same command line as sample-2), thus causing an error (message in bold). Sample 4 sports an invalid ip, which as you would guess, generate an invalid ip error, and causes teh standard help message to be displayed (in abridged for for clarity here).
C:\CWoC\packageinfoprovider>TestPackageInfo-7.6.exe /guid=D0794656-02E1-45-BD3A-F17606EB961B /ip=192.168.2.34 /pkgid=934EFCA4-65AB-0F01-E72A-023BF7260133 Provided resource guid = D0794656-02E1-45-BD3A-F17606EB961B, ip address = 192.168.2.34, pkgid = 934EFCA4-65AB-0F01-E72A-023BF7260133. Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). TestPackageInfo Version 1 returns the package server(s) serving available for the provided ip and the package codebases for a given resourceguid, ip address and package id. Command line usage: [abridged] C:\CWoC\packageinfoprovider>TestPackageInfo-7.6.exe /guid=D0794656-02E1-4533-BD3A-F17606EB961B /ip=192.168.2. /pkgid=934EFCA4-65AB-0F01-E72A-023BF7260133 Provided resource guid = D0794656-02E1-4533-BD3A-F17606EB961B, ip address = 192.168.2., pkgid = 934EFCA4-65AB-0F01-E72A-023BF7260133. An invalid IP address was specified. TestPackageInfo Version 1 returns the package server(s) serving available for the provided ip and the package codebases for a given resourceguid, ip address and package id. Command line usage: [abridged]
Samples 5 and 6
And finally lets check at other fail cases, for example (sample 5) when the resourceguid provided does not match an existing guid in the database (which causes an exception when we try to get the codebases, however we still get the package server based on the provided ip address), or with a packageid that does not match a package in the database (sample 6 - which simply returns empty codebases). As usual the command lines are in italic and the interesting data are in bold.
C:\CWoC\packageinfoprovider>TestPackageInfo-7.6.exe /guid=0B0518B1-1111-478D-8609-2D45741A64E7 /pkgid=CB9362D4-DDD3-D3EE-CAFF-021170771FCB /ip=192.168.2.0 Provided resource guid = 0B0518B1-1111-478D-8609-2D45741A64E7, ip address = 192.168.2.0, pkgid = CB9362D4-DDD3-D3EE-CAFF-021170771FCB. 565a6767-a728-460b-ab2e-39d4994208ef:SS-W2K8-01 Error during execution... The access is forbidden for unmanaged resources.C:\CWoC\packageinfoprovider>TestPackageInfo-7.6.exe /guid=D0794656-02E1-4533-BD3A-F17606EB961B /ip=192.168.2.34 /pkgid=934EFCA4-6666-0F01-E72A-023BF7260133 Provided resource guid = D0794656-02E1-4533-BD3A-F17606EB961B, ip address = 192.168.2.34, pkgid = 934EFCA4-6666-0F01-E72A-023BF7260133. 565a6767-a728-460b-ab2e-39d4994208ef:SS-W2K8-01 <response type="codebases" optionalHashCheck="False" />Top
Conclusion
With this quick tool you can now verify on the SMP which package servers a given computer (based on guid and ip) would be communicating to, as well as the codebase for a given package.
As usual, in case you encounter any problems or have some feature requests please comment on this download or contact me via direct messages.
TopReferences
- Inside Notification Server agent interfaces: GetPackageInfo.apsx
- GetPackageInfo with SMP7.5
- Symantec™ IT Management Suite 7.5 SP1 HF5 powered by Altiris™ technology Release Notes