Could Not Resolve Host: Mirror.CentOS.org

Home » CentOS » Could Not Resolve Host: Mirror.CentOS.org
CentOS 4 Comments

There seems to be a problem with my local dns server resolving mirror.CentOS.org. I know something about dns but obviously not enough to figure out what might be wrong here or how to fix this in bind configs. The SERVFAIL errors below seem to be related to AAAA and MX queries for the domain. Please advise. TIA.

# host mirror.CentOS.org 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

mirror.CentOS.org has address 69.167.139.9

# host mirror.CentOS.org mirror.CentOS.org has address 66.109.26.212
Host mirror.CentOS.org not found: 2(SERVFAIL)
Host mirror.CentOS.org not found: 2(SERVFAIL)

# tail -F /var/named/chroot/var/named/data/named.run error (FORMERR) resolving ‘mirror.CentOS.org/AAAA/IN’: 85.12.30.226#53
error (FORMERR) resolving ‘mirror.CentOS.org/AAAA/IN’: 93.113.36.66#53
error (FORMERR) resolving ‘mirror.CentOS.org/AAAA/IN’: 94.46.190.42#53
error (FORMERR) resolving ‘mirror.CentOS.org/AAAA/IN’: 85.12.30.226#53
error (FORMERR) resolving ‘mirror.CentOS.org/AAAA/IN’: 93.113.36.66#53
error (FORMERR) resolving ‘mirror.CentOS.org/AAAA/IN’: 94.46.190.42#53
error (FORMERR) resolving ‘mirror.CentOS.org/MX/IN’: 85.12.30.226#53
error (FORMERR) resolving ‘mirror.CentOS.org/MX/IN’: 93.113.36.66#53
error (FORMERR) resolving ‘mirror.CentOS.org/MX/IN’: 94.46.190.42#53
error (FORMERR) resolving ‘mirror.CentOS.org/MX/IN’: 85.12.30.226#53
error (FORMERR) resolving ‘mirror.CentOS.org/MX/IN’: 93.113.36.66#53
error (FORMERR) resolving ‘mirror.CentOS.org/MX/IN’: 94.46.190.42#53

4 thoughts on - Could Not Resolve Host: Mirror.CentOS.org

  • Try asking the correct type (A record only) and you’ll have the correct answer : the three PDNS servers having delegation for mirror.CentOS.org will only answer for A records (we have obviously no MX record for mirror.CentOS.org and, unfortunately, no AAAA records for those machines either)

    PS : host is considered “deprecated” so switch to dig instead ? ;-)

  • Thanks for your answer, Fabian, I forgot to mention in the OP that the source of the error is yum with scl repo enabled:

    # yum distro-sync Loaded plugins: fastestmirror, priorities, refresh-packagekit, security, verify
    http://mirror.CentOS.org/CentOS/6/SCL/x86_64/repodata/repomd.xml: [Errno
    14] PYCURL ERROR 6 – “Could not resolve host: mirror.CentOS.org (Could not contact DNS servers)”
    Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository:
    scl. Please verify its path and try again

    I’m using “host” for debugging only and as 8.8.8.8 seems to be able to handle these requests correctly I could probably use it as a forwarder but may be there’s a way to tweak bind configs to work around the problem?

  • Александр Кириллов писал 2014-09-06 18:32:

    This is an ipv6-enabled system and that’s probably why yum tries to get an ipv6 address first for mirror.CentOS.org and fails miserably. For whatever reason I do not get an authoritative negative response for AAAA
    query from upstream servers. Well an easy fix is to hardcode an ipv4
    address for mirror.CentOS.org in /etc/hosts and forget it. I suspect miconfiguration on CentOS.org side as scl is the only repo which gives me troubles but don’t have the time to dig into this.