coredns: [ERROR] plugin/errors: 2 me.com. MX: dns: overflow unpacking uint16

  • the version of CoreDNS you are using 1.3.1
  • your Corefile Azure AKS

Corefile:

.:53 {
    errors
    health
    kubernetes cluster.local in-addr.arpa ip6.arpa {
      pods insecure
      upstream
      fallthrough in-addr.arpa ip6.arpa
    }
    prometheus :9153
    forward . /etc/resolv.conf
    cache 30
    loop
    reload
    loadbalance
    import custom/*.override
}
  • logs, if applicable
10-10T13:41:50.736Z [INFO] plugin/reload: Running configuration MD5 = d8c69602fc5a3428908dc8f34f9aae58
2019-10-10T13:47:49.441Z [ERROR] plugin/errors: 2 me.com. MX: read udp 10.240.0.13:49706->168.63.129.16:53: i/o timeout
2019-10-10T13:56:33.713Z [ERROR] plugin/errors: 2 me.com. MX: dns: overflow unpacking uint16
2019-10-10T13:58:27.887Z [ERROR] plugin/errors: 2 me.com. MX: dns: overflow unpacking uint16
2019-10-10T14:04:06.415Z [ERROR] plugin/errors: 2 me.com. MX: dns: overflow unpacking uint16
[WARNING] No files matching import glob pattern: custom/*.override
[WARNING] No files matching import glob pattern: custom/*.server
.:53
2019-10-10T13:41:50.776Z [INFO] CoreDNS-1.3.1
2019-10-10T13:41:50.776Z [INFO] linux/amd64, go1.11.4, 6b56a9c
CoreDNS-1.3.1
linux/amd64, go1.11.4, 6b56a9c
2019-10-10T13:41:50.776Z [INFO] plugin/reload: Running configuration MD5 = d8c69602fc5a3428908dc8f34f9aae58
2019-10-10T13:47:25.505Z [ERROR] plugin/errors: 2 me.com. MX: dns: overflow unpacking uint16
2019-10-10T13:55:07.068Z [ERROR] plugin/errors: 2 me.com. MX: read udp 10.240.0.22:37383->168.63.129.16:53: i/o timeout
2019-10-10T14:04:13.854Z [ERROR] plugin/errors: 2 me.com. MX: read udp 10.240.0.22:41684->168.63.129.16:53: i/o timeout

When we are trying to resolve mx records for example:

me.com icloud.com

using nslookup, we get the below error:

root@mynginx-66f8579864-pcqbr:/# nslookup -q=mx icloud.com
Server:         10.0.0.10
Address:        10.0.0.10#53

** server can't find icloud.com: SERVFAIL

root@mynginx-66f8579864-pcqbr:/#

  • using dig it works fine
root@mynginx-66f8579864-pcqbr:/# dig icloud.com mx

; <<>> DiG 9.11.5-P4-5.1-Debian <<>> icloud.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26680
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 49

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;icloud.com.                    IN      MX

;; ANSWER SECTION:
icloud.com.             30      IN      MX      10 mx5.mail.icloud.com.
icloud.com.             30      IN      MX      10 mx4.mail.icloud.com.
icloud.com.             30      IN      MX      10 mx6.mail.icloud.com.
icloud.com.             30      IN      MX      10 mx3.mail.icloud.com.
icloud.com.             30      IN      MX      10 mx1.mail.icloud.com.
icloud.com.             30      IN      MX      10 mx2.mail.icloud.com.

;; ADDITIONAL SECTION:
mx5.mail.icloud.com.    30      IN      A       17.57.8.138
mx3.mail.icloud.com.    30      IN      A       17.57.8.136
mx5.mail.icloud.com.    30      IN      A       17.133.229.11
mx3.mail.icloud.com.    30      IN      A       17.57.8.141
mx6.mail.icloud.com.    30      IN      A       17.57.8.144
mx2.mail.icloud.com.    30      IN      A       17.178.102.83
mx2.mail.icloud.com.    30      IN      A       17.57.8.140
mx1.mail.icloud.com.    30      IN      A       17.178.102.82
mx6.mail.icloud.com.    30      IN      A       17.172.34.70
mx2.mail.icloud.com.    30      IN      A       17.172.34.11
mx2.mail.icloud.com.    30      IN      A       17.178.102.79
mx2.mail.icloud.com.    30      IN      A       17.142.163.14
mx5.mail.icloud.com.    30      IN      A       17.133.229.13
mx6.mail.icloud.com.    30      IN      A       17.133.229.12
mx5.mail.icloud.com.    30      IN      A       17.178.97.78
mx2.mail.icloud.com.    30      IN      A       17.142.163.11
mx1.mail.icloud.com.    30      IN      A       17.172.34.10
mx2.mail.icloud.com.    30      IN      A       17.57.8.135
mx3.mail.icloud.com.    30      IN      A       17.172.34.65
mx5.mail.icloud.com.    30      IN      A       17.172.34.68
mx1.mail.icloud.com.    30      IN      A       17.57.8.139
mx4.mail.icloud.com.    30      IN      A       17.133.229.9
mx4.mail.icloud.com.    30      IN      A       17.57.8.142
mx1.mail.icloud.com.    30      IN      A       17.142.163.10
mx4.mail.icloud.com.    30      IN      A       17.57.8.137
mx3.mail.icloud.com.    30      IN      A       17.178.97.76
mx3.mail.icloud.com.    30      IN      A       17.178.97.72
mx6.mail.icloud.com.    30      IN      A       17.172.34.71
mx1.mail.icloud.com.    30      IN      A       17.178.102.78
mx1.mail.icloud.com.    30      IN      A       17.57.8.134
mx4.mail.icloud.com.    30      IN      A       17.172.34.66
mx3.mail.icloud.com.    30      IN      A       17.142.163.12
mx4.mail.icloud.com.    30      IN      A       17.133.229.8
mx1.mail.icloud.com.    30      IN      A       17.142.163.13
mx4.mail.icloud.com.    30      IN      A       17.178.97.77
mx6.mail.icloud.com.    30      IN      A       17.133.229.14
mx5.mail.icloud.com.    30      IN      A       17.57.8.143
mx6.mail.icloud.com.    30      IN      A       17.178.97.79
mx5.mail.icloud.com.    30      IN      A       17.178.97.74
mx2.mail.icloud.com.    30      IN      A       17.172.34.12
mx6.mail.icloud.com.    30      IN      A       17.57.8.133
mx4.mail.icloud.com.    30      IN      A       17.172.34.67
mx3.mail.icloud.com.    30      IN      A       17.142.163.15
mx4.mail.icloud.com.    30      IN      A       17.178.97.73
mx6.mail.icloud.com.    30      IN      A       17.178.97.75
mx3.mail.icloud.com.    30      IN      A       17.172.34.64
mx1.mail.icloud.com.    30      IN      A       17.172.34.9
mx5.mail.icloud.com.    30      IN      A       17.172.34.69

;; Query time: 1 msec
;; SERVER: 10.0.0.10#53(10.0.0.10)
;; WHEN: Thu Oct 10 14:44:35 UTC 2019
;; MSG SIZE  rcvd: 932

root@mynginx-66f8579864-pcqbr:/#

However, if we immediately after dig command tried nslookup it will work ( I guess this is because it will be cached).

I got a network trace and I can see that both me.com and icloud.com has packet size of 970.

image

image

  • The issue can be mitigated by adding custom core file with a proxy
apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns-custom
  namespace: kube-system
data:
  test.server: |
    me.com:53 {
        errors
        cache 30
        proxy . 8.8.8.8
    }

Wondering if this is a bug ? this looks similar to https://github.com/coredns/coredns/issues/2224 but that one seems to be resolved for A records only ?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 24 (10 by maintainers)

Most upvoted comments

Hi @chrisohaver - I tested with AKS running coredns 1.6.4 and still the same issue:

image

root@mynginx-6b7b7bcd75-rzcvq:/# nslookup
> me.com
Server:         10.0.0.10
Address:        10.0.0.10#53

Non-authoritative answer:
Name:   me.com
Address: 17.142.160.83
Name:   me.com
Address: 17.172.224.103
Name:   me.com
Address: 17.178.96.97
> set type=mx
> me.com
Server:         10.0.0.10
Address:        10.0.0.10#53

** server can't find me.com: SERVFAIL
>

image

I am also using official image coredns/coredns:1.6.4