在Ambari配置的倒数第二步,出现了[Errno 256] No more mirrors to try的问题。
解决方法如下:
1、yum clean all
2、yum makecache
然后从新安装。
错误描述:
2016-11-13 23:34:05,400 - Error while executing command 'install':
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 214, in execute
method(env)
File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py", line 36, in install
self.install_packages(env, params.exclude_packages)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 289, in install_packages
Package(name)
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 148, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 152, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 43, in action_install
self.install_package(package_name, self.resource.use_repos)
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 51, in install_package
shell.checked_call(cmd, sudo=True, logoutput=self.get_logoutput())
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
return function(command, **kwargs)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 82, in checked_call
return _call(command, logoutput, True, cwd, env, preexec_fn, user, wait_for_finish, timeout, path, sudo, on_new_line)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 199, in _call
raise Fail(err_msg)
Fail: Execution of '/usr/bin/yum -d 0 -e 0 -y install 'hadoop_2_2_*'' returned 1.
Error Downloading Packages:
hadoop_2_2_9_0_3393-mapreduce-2.6.0.2.2.9.0-3393.el6.x86_64: failure: hadoop/hadoop_2_2_9_0_3393-mapreduce-2.6.0.2.2.9.0-3393.el6.x86_64.rpm from HDP-2.2: [Errno 256] No more mirrors to try.
hadoop_2_2_9_0_3393-hdfs-2.6.0.2.2.9.0-3393.el6.x86_64: failure: hadoop/hadoop_2_2_9_0_3393-hdfs-2.6.0.2.2.9.0-3393.el6.x86_64.rpm from HDP-2.2: [Errno 256] No more mirrors to try.
ranger_2_2_9_0_3393-hdfs-plugin-0.4.0.2.2.9.0-3393.el6.x86_64: failure: ranger/ranger_2_2_9_0_3393-hdfs-plugin-0.4.0.2.2.9.0-3393.el6.x86_64.rpm from HDP-2.2: [Errno 256] No more mirrors to try.和
2016-11-13 23:21:46,589 - u"Directory['/var/lib/ambari-agent/data/tmp/AMBARI-artifacts/']" {'recursive': True}
2016-11-13 23:21:46,745 - u"File['/var/lib/ambari-agent/data/tmp/AMBARI-artifacts//UnlimitedJCEPolicyJDK7.zip']" {'content': DownloadSource('http://master:8080/resources//UnlimitedJCEPolicyJDK7.zip')}
2016-11-13 23:21:46,829 - Not downloading the file from http://master:8080/resources//UnlimitedJCEPolicyJDK7.zip, because /var/lib/ambari-agent/data/tmp/UnlimitedJCEPolicyJDK7.zip already exists
2016-11-13 23:21:46,986 - u"Group['hadoop']" {'ignore_failures': False}
2016-11-13 23:21:46,987 - Modifying group hadoop
2016-11-13 23:21:47,069 - u"Group['users']" {'ignore_failures': False}
2016-11-13 23:21:47,069 - Modifying group users
2016-11-13 23:21:47,192 - u"User['hive']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,192 - Modifying user hive
2016-11-13 23:21:47,236 - u"User['mapred']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,236 - Modifying user mapred
2016-11-13 23:21:47,279 - u"User['hbase']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,280 - Modifying user hbase
2016-11-13 23:21:47,327 - u"User['ambari-qa']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'users']}
2016-11-13 23:21:47,328 - Modifying user ambari-qa
2016-11-13 23:21:47,370 - u"User['zookeeper']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,371 - Modifying user zookeeper
2016-11-13 23:21:47,413 - u"User['tez']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'users']}
2016-11-13 23:21:47,413 - Modifying user tez
2016-11-13 23:21:47,456 - u"User['hdfs']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,457 - Modifying user hdfs
2016-11-13 23:21:47,505 - u"User['kafka']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,506 - Modifying user kafka
2016-11-13 23:21:47,555 - u"User['yarn']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,556 - Modifying user yarn
2016-11-13 23:21:47,603 - u"User['hcat']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,604 - Modifying user hcat
2016-11-13 23:21:47,646 - u"User['ams']" {'gid': 'hadoop', 'ignore_failures': False, 'groups': [u'hadoop']}
2016-11-13 23:21:47,646 - Modifying user ams
2016-11-13 23:21:47,690 - u"File['/var/lib/ambari-agent/data/tmp/changeUid.sh']" {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2016-11-13 23:21:47,969 - u"Execute['/var/lib/ambari-agent/data/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa']" {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}
2016-11-13 23:21:48,011 - Skipping u"Execute['/var/lib/ambari-agent/data/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa']" due to not_if
2016-11-13 23:21:48,012 - u"Directory['/hadoop/hbase']" {'owner': 'hbase', 'recursive': True, 'mode': 0775, 'cd_access': 'a'}
2016-11-13 23:21:48,346 - u"File['/var/lib/ambari-agent/data/tmp/changeUid.sh']" {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2016-11-13 23:21:48,620 - u"Execute['/var/lib/ambari-agent/data/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/hadoop/hbase']" {'not_if': '(test $(id -u hbase) -gt 1000) || (false)'}
2016-11-13 23:21:48,662 - Skipping u"Execute['/var/lib/ambari-agent/data/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/hadoop/hbase']" due to not_if
2016-11-13 23:21:48,663 - u"Group['hdfs']" {'ignore_failures': False}
2016-11-13 23:21:48,664 - Modifying group hdfs
2016-11-13 23:21:48,791 - u"User['hdfs']" {'ignore_failures': False, 'groups': [u'hadoop', 'hadoop', 'hdfs', u'hdfs']}
2016-11-13 23:21:48,791 - Modifying user hdfs
2016-11-13 23:21:48,833 - u"Directory['/etc/hadoop']" {'mode': 0755}
2016-11-13 23:21:48,992 - u"Directory['/etc/hadoop/conf.empty']" {'owner': 'root', 'group': 'hadoop', 'recursive': True}
2016-11-13 23:21:49,136 - u"Link['/etc/hadoop/conf']" {'not_if': 'ls /etc/hadoop/conf', 'to': '/etc/hadoop/conf.empty'}
2016-11-13 23:21:49,187 - Skipping u"Link['/etc/hadoop/conf']" due to not_if
2016-11-13 23:21:49,196 - u"File['/etc/hadoop/conf/hadoop-env.sh']" {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2016-11-13 23:21:49,427 - u"Repository['HDP-2.2']" {'base_url': 'http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.9.0', 'action': ['create'], 'components': [u'HDP', 'main'], 'repo_template': 'repo_suse_rhel.j2', 'repo_file_name': 'HDP', 'mirror_list': None}
2016-11-13 23:21:49,431 - u"File['/etc/yum.repos.d/HDP.repo']" {'content': Template('repo_suse_rhel.j2')}
2016-11-13 23:21:49,666 - u"Repository['HDP-UTILS-1.1.0.20']" {'base_url': 'http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6', 'action': ['create'], 'components': [u'HDP-UTILS', 'main'], 'repo_template': 'repo_suse_rhel.j2', 'repo_file_name': 'HDP-UTILS', 'mirror_list': None}
2016-11-13 23:21:49,669 - u"File['/etc/yum.repos.d/HDP-UTILS.repo']" {'content': Template('repo_suse_rhel.j2')}
2016-11-13 23:21:49,892 - u"Package['unzip']" {}
2016-11-13 23:21:50,302 - Skipping installing existent package unzip
2016-11-13 23:21:50,303 - u"Package['curl']" {}
2016-11-13 23:21:50,711 - Skipping installing existent package curl
2016-11-13 23:21:50,712 - u"Package['hdp-select']" {}
2016-11-13 23:21:51,119 - Skipping installing existent package hdp-select
2016-11-13 23:21:51,121 - u"Directory['/var/lib/ambari-agent/data/tmp/AMBARI-artifacts/']" {'recursive': True}
2016-11-13 23:21:51,276 - u"File['/var/lib/ambari-agent/data/tmp/AMBARI-artifacts//jdk-7u67-linux-x64.tar.gz']" {'content': DownloadSource('http://master:8080/resources//jdk-7u67-linux-x64.tar.gz')}
2016-11-13 23:21:51,365 - Not downloading the file from http://master:8080/resources//jdk-7u67-linux-x64.tar.gz, because /var/lib/ambari-agent/data/tmp/jdk-7u67-linux-x64.tar.gz already exists
2016-11-13 23:21:51,757 - u"Directory['/usr/jdk64']" {}
2016-11-13 23:21:51,911 - u"Execute['('chmod', 'a+x', u'/usr/jdk64')']" {'not_if': 'test -e /usr/jdk64/jdk1.7.0_67/bin/java', 'sudo': True}
2016-11-13 23:21:51,957 - Skipping u"Execute['('chmod', 'a+x', u'/usr/jdk64')']" due to not_if
2016-11-13 23:21:51,959 - u"Execute['mkdir -p /var/lib/ambari-agent/data/tmp/jdk && cd /var/lib/ambari-agent/data/tmp/jdk && tar -xf /var/lib/ambari-agent/data/tmp/AMBARI-artifacts//jdk-7u67-linux-x64.tar.gz && ambari-sudo.sh cp -rp /var/lib/ambari-agent/data/tmp/jdk/* /usr/jdk64']" {'not_if': 'test -e /usr/jdk64/jdk1.7.0_67/bin/java'}
2016-11-13 23:21:52,002 - Skipping u"Execute['mkdir -p /var/lib/ambari-agent/data/tmp/jdk && cd /var/lib/ambari-agent/data/tmp/jdk && tar -xf /var/lib/ambari-agent/data/tmp/AMBARI-artifacts//jdk-7u67-linux-x64.tar.gz && ambari-sudo.sh cp -rp /var/lib/ambari-agent/data/tmp/jdk/* /usr/jdk64']" due to not_if
2016-11-13 23:21:52,003 - u"Execute['('chgrp', '-R', u'hadoop', u'/usr/jdk64/jdk1.7.0_67')']" {'sudo': True}
2016-11-13 23:21:52,050 - u"Execute['('chown', '-R', 'root', u'/usr/jdk64/jdk1.7.0_67')']" {'sudo': True}
2016-11-13 23:21:52,212 - u"Package['hadoop_2_2_*']" {}
2016-11-13 23:21:52,625 - Installing package hadoop_2_2_* ('/usr/bin/yum -d 0 -e 0 -y install 'hadoop_2_2_*'')
2016-11-13 23:33:33,423 - Error while executing command 'install':
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 214, in execute
method(env)
File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py", line 36, in install
self.install_packages(env, params.exclude_packages)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 289, in install_packages
Package(name)
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 148, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 152, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 43, in action_install
self.install_package(package_name, self.resource.use_repos)
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 51, in install_package
shell.checked_call(cmd, sudo=True, logoutput=self.get_logoutput())
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
return function(command, **kwargs)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 82, in checked_call
return _call(command, logoutput, True, cwd, env, preexec_fn, user, wait_for_finish, timeout, path, sudo, on_new_line)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 199, in _call
raise Fail(err_msg)
Fail: Execution of '/usr/bin/yum -d 0 -e 0 -y install 'hadoop_2_2_*'' returned 1.
Error Downloading Packages:
hadoop_2_2_9_0_3393-mapreduce-2.6.0.2.2.9.0-3393.el6.x86_64: failure: hadoop/hadoop_2_2_9_0_3393-mapreduce-2.6.0.2.2.9.0-3393.el6.x86_64.rpm from HDP-2.2: [Errno 256] No more mirrors to try.
hadoop_2_2_9_0_3393-hdfs-2.6.0.2.2.9.0-3393.el6.x86_64: failure: hadoop/hadoop_2_2_9_0_3393-hdfs-2.6.0.2.2.9.0-3393.el6.x86_64.rpm from HDP-2.2: [Errno 256] No more mirrors to try.
ranger_2_2_9_0_3393-hdfs-plugin-0.4.0.2.2.9.0-3393.el6.x86_64: failure: ranger/ranger_2_2_9_0_3393-hdfs-plugin-0.4.0.2.2.9.0-3393.el6.x86_64.rpm from HDP-2.2: [Errno 256] No more mirrors to try.
2016-11-13 23:33:33,465 - Command: /usr/bin/hdp-select status hadoop-hdfs-datanode > /tmp/tmp_H2VkG
Output: hadoop-hdfs-datanode - None版权声明:本文为wang_zhenwei原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。