问题
明明连接了网线到路由器/交换机,却ping不通常用网站?
原来可以上网的服务器,在conda安装包的时候,一直出错,显示:
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectionError(MaxRetryError(‘HTTPSConnectionPool(host=\’mirrors.tuna.tsinghua.edu.cn\’, port=443): Max retries exceeded with url: /anaconda/pkgs/free/ladTimeoutError (“HTTPSConnectionPool(host=\’mirrors.tuna.tsinghua.edu.cn\’, port=443):
最后发现,原来本来能联网的服务器断网了。。。
解决方案:
重新设置DNS
学习链接1
学习链接2
vi /etc/resolv.conf
把DNS服务器设置成1.1.1.1
nameserver 1.1.1.1
解决问题 能ping通了