On Satellite client yum fails with "failed to retrieve getPackage/<package_name> from <channel_name> error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Environment
- Red Hat Satellite
- Red Hat Enterprise Linux (RHEL)
Issue
- On Red Hat Satellite client yum fails with following error:
Error Downloading Packages:
1:package_name: failed to retrieve getPackage/package_name from channel_name
error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Resolution
- Use restorecon to set the selinux contexts in /var/satellite correctly:
# restorecon -R /var/satellite
Root Cause
- Selinux is in enforcing mode but correct file contexts are not set to the files under /var/satellite
Diagnostic Steps
- Check output from getfacl & ls -Z commands for the problematic package to check selinux permissions,
# getfacl /var/satellite/redhat/path/to/package
# ls -Z /var/satellite/redhat/path/to/package
Example:
# getfacl /var/satellite/redhat/NULL/374/pam/1.1.1-10.el6_2.1/x86_64/374d80e941ca6db1cb90bed1e3c88b37b46e3b66c70e0b5c69cc64904ce8bc52/pam-1.1.1-10.el6_2.1.x86_64.rpm
# ls -Z /var/satellite/redhat/NULL/374/pam/1.1.1-10.el6_2.1/x86_64/374d80e941ca6db1cb90bed1e3c88b37b46e3b66c70e0b5c69cc64904ce8bc52/pam-1.1.1-10.el6_2.1.x86_64.rpm
- Check file permissions under /var/satellite. Owner of all files should be apache.root or apache:apache
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.
Comments