前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何禁止ambari-server.log中显示cloudera地址异常栈的解决方案分享

如何禁止ambari-server.log中显示cloudera地址异常栈的解决方案分享

作者头像
create17
发布2023-02-13 19:06:07
4040
发布2023-02-13 19:06:07
举报
如何解决日志中 Could not load version definition for HDP-x.x identified by https://archive.cloudera.com 报错问题呢?

是的,今天就来说一下 ambari-server.log 日志中出现上述错误的原因及解决办法。

由于 cloudera 提供的镜像源不对外开放了,所以 ambari 源码中内置的 repo 源地址在 amabri-server 启动时就是加载异常,从而报了这个错误。

这个错误是 WARN 级别,倒不影响 ambari 功能使用,但有些初学者看到此异常还是会心头一紧;或者有基于 Ambari 二次开发的企业,也想把这个异常栈从日志中去除,毕竟很碍眼。

那么如何去除呢?很简单。

修改 hdp stack 下各版本的 repoinfo.xml 文件,将 baseurl 中的 public-repo-1.hortonworks.com 地址去掉即可,或修改为以下内容:

代码语言:javascript
复制
<?xml version="1.0"?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<reposinfo>
  <os family="redhat7">
    <repo>
      <baseurl></baseurl>
      <repoid>HDP-3.1</repoid>
      <reponame>HDP</reponame>
      <unique>true</unique>
    </repo>    
    <repo>
      <baseurl></baseurl>
      <repoid>HDP-3.1-GPL</repoid>
      <reponame>HDP-GPL</reponame>
      <unique>true</unique>
      <tags>
        <tag>GPL</tag>
      </tags>
    </repo>
    <repo>
      <baseurl></baseurl>
      <repoid>HDP-UTILS-1.1.0.22</repoid>
      <reponame>HDP-UTILS</reponame>
      <unique>false</unique>
    </repo>
  </os>
</reposinfo>

注意:我的系统是 centos7,所以只保留了 redhat7。请根据实际情况,保留对应系统的 reposinfo。

最后,重启 ambari-server,我们会发现图片中的报错消失了。

温馨提示: 与本篇内容相关的文章建议也看一看,地址:Ambari部署HDP时,Select Version时页面数据来源解析

好了,本篇分享就到此结束了,欢迎大家加我好友一起讨论交流Ambari。

作者介绍: Ambari 资深用户,输出很多技术干货,相关二次开发实战经验丰富,帮助很多人解决疑难问题,录有两门 Ambari 实战课程,学员人数 300+,在圈子里有一定的知名度。来加我好友(create17_)吧,可免费帮你制定 Ambari 学习计划!

---------- END ----------

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2022-11-15,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 大数据实战演练 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档