一開始User反應VC頁面顯示HTTP Status 500 - Internal Server Error

20230928_vCenter7 憑證過期> 網頁HTTP

重開系統後服務帶不起來

20230928_vCenter7 憑證過期> 網頁HTTP

之前了解DNS異常也會導致無法啟動服務
有嘗試在5480更改DNS,重啟後依舊一樣的問題

今天問過客服連線進來使用python檢查簽章

SSH VC下這行指令
#for i in $(/usr/lib/vmware-vmafd/bin/vecs-cli store list); do echo STORE $i; /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $i --text | egrep "Alias|Not After"; done

檢查BACKUP字眼之前的簽章如果有過期就是過期
憑證過期檢查-1

20230928_vCenter7 憑證過期> 網頁HTTP

此時就可以用CA Manger來重新自簽
#/usr/lib/vmware-vmca/bin/certificate-manager
選8
裡面要注意的有:
1. administrator@vsphere.local<看是否自己有修改過domain改成原本的就可以
(比如:administrator@abc.local)

2. 打IP的地方打VC的IP<如果安裝時是用IP當FQDN
總共連續三個要打IP

3. 其他都預設Y就可以了 ( 大約5-10分鐘>效能差一點有可能等30-60分鐘)

20230928_vCenter7 憑證過期&gt; 網頁HTTP

20230928_vCenter7 憑證過期&gt; 網頁HTTP

最後再下
#service-control --start --all


參考文件:
证书过期排查思路:
麻烦您参照以下步骤排查证书过期问题并根据需要更新证书。
*************
注意:操作之前建议您做好 vCenter Server 备份或者给 vCenter Server 虚拟机拍摄一个快照。证书更新后确认 vCenter Server 运行正常,请及时删除快照。
*************
参照以下 VMware KB 确认 STS 证书是否过期。
Checking Expiration of STS Certificate on vCenter Server (79248)
https://kb.vmware.com/s/article/79248
 
2  参考下面 KB 中的内容,执行KB中附带的脚本(fixsts.sh)进行STS根证书的续订操作(如果您无法将脚本文件导入到VC中,您可以尝试通过vi命令手动创建一个文件,然后使用复制粘贴的方式把脚本中的内容复制到新建的文件中即可)。
-----------
    1. Download the "fixsts.sh" script attached to this kb and upload to the impacted PSC or VC with embedded PSC in the /tmp folder, or copy its contents to a text file on the appliance using vi
    2. cd to /tmp folder
    3. Run chmod +x fixsts.sh to make the file executable
    4. Run ./fixsts.sh
    5. Restart vCenter Server Appliance VM
请务必重启 vCenter Server Appliance 虚拟机以使得新 STS 证书生效。
 
    6. Check for expiration and replace any other expired certificates you might have, using certificate manager as shown in How to use vSphere Certificate Manager to Replace SSL Certificates
 
The following one-liner can determine other expired certificates for the vCenter Server Appliance:    
 
for i in $(/usr/lib/vmware-vmafd/bin/vecs-cli store list); do echo STORE $i; /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $i --text | egrep "Alias|Not After"; done
 
If you replaced Machine SSL or VMCA Root certificates, you will need to re-register 2nd party solutions such as NSX, SRM, and vSphere Replication.
-----------
"Signing certificate is not valid" - Regenerating and replacing expired STS certificate using shell script on vCenter Server Appliance 6.5/6.7 (76719)
https://kb.vmware.com/s/article/76719
 
3  续订STS证书完成之后,参考下面的KB,执行KB中附带的脚本(checksts.py)确认vCenter Server STS根证书的有效期是否成功更新。
Checking Expiration of STS Certificate on vCenter Server (79248)
https://kb.vmware.com/s/article/79248
 
4  由于 vCenter Server 的证书之间存在关联性,所以更新了STS根证书之后,您还需要通过下面的工具对 vCenter Server 的其他证书进行续订的操作(按 option 8. Reset all Certificates 续订所有证书)。
 
如何使用 vSphere Certificate Manager 替换 SSL 证书 (2097936)
https://kb.vmware.com/s/article/2097936?lang=zh_CN
 
vCenter ServerWindows 版本):C:\Program Files\VMware\vCenter Server\vmcad\certificate-manager
vCenter Server Appliance/usr/lib/vmware-vmca/bin/certificate-manager
 
注意:在依据此KB操作之前,您需要先运行下面的命令确认VCPNID
/usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost
 
在使用证书管理工具续订证书的过程中,会有一些选项需要您填写,主要分为以下两种情况(其他的选项直接按回车使用默认值即可):
 
如果通过上述命令的返回值是IP地址,那么在使用证书管理工具进行更新所有证书时,有三个位置需要填写相关的IP地址。分别为:
 
Enter proper value for 'IPAddress' (Provide comma separated values for multiple IP addresses)[optional]: 
Enter proper value for 'Hostname' (Provide comma separated values multiple Hostname entries) 
Enter proper value for VMCA Name
 
如果上述命令的返回值的FQDN,那么在使用证书管理工具进行更新所有证书时,有两个位置需要填写相关的FQDN,分别为:
Enter proper value for 'Hostname' (Provide comma separated values multiple Hostname entries) 
Enter proper value for VMCA Name

----------
vCenter无法登录,可以检查此KB进行简单排查:
https://kb.vmware.com/s/article/67818?lang=en_US

arrow
arrow
    創作者介紹
    創作者 PIPI 的頭像
    PIPI

    PIPI的部落格

    PIPI 發表在 痞客邦 留言(0) 人氣()