AzureLinux云计算系统经验菜鸟

解决RedHat VM在Azure上遇到的“yum: SSL peer rejected your certificate as expired”问题

当你在Azure上部署旧版本RHEL的VM之后运行yum相关命令会出现以下报错:[Errno 14] curl#58 – “SSL peer rejected your certificate as expired.”
这种问题通常发生于部署较旧的RHEL OS映像(例如小于或等于RedHat:RHEL:7.4版本),则会遇到因 TLS/SSL 客户端证书现已过期而出现的 RHUI 连接问题。


Banner_Azure_RHEL_Logo_Andyx.net_.png插图
[本人中所有涉及到 Azure 的实验均在 Azure Global 国际版中进行配置,部分功能可能在 Azure 世纪互联中受到限制]

症状:

当你在Azure上部署旧版本RHEL的VM之后运行yum相关命令会出现以下报错:

Loaded plugins: langpacks, product-id, search-disabled-repos
https://rhui-3.microsoft.com/pulp/repos//content/dist/rhel/rhui/server/7/7Server/x86_64/dotnet/1/debug/repodata/repomd.xml:
[Errno 14] curl#58 - "SSL peer rejected your certificate as expired."
Trying other mirror.
https://rhui-1.microsoft.com/pulp/repos//content/dist/rhel/rhui/server/7/7Server/x86_64/dotnet/1/debug/repodata/repomd.xml:
[Errno 14] curl#58 - "SSL peer rejected your certificate as expired."
Trying other mirror.

原因:

这种问题通常发生于部署较旧的RHEL OS映像(例如小于或等于RedHat:RHEL:7.4版本),则会遇到因 TLS/SSL 客户端证书过期而出现的 RHUI 连接问题。

 

解决:

若要解决此问题,请使用以下命令更新 Azure上的RHUI 客户端程序包:

sudo yum update -y --disablerepo='*' --enablerepo='*microsoft*'
sudo yum clean all
sudo yum makecache

 

参考文档:

Red Hat Update Infrastructure – Azure Virtual Machines | Microsoft Docs

SSL error when connecting to the Red Hat Update Infrastructure (RHUI) Server for Azure Updates – Red Hat Customer Portal

 

(END)