【常见问题】IUS源安装失败

appnode 2015-10-20 3415

【症状】
在问题服务器执行 AppNode 安装命令时报以下错误:
>> Updating software repository

* Upgrading ca-certificates...
------------------- log dump -------------------
Loaded plugins: fastestmirror
Setting up Upgrade Process
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: ius-archive
Could not retrieve mirrorlist https://mirrors.iuscommunity.org/mirrorlist?repo=ius-centos6-archive&arch=x86_64&protocol=http error was
14: problem making ssl connection

------------------- log dump -------------------
exit status 1
ok
* Installing repository epel...ok
* Installing repository ius...ok
* Installing repository appnode...2015/10/20 13:19:42 Loaded plugins: fastestmirror
Setting up Install Process
Examining /var/tmp/yum-root-LwFrsT/appnode-release-1.0-1.el6.noarch.rpm: appnode-release-1.0-1.el6.noarch
Marking /var/tmp/yum-root-LwFrsT/appnode-release-1.0-1.el6.noarch.rpm to be installed
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: ius
Could not retrieve mirrorlist https://mirrors.iuscommunity.org/mirrorlist?repo=ius-centos6&arch=x86_64&protocol=http error was
14: problem making ssl connection


ERROR: install yum repository [appnode] failed: exit status 1


【问题分析】
上述错误中提示无法建立SSL连接,可见是服务器与IUS源之间的网络出现故障。
在问题服务器上运行curl下载上述出错的URL地址:
curl -v "https://mirrors.iuscommunity.org/mirrorlist?repo=ius-centos6&arch=x86_64&protocol=http"
* About to connect() to mirrors.iuscommunity.org port 443 (#0)
*   Trying 2001:4802:7901:0:4ccc:ff11:0:4... connected
* Connected to mirrors.iuscommunity.org (2001:4802:7901:0:4ccc:ff11:0:4) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none

发现问题服务器与IUS源服务器的连接使用的是IPv6地址。
测试下用IPv4下载,发现连接正常:
# curl -4 "https://mirrors.iuscommunity.org/mirrorlist?repo=ius-centos6-archive&arch=x86_64&protocol=http"
# mirrorlist generated by umirr
#
# source ip: ******
# status: found in database
# city: Central District
# region: 00
# country: HK
# latitude: 22.2833
# longitude: 114.1500
#
# approximate distances in miles:
......省略......

根据上述测试结果,得出的结论是:IUS源服务器不支持IPv6。

【修复方法】
在确保你的系统不需要IPv6的前提下禁用IPv6(现有大部分网络服务还是基于IPv4)。
CentOS系统下,直接执行以下命令:
sed -i 's/^IPV6/#IPV6/g' /etc/sysconfig/network-scripts/ifcfg-* && service network restart
最新回复 (0)
返回
发新帖