证书过期,certificate-manager卡在85%
search cancel

证书过期,certificate-manager卡在85%

book

Article ID: 315563

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

vcenter 7.0 证书过期导致无法连接vsphere client 试图通过ssh,更新认证,但无法连接,输入用户名和密码,没有反应。 尝试连接VAMI,但是输入用户名密码,显示Exception in invoking authentication handler [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1076) 连接vsphere client, 显示code 500的报错

Resolution

certificate-manager执行失败, 首先可以查  certificate-manager.log.
然后

  1.  检查  /etc/hosts 文件。
    当前文件下 只有一行:
     127.0.0.1  hostname.xxx.xxxx   hostname localhost

    而正常的 hosts 文件中, 应该是这样的:
    127.0.0.1  hostname.xxx.xxxx   hostname localhost
    ::1  hostname.xxx.xxxx   hostname localhostipv6-localhost ipv6-loopback

    为了稳妥起见, 我们将文件修改为标准的样子,添加一行,使得hosts文件中有2行。
  2. 再次执行certificate-manager,
    1. 当要求输入VCSA的IP时, 输入真实IP

    2. 当需要指定 将证书签发给谁时, 
      输入 用逗号分隔的3个值,  <IPv4>,<FQDN>,<short hostname>
      这样做的好处是, 无论vCenter中需要哪种格式,都可以match 匹配。

    3. 当执行certificate-manager 遇到报错时, 根据certificate-manager.log中的error message:
       'lstool reregister' failed: 1
      我们找到了iKB, 知道需要 替换 STS证书, 即使 STS 证书没有过期, 也是要替换的。

    4. 根据kb , 执行 fixsts.sh后, stop 并start 所有service, 这时候 所有service 可以正常启动了。
    5. 假如 restart 所以service时 依然有报错, 那么我们会建议 reboot VCSA。
         并再次执行 certificate-manager, 但现在看, 不需要这一步了。