oc-mirror plugin fails with catalog is invalid and 401 unauthorized error when it hangs for few minutes in RHOCP 4

Solution Verified - Updated -

Issue

  • Mirroring images for a disconnected environment using oc-mirror plugin gets hung and then getting failed.
  • Even though the registry credentials are good as per oc-mirror in a disconnected environment fails with a "HTTP 401 Unauthorized" error, mirroring is getting failed.
  • Usually the error occurs in between the mirroring while it is not able to get an image in a specified time limit.
  • The mirror fails with the following messages:

    The rendered catalog is invalid.
    
    error: error rendering new refs: render reference "registry.redhat.io/redhat/redhat-operator-index:v4.12": error resolving name : pulling from host registry.redhat.io failed with status code [manifests v4.12]: 401 Unauthorized
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4
    • Disconnected
  • oc-mirror CLI

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