Azure RedHat vm yum更新失败,并显示“ SSL对等方拒绝您的证书已过期”。

时间:2018-11-22 18:25:39

标签: azure redhat yum

我刚刚在Azure上启动了标准RedHat 7 VM。

我登录并输入:

sudo yum update

并获得:

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.
...

我认为PAYG许可证包括更新吗?还是当前图像坏了? 也尝试过7.4图片吗?

7 个答案:

答案 0 :(得分:11)

昨天我也遇到了同样的问题。我提到了Redhat支持门户网站上的以下链接。

虽然按照说明进行操作后,上述帖子仍未解决我的问题,但在从问题描述中得到提示后,以下操作对我有效。就我而言,在VM上安装了旧版本的“ rhui-azure-rhel7” RPM,我几周前就安装了该软件,在那里我遇到了与您相同的问题。

curl -o azureclient.rpm https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel7/rhui-azure-rhel7-2.2-74.noarch.rpm
rpm -U azureclient.rpm

希望这会有所帮助。

答案 1 :(得分:6)

MSDN中,您可以运行以下命令来更新Azure RedHat VM上的RHUI客户端证书:

sudo yum update -y --disablerepo='*' --enablerepo='*microsoft*'

现在,您应该能够下载/更新软件包,而不会出现SSL peer rejected your certificate as expired错误。

Azure RedHat Enterprise Linux 7.3 上进行了测试,对我来说很好。

答案 2 :(得分:3)

我以前曾遇到过此问题,Azure支持提供的解决方法是运行以下命令:

wget  https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel7/rhui-azure-rhel7-2.2-74.noarch.rpm
sudo rpm -U rhui-azure-rhel7-2.2-74.noarch.rpm
sudo yum clean all
sudo yum repolist

答案 3 :(得分:1)

您需要使用Microsoft提供的RPM更新RHUI证书。

RHEL 6:

   $ curl -o azureclient.rpm https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel6/Packages/r/rhui-azure-rhel6-2.2-97.noarch.rpm
    $ sudo rpm -U azureclient.rpm
    $ sudo yum clean all
    $ sudo yum repolist all

RHEL 7:

    $ curl -o azureclient.rpm https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel7/Packages/r/rhui-azure-rhel7-2.2-97.noarch.rpm
    $ sudo rpm -U azureclient.rpm
    $ sudo yum clean all
    $ sudo yum repolist all

根本原因:RHUI客户端的证书不再有效,需要更新。

答案 4 :(得分:0)

几天后我也遇到了这个问题。 我找到了这个线程:

https://access.redhat.com/solutions/3167021

答案 5 :(得分:0)

如果使用wget无法下载rhui-azure-rhel7-2.2-74.noarch.rpm,则可以使用手动更新过程。 为我工作。

这个:

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/update-infrastructure-redhat#manual-update-procedure-to-use-the-azure-rhui-servers

简而言之,是:

# Download key
curl -o RPM-GPG-KEY-microsoft-azure-release https://download.microsoft.com/download/9/D/9/9d945f05-541d-494f-9977-289b3ce8e774/microsoft-sign-public.asc

# Validate it
# keyid must be EB3E94ADBE1229CF
# user ID must be "Microsoft (Release signing) <gpgsecurity@microsoft.com>"
gpg --list-packets --verbose < RPM-GPG-KEY-microsoft-azure-release

# Install it
sudo install -o root -g root -m 644 RPM-GPG-KEY-microsoft-azure-release /etc/pki/rpm-gpg
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-microsoft-azure-release

然后,您将能够下载和安装Azure客户端的rpm(如果需要)

# RHEL 6
curl -o azureclient.rpm https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel6/Packages/r/rhui-azure-rhel6-2.2-74.noarch.rpm

# RHEL 7
curl -o azureclient.rpm https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel7/Packages/r/rhui-azure-rhel7-2.2-74.noarch.rpm

# Install
sudo rpm -U azureclient.rpm

答案 6 :(得分:-1)

尝试运行sudo yum upgrade,然后您应该可以使用此功能