域名无法访问
/etc/resolv.conf 配置的域名解析服务器有问题1
2
3
4
5
6
7
8
9
10
11
12
13
14root@e5388c88162b:/# ping www.baidu.com
ping: unknown host
root@e5388c88162b:/# nslookup www.baidu.com
;; connection timed out; no servers could be reached
root@e5388c88162b:/# ping 1.1.1.1
;; connection timed out; no servers could be reached
root@e5388c88162b:/# echo "nameserver 1.1.1.1" > /etc/resolv.conf
root@e5388c88162b:/# ping www.baidu.com
PING www.wshifen.com (119.63.197.139): 56 data bytes
64 bytes from 119.63.197.139: icmp_seq=0 ttl=57 time=1.980 ms
64 bytes from 119.63.197.139: icmp_seq=1 ttl=57 time=2.108 ms
域名解析过慢,可能需要更换 DNS 解析服务器. 或者开启 dns 缓存