最近下载 Maven 依赖的时候总是出现以下错误:
Connect to repo.maven.apache.org:443 [repo.maven.apache.org/127.0.0.1, repo.maven.apache.org/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused) ->
接着尝试各种途径查询 DNS 解析发现只有成都电信 DNS Server 解析会出现 127.0.0.1 的结果:
成都电信 DNS Server
$ dig @61.139.2.69 repo.maven.apache.org
; <<>> DiG 9.18.1 <<>> @61.139.2.69 repo.maven.apache.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9774
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;repo.maven.apache.org. IN A
;; ANSWER SECTION:
repo.maven.apache.org. 3600 IN A 127.0.0.1
;; Query time: 3 msec
;; SERVER: 61.139.2.69#53(61.139.2.69) (UDP)
;; WHEN: Thu May 12 12:15:50 CST 2022
;; MSG SIZE rcvd: 55
114DNS
$ dig @114.114.114.114 repo.maven.apache.org
; <<>> DiG 9.18.1 <<>> @114.114.114.114 repo.maven.apache.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34781
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;repo.maven.apache.org. IN A
;; ANSWER SECTION:
repo.maven.apache.org. 37561 IN CNAME repo.apache.maven.org.
repo.apache.maven.org. 2187 IN CNAME maven.map.fastly.net.
maven.map.fastly.net. 61 IN A 146.75.92.215
;; Query time: 40 msec
;; SERVER: 114.114.114.114#53(114.114.114.114) (UDP)
;; WHEN: Thu May 12 12:15:57 CST 2022
;; MSG SIZE rcvd: 132
某云服务器上(国内)
[root@control-plane ~]# cat /etc/resolv.conf
; generated by /usr/sbin/dhclient-script
nameserver 183.60.83.19
nameserver 183.60.82.98
[root@control-plane ~]# dig repo.maven.apache.org
; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.9 <<>> repo.maven.apache.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10651
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;repo.maven.apache.org. IN A
;; ANSWER SECTION:
repo.maven.apache.org. 78577 IN CNAME repo.apache.maven.org.
repo.apache.maven.org. 31845 IN CNAME maven.map.fastly.net.
maven.map.fastly.net. 60 IN A 151.101.24.215
;; Query time: 337 msec
;; SERVER: 183.60.83.19#53(183.60.83.19)
;; WHEN: Thu May 12 12:22:26 CST 2022
;; MSG SIZE rcvd: 121
[root@control-plane ~]#
请问大家又遇到类似的问题么?除了修改 DNS 解析之外,有办法让成都 DNS Server 能够正常解析该域名么?
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.