CM报错处理

  • GPG密钥导入失败:尝试导入Cloudera的GPG密钥时出现错误。
  • Yum仓库无法访问:由于网络问题或配置问题,yum无法访问其仓库
[root@localhost CM]# 
[root@localhost CM]# ls
cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm    cloudera-manager-server-7.4.4-15850731.el7.x86_64.rpm
cloudera-manager-daemons-7.4.4-15850731.el7.x86_64.rpm
[root@localhost CM]# sudo rpm -ivh cloudera-manager-daemons-7.4.4-15850731.el7.x86_64.rpm
警告:cloudera-manager-daemons-7.4.4-15850731.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID b0b19c9f: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:cloudera-manager-daemons-7.4.4-15################################# [100%]
[root@localhost CM]# sudo rpm -ivh cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm
警告:cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID b0b19c9f: NOKEY
错误:依赖检测失败:
        /lib/lsb/init-functions 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        httpd 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        mod_ssl 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        openssl-devel 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        python-psycopg2 <= 2.8.5 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        MySQL-python 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        libpq.so.5()(64bit) 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
[root@localhost CM]# sudo rpm -ivh cloudera-manager-server-7.4.4-15850731.el7.x86_64.rpm
警告:cloudera-manager-server-7.4.4-15850731.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID b0b19c9f: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:cloudera-manager-server-7.4.4-158################################# [100%]
Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-server.service to /usr/lib/systemd/system/cloudera-scm-server.service.
[root@localhost CM]# sudo rpm -ivh cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm
警告:cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID b0b19c9f: NOKEY
错误:依赖检测失败:
        /lib/lsb/init-functions 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        httpd 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        mod_ssl 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        openssl-devel 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        python-psycopg2 <= 2.8.5 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        MySQL-python 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        libpq.so.5()(64bit) 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
[root@localhost CM]# sudo rpm --import https://archive.cloudera.com/cm7/7.4.4/allkeys.asc
错误:https://archive.cloudera.com/cm7/7.4.4/allkeys.asc:公钥 1  不受到保护。
错误:https://archive.cloudera.com/cm7/7.4.4/allkeys.asc:公钥 2  不受到保护。
错误:https://archive.cloudera.com/cm7/7.4.4/allkeys.asc:公钥 3  不受到保护。
[root@localhost CM]# sudo yum install redhat-lsb-core httpd mod_ssl openssl-devel python-psycopg2 MySQL-python postgresql-libs
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"


 One of the configured repositories failed (未知),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     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: base/7/x86_64
[root@localhost CM]# ^C
[root@localhost CM]# 

1. GPG密钥导入问题

首先,确保使用的是正确的GPG密钥URL。如果之前提供的链接无效,可以:

直接下载并手动导入GPG密钥:

wget https://archive.cloudera.com/cm7/7.4.4/redhat7/yum/RPM-GPG-KEY-cloudera
sudo rpm --import RPM-GPG-KEY-cloudera
  • 网络连接正常,并且已经成功导入了Cloudera的GPG密钥。然而,cloudera-manager-agent仍然存在依赖性问题。
[root@localhost CM]# 
[root@localhost CM]# wget https://archive.cloudera.com/cm7/7.4.4/redhat7/yum/RPM-GPG-KEY-cloudera
--2025-03-13 11:47:16--  https://archive.cloudera.com/cm7/7.4.4/redhat7/yum/RPM-GPG-KEY-cloudera
正在解析主机 archive.cloudera.com (archive.cloudera.com)... 151.101.108.167
正在连接 archive.cloudera.com (archive.cloudera.com)|151.101.108.167|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1718 (1.7K) [binary/octet-stream]
正在保存至: “RPM-GPG-KEY-cloudera”

100%[===================================================================>] 1,718       --.-K/s 用时 0s      

2025-03-13 11:47:17 (36.2 MB/s) - 已保存 “RPM-GPG-KEY-cloudera” [1718/1718])

[root@localhost CM]# sudo rpm --import RPM-GPG-KEY-cloudera
[root@localhost CM]# ls
cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm
cloudera-manager-daemons-7.4.4-15850731.el7.x86_64.rpm
cloudera-manager-server-7.4.4-15850731.el7.x86_64.rpm
RPM-GPG-KEY-cloudera
[root@localhost CM]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=128 time=45.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=128 time=52.1 ms
^Z
[1]+  已停止               ping 8.8.8.8
[root@localhost CM]# vi /etc/resolv.conf
[root@localhost CM]# sudo rpm -ivh *.rpm
错误:依赖检测失败:
        /lib/lsb/init-functions 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        httpd 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        mod_ssl 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        openssl-devel 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        python-psycopg2 <= 2.8.5 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        MySQL-python 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        libpq.so.5()(64bit) 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
