- Red Hat Network Satellite
- Red Hat Enterprise Linux 5.x
While trying to install packages from i386 custom channel through satellite server, following error persists on client system:
perl-Nagios-Plugin-0.33-1.el5.rf.noarch: failed to retrieve getPackage/perl-Nagios-Plugin-0.33-1.el5.rf.noarch.rpm from nagios_server_513 kB 00:00 error was [Errno -1] Package does not match intended download
md5sum doesn't match
- executing the "file" command on the rpm under /var/satellite on the server identifies the file as data, not as an RPM
- Run the following script on the Satellite server to find all packages in /var/satellite that do not have the expected checksum (md5sum or sha256sum when relevant) :
# python check-varsat.py
After reviewing the output, delete the corrupt files
Before running satellite-sync command, clear cache on satellite server by running following command:
# rm -fr /var/cache/rhn/satsync/*
- Re-sync the channels with the satellite-sync command, to restore the correct rpms :
# satellite-sync -c CHANNEL1 -c CHANNEL2
it is also possible to use a normal full sync :
the script check-varsat.py is a simple checksum checker which is attached to this article and offers you to remove the packages which do not have their expected checksum ; it is also available on this github
The checksum method works - but it involves reading all the content of all rpms, which can take a long time. This other method will only base itself on the data of the rpm files :
for i in `find /var/satellite -iname "*.rpm"` do rpm -vK $i 2>&1 | grep -v $i | grep -q "error" && echo "$i is corrupt" done
to list the rpms then
for i in `find /var/satellite -iname "*.rpm"` do if rpm -vK $i 2>&1 | grep -v $i | grep -q "error" then rm -f $i echo "deleted corrupt rpm $i" fi done
to remove them. However in some scenarios if the downloaded rpm is valid but not what was expected to be downloaded, this method won't pick it.
- Packages (rpm) files corrupted or missing during download with satellite-sync.
- Red Hat Satellite
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.