雲計算

【雲安全中心】Linux 更新軟件-域名解析失敗

現象

http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/python-devel-2.7.5-86.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.

注:mirrors.cloud.aliyuncs.com 這個域名需要阿里雲vpc下dns才能解析。

原因

系統內部配置的dns服務器IP無法解析mirrors.cloud.aliyuncs.com該域名導致。
或者其他依賴的主機導致mirrors.cloud.aliyuncs.com無法解析。

修復步驟

注:所有操作修改前,請先備份數據,創建快照等。

登陸服務器

通過 vnc 或者 Workbench 連接登陸到服務器。

修改配置文件

cp  /etc/resolv.conf  /etc/resolv.conf.bak
vim  /etc/resolv.conf

寫入以下內容:

options timeout:1 attempts:1 rotate
nameserver 100.100.2.136
nameserver 100.100.2.138

驗證測試

dig mirrors.cloud.aliyuncs.com

驗證測試如圖一能夠解析到IP後,雲安全中心重新進行點擊修復漏洞.

Leave a Reply

Your email address will not be published. Required fields are marked *