Running repoquery command on a AWS instance results in a "Could not resolve host: xxx.com; Name or service not known"

Solution Unverified - Updated -

Issue

  • Running the repoquery command fails with the following error:
# sudo repoquery '*' --pkgnarrow=updates

Could not retrieve mirrorlist https://rhui2-cds01.REGION.aws.ce.redhat.com/pulp/mirror/rhui-client-config/rhel/server/7/x86_64/os error was
14: curl#6 - "Could not resolve host: rhui2-cds01.REGION.aws.ce.redhat.com; Name or service not known"
Could not retrieve mirrorlist https://rhui2-cds01.REGION.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/os error was
14: curl#6 - "Could not resolve host: rhui2-cds01.REGION.aws.ce.redhat.com; Name or service not known"
Could not retrieve mirrorlist https://rhui2-cds01.REGION.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/7Server/x86_64/rh-common/os error was
14: curl#6 - "Could not resolve host: rhui2-cds01.REGION.aws.ce.redhat.com; Name or service not known"
  • The issue is generally seen after a reboot, and resolves itself once repoquery has been run once.

Environment

  • Red Hat Enterprise Linux 7.x
  • AWS EC2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.