Temporary failure in name resolution

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介:     最近在使用yum方式安装perl-DBD-MySQL时碰到了Temporary failure in name resolution,Trying other mirror。
    最近在使用yum方式安装perl-DBD-MySQL时碰到了Temporary failure in name resolution,Trying other mirror。即命名解析失败,尝试使用其它镜像。由于本机为最近安装的新服务器,下面是这个问题的现象描述及处理过程。

1、故障现象
###当前环境
[root@GZDB ~]# cat /etc/issue
CentOS release 5.11 (Final)
Kernel \r on an \m

[root@GZDB ~]# yum install perl-DBD-MySQL
              ..............
http://mirrors.pubyun.com/centos/5.11/os/x86_64/CentOS/mysql-5.0.95-5.el5_9.x86_64.rpm:
    [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror.
http://mirrors.sina.cn/centos/5.11/os/x86_64/CentOS/mysql-5.0.95-5.el5_9.x86_64.rpm:
    [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror.

Error Downloading Packages:
  mysql-5.0.95-5.el5_9.x86_64: failure:
      CentOS/mysql-5.0.95-5.el5_9.x86_64.rpm from base: [Errno 256] No more mirrors to try.
  perl-DBI-1.52-2.el5.x86_64: failure:
      CentOS/perl-DBI-1.52-2.el5.x86_64.rpm from base: [Errno 256] No more mirrors to try.
  perl-DBD-MySQL-3.0007-2.el5.x86_64: failure:
      CentOS/perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm from base: [Errno 256] No more mirrors to try.

###尝试ping百度,结果提示未知的主机
[root@GZDB yum.repos.d]# ping www.baidu.com
ping: unknown host www.baidu.com
[root@GZDB yum.repos.d]# ping www.baidu.com
ping: unknown host www.baidu.com

2、故障解决
###结合上面的错误提示及无法ping通百度,应该是dns解析未配置
[root@GZDB yum.repos.d]# more /etc/resolv.conf  ###未配置dns解析

###添加dns解析
[root@GZDB yum.repos.d]# echo "
> nameserver 121.14.37.62
> nameserver 203.196.0.6">>/etc/resolv.conf

[root@GZDB yum.repos.d]# ping www.baidu.com
PING www.a.shifen.com (119.75.217.109) 56(84) bytes of data.
64 bytes from 119.75.217.109: icmp_seq=1 ttl=52 time=38.7 ms
64 bytes from 119.75.217.109: icmp_seq=2 ttl=52 time=38.8 ms
64 bytes from 119.75.217.109: icmp_seq=3 ttl=52 time=38.7 ms
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 6078ms
rtt min/avg/max/mdev = 38.711/38.742/38.801/0.165 ms

###再次yum perl-DBD-MySQL时成功

[root@GZDB yum.repos.d]# yum install perl-DBD-MySQL
   .......
Is this ok [y/N]: y
Downloading Packages:
(1/3): perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm                 | 148 kB     00:00     
(2/3): perl-DBI-1.52-2.el5.x86_64.rpm                         | 600 kB     00:00     
(3/3): mysql-5.0.95-5.el5_9.x86_64.rpm                        | 4.9 MB     00:00     
-------------------------------------------------------------------------------------
Total                                                349 kB/s | 5.6 MB     00:16     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-DBI                                                      1/3
  Installing     : mysql                                                         2/3
warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
  Installing     : perl-DBD-MySQL                                                3/3

Installed:
  perl-DBD-MySQL.x86_64 0:3.0007-2.el5                                                                                       

Dependency Installed:
  mysql.x86_64 0:5.0.95-5.el5_9                                 perl-DBI.x86_64 0:1.52-2.el5                                

Complete!  

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
Docker 容器
解决failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status co
解决failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status co
2858 0
解决failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status co
|
7月前
|
JSON 数据格式
【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)
【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)
54 0
|
开发工具 git
Fatal Not possible to fast-forward, aborting
git是一个很好用的版本管理工具,然而,有时候一些冲突还是让人很郁闷的。 遇到过两次merge报错,是在不同的情形下出现的。
1543 0
|
Java Maven
An attempt was made to call a method that does not exist. The attempt was made from the following
An attempt was made to call a method that does not exist. The attempt was made from the following
495 0
|
Java 应用服务中间件
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
abort: error: Temporary failure in name resolution
abort: error: Temporary failure in name resolution
205 0
|
Linux
WARNING: Re-reading the partition table failed with error 22: Invalid argument
在划分磁盘分区时,遇到错误“WARNING: Re-reading the partition table failed with error 22: Invalid argument” 如下所示: [root@DB-Server u02]# fdisk -l   Disk /dev/sda: 500.
2549 0
|
区块链
Error: No network specified. Cannot determine current network异常
Error: No network specified. Cannot determine current network异常
166 0
|
Java Apache
Failed to place enough replicas
如果DataNode的dfs.datanode.data.dir全配置成SSD类型,则执行“hdfs dfs -put /etc/hosts hdfs:///tmp/”时会报如下错误: 2017-05-04 16:08:22,545 WARN org.
3326 0
|
程序员 PHP 区块链
Error: the tx doesn't have the correct nonce.TestRPC/Ganache无法获取nonce
做一个truffle相关的项目,每次尝试创建交易时,总会有以下的一个错误提示: the tx doesn’t have the correct nonce 完整的一般是这样: Error: the tx doesn't have the correct nonce.
2659 0

热门文章

最新文章