1、DNS解析失败
1.1 报connection timed out; no servers could be reached错误
root@15b099c121e2:/# nslookup time.geekbang.org
;; connection timed out; no servers could be reached
1.2 对网络进行排查,或者是使用 nslookup -debug www.baidu.com。结果发现网络是征程连接的,但是访问baidu这个网址取通过本机环回口取访问的,所以导致连接失败。
root@15b099c121e2:/# ping 114.114.114.114
PING 114.114.114.114 (114.114.114.114): 56 data bytes
64 bytes from 114.114.114.114: icmp_seq=0 ttl=127 time=29.275 ms
64 bytes from 114.114.114.114: icmp_seq=1 ttl=127 time=27.183 ms
^C--- 114.114.114.114 ping statistics
root@15b099c121e2:/# nslookup -debug www.baidu.com
;; Connection to 127.0.0.1#53(127.0.0.1) for www.baidu.com failed: connection refused.
;; Connection to ::1#53(::1) for www.baidu.com failed: address not available.
1.3 查看Dns配置文件,发现内容为空。所以我们需要配置DNS服务
/# cat /e