Golang问题与DNS响应> Mac OS X上512字节(无法解组DNS消息)

时间:2016-08-04 14:50:25

标签: macos go dns

我们的一位用户在尝试进行DNS解析时遇到以下错误。

Post https://api.heroku.com/login: dial tcp: lookup api.heroku.com on 8.8.4.4:53: cannot unmarshal DNS message

用户非常乐于为我提供dig输出,看起来DNS响应确实大于512字节。有什么办法可以用go和大型DNS响应解决这个问题吗?我们目前正在使用go version go1.6.1 darwin/amd64

; <<>> DiG 9.8.3-P1 <<>> @8.8.4.4 api.heroku.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55215
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 13, ADDITIONAL: 12

;; QUESTION SECTION:
;api.heroku.com. IN A

;; ANSWER SECTION:
api.heroku.com. 21 IN CNAME midgard.heroku.com.
midgard.heroku.com. 441 IN CNAME midgard.herokussl.com.
midgard.herokussl.com. 3137 IN CNAME elb082153-1559744486.us-east-1.elb.amazonaws.com.
elb082153-1559744486.us-east-1.elb.amazonaws.com. 51 IN A 54.243.105.250
elb082153-1559744486.us-east-1.elb.amazonaws.com. 51 IN A 54.225.188.133
elb082153-1559744486.us-east-1.elb.amazonaws.com. 51 IN A 23.21.149.112

;; AUTHORITY SECTION:
com. 140079 IN NS g.gtld-servers.net.
com. 140079 IN NS j.gtld-servers.net.
com. 140079 IN NS i.gtld-servers.net.
com. 140079 IN NS b.gtld-servers.net.
com. 140079 IN NS k.gtld-servers.net.
com. 140079 IN NS a.gtld-servers.net.
com. 140079 IN NS e.gtld-servers.net.
com. 140079 IN NS c.gtld-servers.net.
com. 140079 IN NS l.gtld-servers.net.
com. 140079 IN NS m.gtld-servers.net.
com. 140079 IN NS f.gtld-servers.net.
com. 140079 IN NS h.gtld-servers.net.
com. 140079 IN NS d.gtld-servers.net.

;; ADDITIONAL SECTION:
g.gtld-servers.net. 124660 IN A 192.42.93.30
j.gtld-servers.net. 91373 IN A 192.48.79.30
i.gtld-servers.net. 119024 IN A 192.43.172.30
b.gtld-servers.net. 119025 IN A 192.33.14.30
k.gtld-servers.net. 27063 IN A 192.52.178.30
a.gtld-servers.net. 16745 IN A 192.5.6.30
e.gtld-servers.net. 123106 IN A 192.12.94.30
c.gtld-servers.net. 153632 IN A 192.26.92.30
l.gtld-servers.net. 22933 IN A 192.41.162.30
f.gtld-servers.net. 107336 IN A 192.35.51.30
h.gtld-servers.net. 29637 IN A 192.54.112.30
d.gtld-servers.net. 119025 IN A 192.31.80.30

;; Query time: 48 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Thu Jul 14 07:37:57 2016
;; MSG SIZE rcvd: 609

0 个答案:

没有答案