Cannot find a valid baseurl for repo: HDP-3.1-repo-1或者ambari错误Connection to vm-16-6-centos closed.解决

在ambari安装大数据集群的时候,报如下错误:


     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: HDP-3.1-repo-1
Desired version (2.7.3.0) of ambari-agent package is not available.

Connection to vm-16-6-centos closed.
SSH command execution finished
host=vm-16-6-centos, exitcode=1
Command end time 2021-02-05 22:15:23

ERROR: Bootstrap of host vm-16-6-centos fails because previous action finished with non-zero exit code (1)
ERROR MESSAGE: Connection to vm-16-6-centos closed.
  • 解决方法:
    根据错误“Cannot find a valid baseurl for repo: HDP-3.1-repo-1”,在所有集群机器上修改,打开/etc/yum.repos.d
vim /etc/yum.repos.d
#查看文件夹下是不是多了一个文件“ambari-hdp-1.repo”,直接在所有集群机器上删除掉就可以了
rm -rf ambari-hdp-1.repo

原因可能是多次复制或者多次scp操作造成的。

上一篇:C# 重载加号运算符计算两个对象的和的代码


下一篇:求解!MySQL-Front出现 '''' is not a valid date and time. 是什么情况?