Yum raises "Package does not match intended download" or "Content-Length not expected" error

Solution Verified - Updated -

Issue

  • Client which registered to the Capsule is getting the following error when installing packages:

    https://capsule.example.com/pulp/content/org/lce/cv_name/content/dist/rhel/server/7/7Server/x86_64/os/Packages/f/foo-1.0.0-1.el7.x86_64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=rhel-7-server-rpms clean metadata
    Trying other mirror
    
    Or
    
    [MIRROR] foo-1.0.0-1.el7.x86_64.rpm: Interrupted by header callback: Server reports Content-Length: 2083168 but expected size is: 2083752
    

Environment

  • Red Hat Satellite 6.11 and newer

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content