[root@localhost CM]# sudo rpm -ivh cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm
错误:依赖检测失败:
        /lib/lsb/init-functions 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        httpd 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        mod_ssl 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        openssl-devel 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        python-psycopg2 <= 2.8.5 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        MySQL-python 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
        libpq.so.5()(64bit) 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
[root@localhost CM]# 
[root@localhost CM]# nslookup mirrorlist.centos.org
;; Got recursion not available from 192.168.125.2, trying next server
Server:         8.8.8.8
Address:        8.8.8.8#53

** server can't find mirrorlist.centos.org: NXDOMAIN

[root@localhost CM]# 
[root@localhost CM]# sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@localhost CM]# sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
--2025-03-13 16:23:46--  http://mirrors.aliyun.com/repo/Centos-7.repo
正在解析主机 mirrors.aliyun.com (mirrors.aliyun.com)... 220.185.164.206, 220.185.164.223, 220.185.164.221
正在连接 mirrors.aliyun.com (mirrors.aliyun.com)|220.185.164.206|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2523 (2.5K) [application/octet-stream]
正在保存至: “/etc/yum.repos.d/CentOS-Base.repo”

100%[====================================================================>] 2,523       --.-K/s 用时 0s      

2025-03-13 16:23:46 (378 MB/s) - 已保存 “/etc/yum.repos.d/CentOS-Base.repo” [2523/2523])

[root@localhost CM]# 
  • 处理依赖问题
# 备份现有的 Yum 源配置文件
sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 下载并替换为阿里云的镜像配置
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 清除 Yum 缓存并重新生成缓存
sudo yum clean all
sudo yum makecache
# 安装所需的依赖包
sudo yum install redhat-lsb-core httpd mod_ssl openssl-devel python2-psycopg2 MySQL-python postgresql-libs
  • 需要 python-psycopg2 版本小于或等于 2.8.5
 [root@localhost CM]# sudo rpm -ivh cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm
错误:依赖检测失败:
        python-psycopg2 <= 2.8.5 被 cloudera-manager-agent-7.4.4-15850731.el7.x86_64 需要
[root@localhost CM]#
# 清除现有的 python-psycopg2 包(如果有)
sudo yum remove python-psycopg2

# 重新安装指定版本的 python-psycopg2
sudo yum install python-psycopg2-2.5.1

# 验证 python-psycopg2 是否已正确安装
rpm -qa | grep python-psycopg2

# 如果输出显示 python-psycopg2-2.5.1-4.el7.x86_64,则继续安装 cloudera-manager-agent
sudo rpm -ivh cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm
[root@localhost CM]# 
[root@localhost CM]# sudo yum remove python-psycopg2
已加载插件:fastestmirror, langpacks
参数 python-psycopg2 没有匹配
不删除任何软件包
[root@localhost CM]# sudo yum install python-psycopg2-2.5.1
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 python-psycopg2.x86_64.0.2.5.1-4.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

==============================================================================================================
 Package                        架构                  版本                          源                   大小
==============================================================================================================
正在安装:
 python-psycopg2                x86_64                2.5.1-4.el7                   base                132 k

事务概要
==============================================================================================================
安装  1 软件包

总下载量:132 k
安装大小:424 k
Is this ok [y/d/N]: y
Downloading packages:
python-psycopg2-2.5.1-4.el7.x86_64.rpm                                                 | 132 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : python-psycopg2-2.5.1-4.el7.x86_64                                                        1/1 
  验证中      : python-psycopg2-2.5.1-4.el7.x86_64                                                        1/1 

已安装:
  python-psycopg2.x86_64 0:2.5.1-4.el7                                                                        

完毕!
[root@localhost CM]# rpm -qa | grep python-psycopg2
python-psycopg2-2.5.1-4.el7.x86_64
[root@localhost CM]# sudo rpm -ivh cloudera-manager-agent-7.4.4-15850731.el7.x86_64.rpm
准备中...                          ################################# [100%]
正在升级/安装...
   1:cloudera-manager-agent-7.4.4-1585################################# [100%]
Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-agent.service to /usr/lib/systemd/system/cloudera-scm-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-supervisord.service to /usr/lib/systemd/system/cloudera-scm-supervisord.service.
[root@localhost CM]# 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Davina_yu

您的打赏,是我灵感源泉,求投喂

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值