Vcenter 6.7 VCSA证书过期问题处理

1.  故障现象

2022年10月25日,登陆VC报错。

按照报错信息,结合官方文档,判断为STS证书过期导致。

vCenter Server Appliance (VCSA) 6.5.x, 6.7.x or vCenter Server 7.0.x

在/var/log/vmware/vpxd-svcs/vpxd-svcs.log看到类似报错:

ERROR com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl$RequestResponseProcessor opId=] Server rejected the provided time range. Cause:ns0:InvalidTimeRange: The token authority rejected an issue request for TimePeriod [startTime=Thu Oct 02 09:22:13 EST 2022, endTime=Fri Oct 03 09:22:13 EST 2022] :: Signing certificate is not valid at Thu Jan 02 09:22:13 EST 2020, cert validity: TimePeriod [startTime=Wed Jan 06 20:44:39 EST 2010, endTime=Wed Jan 01 20:54:23 EST 2020]

Note: The endTime should be a date in the past if the certificate is expired.

These issue occurs when the Security Token Service (STS) certificate has expired. This causes internal services and solution users to not be able to acquire valid tokens and as a result fails to function as expected.

2. 查看证书过期情况

root@dxcvcsa [ ~ ]# for i in $(/usr/lib/vmware-vmafd/bin/vecs-cli store list); do echo STORE $i; sudo /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $i --text | egrep "Alias|Not After"; done

证书的确已经过期。

3. 更新证书

root@dxcvcsa [ ~ ]# /usr/lib/vmware-vmca/bin/certificate-manager

                 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

                |                                                                     |

                |      *** Welcome to the vSphere 6.7 Certificate Manager  ***        |

                |                                                                     |

                |                   -- Select Operation --                            |

                |                                                                     |

                |      1. Replace Machine SSL certificate with Custom Certificate     |

                |                                                                     |

                |      2. Replace VMCA Root certificate with Custom Signing           |

                |         Certificate and replace all Certificates                    |

                |                                                                     |

                |      3. Replace Machine SSL certificate with VMCA Certificate       |

                |                                                                     |

                |      4. Regenerate a new VMCA Root Certificate and                  |

                |         replace all certificates                                    |

                |                                                                     |

                |      5. Replace Solution user certificates with                     |

                |         Custom Certificate                                          |

                |                                                                     |

                |      6. Replace Solution user certificates with VMCA certificates   |

                |                                                                     |

                |      7. Revert last performed operation by re-publishing old        |

                |         certificates                                                |

                |                                                                     |

                |      8. Reset all Certificates                                      |

                |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|

Note : Use Ctrl-D to exit.

Option[1 to 8]: 4     

Do you wish to generate all certificates using configuration file : Option[Y/N] ? : y

Please provide valid SSO and VC privileged user credential to perform certificate operations.

Enter username [Administrator@vsphere.local]:Administrator@vsphere.local

Enter password:

certool.cfg file exists, Do you wish to reconfigure : Option[Y/N] ? : y

Press Enter key to skip optional parameters or use Previous value.

Enter proper value for 'Country' [Previous value : US] : cn

Enter proper value for 'Name' [Previous value : CA] : CA

Enter proper value for 'Organization' [Previous value : VMware] : VMware

Enter proper value for 'OrgUnit' [Previous value : VMware Engineering] : VMware Engineering

Enter proper value for 'State' [Previous value : California] : GuangDong   

Enter proper value for 'Locality' [Previous value : Palo Alto] : Guangzhou

Enter proper value for 'IPAddress' (Provide comma separated values for multiple IP addresses) [optional] : 127.0.0.1

Enter proper value for 'Email' [Previous value : email@acme.com] : email@acme.com

Enter proper value for 'Hostname' (Provide comma separated values for multiple Hostname entries) [Enter valid Fully Qualified Domain Name(FQDN), For Example : example.domain.com] : dxcvcsa.localdns.com

Enter proper value for VMCA 'Name' :dxcVMCA

You are going to regenerate Root Certificate and all other certificates using VMCA

Continue operation : Option[Y/N] ? : y

Get site nameCompleted [Replacing Machine SSL Cert...]                 

default-site

Lookup all services

Get service default-site:45ee0951-9cf9-4c22-8641-a791f5e935c8

Don't update service default-site:45ee0951-9cf9-4c22-8641-a791f5e935c8

Get service default-site:adf34f62-1d81-467b-9f76-59304c504388

Don't update service default-site:adf34f62-1d81-467b-9f76-59304c504388

Get service default-site:452dfd21-741a-4286-b59f-e4479fd73d02

Don't update service default-site:452dfd21-741a-4286-b59f-e4479fd73d02

Get service 9356d7ff-5045-4720-a142-3e1561dc2caa

Update service 9356d7ff-5045-4720-a142-3e1561dc2caa; spec: /tmp/svcspec_o29ann0i

Get service eb760607-6057-4c8f-bffe-c4459a23361a

Update service eb760607-6057-4c8f-bffe-c4459a23361a; spec: /tmp/svcspec_f9a6t5iv

Get service e72dc500-379b-445c-a6a2-934980d7697f

Update service e72dc500-379b-445c-a6a2-934980d7697f; spec: /tmp/svcspec_q745wbdl

Get service cc66bae3-9a81-4a47-bfc2-f56b521a3491

Update service cc66bae3-9a81-4a47-bfc2-f56b521a3491; spec: /tmp/svcspec_h6wiab6b

Get service ff3c666a-8048-401c-8e5d-3cc29d783d5f

Update service ff3c666a-8048-401c-8e5d-3cc29d783d5f; spec: /tmp/svcspec_734jtjut

Get service 47bbd5fd-cdd8-4c43-a839-9cac3c4ffb14_kv

Update service 47bbd5fd-cdd8-4c43-a839-9cac3c4ffb14_kv; spec: /tmp/svcspec_5q6r0b9z

Get service 0d2020df-096e-401f-bfbe-22ab3c73e321

Update service 0d2020df-096e-401f-bfbe-22ab3c73e321; spec: /tmp/svcspec_rnepbocv

Get service 40d4c99b-3840-4e75-ae9f-01c1a1d51693

Update service 40d4c99b-3840-4e75-ae9f-01c1a1d51693; spec: /tmp/svcspec_2ej9pwvm

Get service f9210573-346b-48c1-a0f4-57e469eed937

Update service f9210573-346b-48c1-a0f4-57e469eed937; spec: /tmp/svcspec_rgu720he

Get service 18db73cb-840d-4dc9-b591-af78cb26699d

Update service 18db73cb-840d-4dc9-b591-af78cb26699d; spec: /tmp/svcspec_vhd1si6e

Get service 447163a3-d02e-41cb-bedf-6bb6bc52c882

Update service 447163a3-d02e-41cb-bedf-6bb6bc52c882; spec: /tmp/svcspec_2vt5_pkn

Get service 1f305057-ad6e-46f2-816f-b638cbe5f8cc

Update service 1f305057-ad6e-46f2-816f-b638cbe5f8cc; spec: /tmp/svcspec_ed9zzks0

Get service 47bbd5fd-cdd8-4c43-a839-9cac3c4ffb14

Update service 47bbd5fd-cdd8-4c43-a839-9cac3c4ffb14; spec: /tmp/svcspec_uu_hj1bs

Get service 81ef1813-f5da-4a52-bf5e-730b0d76c45b

Update service 81ef1813-f5da-4a52-bf5e-730b0d76c45b; spec: /tmp/svcspec_o9q1aqf5

Get service 9968f0d6-7c05-4b00-a0bf-61cd8138c29f

Update service 9968f0d6-7c05-4b00-a0bf-61cd8138c29f; spec: /tmp/svcspec_332zqona

Get service 2472164c-9862-4209-9377-e6c9310bf544

Update service 2472164c-9862-4209-9377-e6c9310bf544; spec: /tmp/svcspec_vllnxe3y

Get service e8e5ba87-5834-40e3-8697-7524754dba64

Update service e8e5ba87-5834-40e3-8697-7524754dba64; spec: /tmp/svcspec_ytjr_fpf

Get service f351ae3e-99db-4cb6-b559-2afe53406c8d

Update service f351ae3e-99db-4cb6-b559-2afe53406c8d; spec: /tmp/svcspec_ahxrtfp2

Get service 81bd2bd9-9fc1-481f-bf8f-744a54e0fb76

Update service 81bd2bd9-9fc1-481f-bf8f-744a54e0fb76; spec: /tmp/svcspec_b9p8e9r_

Get service 87a6c98a-046f-46ec-9aba-d66a30c0a91b

Update service 87a6c98a-046f-46ec-9aba-d66a30c0a91b; spec: /tmp/svcspec_l5nahdu6

Get service b496d4b6-7560-4f58-9129-ce594ee96778

Update service b496d4b6-7560-4f58-9129-ce594ee96778; spec: /tmp/svcspec_qy6458zi

Get service 3888acd4-aa58-4c5f-8b43-30f454f4d97f

Update service 3888acd4-aa58-4c5f-8b43-30f454f4d97f; spec: /tmp/svcspec_tgdq0mzy

Get service d690b63c-6105-4411-8e14-1d10259b812f

Update service d690b63c-6105-4411-8e14-1d10259b812f; spec: /tmp/svcspec_95zuwvcb

Get service 174b1a17-b44b-4967-bb94-4f7c531ba800

Update service 174b1a17-b44b-4967-bb94-4f7c531ba800; spec: /tmp/svcspec_crrn4enf

Get service 47bbd5fd-cdd8-4c43-a839-9cac3c4ffb14_authz

Update service 47bbd5fd-cdd8-4c43-a839-9cac3c4ffb14_authz; spec: /tmp/svcspec_s6zjph53

Get service 34585982-ec94-4a93-bc1f-f80eecdaf88d

Update service 34585982-ec94-4a93-bc1f-f80eecdaf88d; spec: /tmp/svcspec_p_xvj30r

Get service f8a197a6-4fdb-4dcb-baa7-cc4825f824dc

Update service f8a197a6-4fdb-4dcb-baa7-cc4825f824dc; spec: /tmp/svcspec_mnjwbgp6

Get service dfa6cc50-dbe5-4997-bd8d-949e75be87e8

Update service dfa6cc50-dbe5-4997-bd8d-949e75be87e8; spec: /tmp/svcspec_fzje6ttg

Get service eb760607-6057-4c8f-bffe-c4459a23361a_com.vmware.vsphere.client

Don't update service eb760607-6057-4c8f-bffe-c4459a23361a_com.vmware.vsphere.client

Get service bc5ba386-ce79-42de-a8f9-67c6b8f03bf1

Update service bc5ba386-ce79-42de-a8f9-67c6b8f03bf1; spec: /tmp/svcspec_40_4ncxp

Get service 024591a5-3492-4567-81d7-0439f2113196

Update service 024591a5-3492-4567-81d7-0439f2113196; spec: /tmp/svcspec__s5my1_r

Get service 5944fc2d-78d7-42f1-9a17-efc9fa0bbff3

Update service 5944fc2d-78d7-42f1-9a17-efc9fa0bbff3; spec: /tmp/svcspec_wnt0axw7

Get service eb760607-6057-4c8f-bffe-c4459a23361a_com.commvault.vsa

Don't update service eb760607-6057-4c8f-bffe-c4459a23361a_com.commvault.vsa

Updated 31 service(s)

Status : 60% Completed [Replace vpxd-extension Cert...]                    

2022-10-26T00:46:00.988Z  Updating certificate for "com.vmware.imagebuilder" extension

Status : 85% Completed [starting services...]    

Status : 100% Completed [All tasks completed successfully]                      

3.1更新完毕,查看服务状态

service-control --stop –-all

service-control --start --all

3.2更新完毕,查看证书状态

root@dxcvcsa [ ~ ]#  for i in $(/usr/lib/vmware-vmafd/bin/vecs-cli store list); do echo STORE $i; sudo /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $i --text | egrep "Alias|Not After"; done

STORE MACHINE_SSL_CERT

Alias : __MACHINE_CERT

Not After : Oct 26 00:54:00 2024 GMT

STORE TRUSTED_ROOTS

Alias : 50b4e9c55d6b2db1034e66bfc38a01e2767c5137

            Not After : Oct 14 03:02:08 2030 GMT

Alias : 450298f685afd4f275d79a596fa4ec42a8d38fc8

            Not After : Oct 19 01:38:45 2032 GMT

Alias : 92e2f9521f9c605fb523b539e877a795a2f4d7b5

            Not After : Oct 20 00:44:35 2032 GMT

STORE TRUSTED_ROOT_CRLS

Alias : 7f39f6f28fdfb986ca190af6fafe42eaf534d304

Alias : d7fafe3b63ce838a05e20f65d87de85c7010f40e

Alias : ba124fb88dd50bf2878bcc5dbb75d5bf0b4ee7dc

STORE machine

Alias : machine

            Not After : Oct 26 00:54:05 2024 GMT

STORE vsphere-webclient

Alias : vsphere-webclient

            Not After : Oct 26 00:54:06 2024 GMT

STORE vpxd

Alias : vpxd

            Not After : Oct 26 00:54:07 2024 GMT

STORE vpxd-extension

Alias : vpxd-extension

            Not After : Oct 26 00:54:10 2024 GMT

STORE APPLMGMT_PASSWORD

STORE data-encipherment

Alias : data-encipherment

            Not After : Oct 19 02:54:13 2022 GMT

STORE SMS

Alias : sms_self_signed

            Not After : Oct 19 03:05:10 2030 GMT

STORE BACKUP_STORE

Alias : bkp___MACHINE_CERT

            Not After : Oct 26 00:38:48 2024 GMT

Alias : bkp_machine

            Not After : Oct 26 00:38:56 2024 GMT

Alias : bkp_vsphere-webclient

            Not After : Oct 26 00:39:01 2024 GMT

Alias : bkp_vpxd

            Not After : Oct 26 00:39:05 2024 GMT

Alias : bkp_vpxd-extension

            Not After : Oct 26 00:39:12 2024 GMT

STORE BACKUP_STORE_H5C

Alias : bkp__MACHINE_CERT

            Not After : Oct 25 00:34:35 2024 GMT

Alias : bkpmachine

            Not After : Oct 25 00:35:58 2024 GMT

Alias : bkpvsphere-webclient

            Not After : Oct 25 00:35:59 2024 GMT

Alias : bkpvpxd

            Not After : Oct 25 00:35:59 2024 GMT

Alias : bkpvpxd-extension

            Not After : Oct 25 00:35:59 2024 GMT

root@dxcvcsa [ ~ ]#

3.3正常登录VC  查看证书信息

重新生成证书所用信息,已在证书体现,有个细节就是country填的是cn,这里显示的还是US。

有专用脚本检测证书状态。

3.4新生成证书存放位置

root@dxcvcsa [ /usr/lib/vmware-vmca/share/config ]# cat /var/tmp/vmware/certool.cfg

Country = cn

Name = CA

Organization = VMware

OrgUnit = VMware Engineering

State = GuangDong

Locality = Guangzhou

IPAddress = 127.0.0.1

Email = email@acme.com

Hostname = dxcvcsa.localdns.com

root@dxcvcsa [ /usr/lib/vmware-vmca/share/config ]#

3.5默认证书存放位置

The Certool.cfg is located at:

vCenter Server Appliance: /usr/lib/vmware-vmca/share/config/certool.cfg

External Platform Service Controller Appliance: /usr/lib/vmware-vmca/share/config/certool.cfg

root@dxcvcsa [ ~ ]# cat  /usr/lib/vmware-vmca/share/config/certool.cfg

#

# Template file for a CSR request

#

# Country is needed and has to be 2 characters

Country = US

Name    = CA

Organization = VMware

OrgUnit = VMware Engineering

State = California

Locality = Palo Alto

IPAddress = 127.0.0.1

Email = email@acme.com

Hostname = server.acme.com

root@dxcvcsa [ ~ ]# cat /usr/lib/vmware-vmca/share/config/certool.cfg

#

# Template file for a CSR request

#

# Country is needed and has to be 2 characters

Country = US

Name    = CA

Organization = VMware

OrgUnit = VMware Engineering

State = California

Locality = Palo Alto

IPAddress = 127.0.0.1

Email = email@acme.com

Hostname = server.acme.com

Tips:

如果不知道PNID可以用下面命令查一下:

/usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost

参考文献

1. Checking Expiration of STS Certificate on vCenter Servers (79248)

2. How to use vSphere Certificate Manager to Replace SSL Certificates (2097936)



作者:samyang2558
链接:https://www.jianshu.com/p/af415de235f5
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/223515.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

深度探索 Python Pyramid 框架

更多资料获取 📚 个人网站:ipengtao.com Pyramid是一个灵活且强大的Python web框架,广泛用于构建各种规模的Web应用程序。本文将深度探索Pyramid框架,介绍其核心概念、应用场景以及一些高级特性。 安装与基础用法 首先&#xf…

Python if else条件语句详解

if 分支使用布尔表达式或布尔值作为分支条件来进行分支控制。Python 的 if 分支既可作为语句使用,也可作为表达式使用。下面先介绍 if 分支作为语句使用的情形。 if 语句可使用任意表达式作为分支条件来进行分支控制。Python 的 if 语句有如下三种形式:…

通过仿真理解信道化接收机分析过程

概要 信道化从子信道带宽划分上可分为临界抽取和非临界抽取两种,从各子信道中心频率布局上可分为偶型排列和奇型排列,从处理流程上可分为信道化分析与信道化综合过程。本文主要通过仿真来理解偶型排列/临界抽取/信道化分析过程。 基本原理 常规的数字…

maven生命周期回顾

目录 文章目录 **目录**两种最常用打包方法:生命周期: 两种最常用打包方法: 1.先 clean,然后 package2.先 clean,然后install 生命周期: 根据maven生命周期,当你执行mvn install时&#xff0c…

Python中字符串拼接及其应用场景

更多资料获取 📚 个人网站:ipengtao.com 字符串拼接是Python中常见而重要的操作,它涉及到将多个字符串连接成一个字符串。本文将深入探讨Python中字符串拼接的不同方式、性能比较、以及在实际应用中的场景和最佳实践。 常见的字符串拼接方法…

【Pytorch使用自制数据集,Dataloader】

数据集结构 话不多说,直接上核心代码 myDataset.py from collections import Counter from torch.utils.data import Dataset import os from PIL import Imageclass MyDataset(Dataset):"""读取自制的数据集args:- image_dir: 图片的地址- labe…

腾讯云轻量应用服务器怎么安装BT宝塔面板?

腾讯云轻量应用服务器宝塔面板怎么用?轻量应用服务器如何安装宝塔面板?在镜像中选择宝塔Linux面板腾讯云专享版,在轻量服务器防火墙中开启8888端口号,然后远程连接到轻量服务器执行宝塔面板账号密码查询命令,最后登录和…

数据结构 | 查漏补缺之哈希表、最短路径、二叉树与森林的转换

哈希表是什么? 或者说 设图采用邻接表的存储结构,写对图的删除顶点和删除边的算法步骤 删除边 删除点 最短路径问题 判断一个有向图是否有环(回路)可以用下列哪些办法() 存在拓扑序列,就有回路…

JVM之基本概念(一)

(1) 基本概念: JVM 是可运行 Java 代码的假想计算机 ,包括一套字节码指令集、一组寄存器、一个栈、一个垃圾回收,堆 和 一个存储方法域。JVM 是运行在操作系统之上的,它与硬件没有直接的交互。 (2) 运行过程: 我们都…

关于PDE频率的问题

讨论:关于PDE频率的问题 关于PDE频率的问题问题复现讨论解决方法 关于PDE频率的问题 问题 在这篇文章下有人提出一个问题: 在使用物理信息神经网络对固定求解区域内进行物理场的预测,具体来说是在求解传热问题。在定义域为1或者大于0.4的正…

Python Opencv实践 - 简单的AR项目

这个简单的AR项目效果是,通过给定一张静态图片作为要视频中要替换的目标物品,当在视频中检测到图片中的物体时,通过单应矩阵做投影,将视频中的物体替换成一段视频播放。这个项目的所有素材来自自己的手机拍的视频。 静态图片&…

手机电脑同步的时间管理工具

有不少上班族会发现自己有太多的工作要完成,并且在工作中往往会浪费很多时间在无关紧要的事情上,而不是专注于真正重要的任务,因此没有足够的时间来完成所有任务。在这种情况下,我们可以使用时间管理软件来帮助自己优先考虑重要的…

Flink Flink数据写入Kafka

一、环境准备 flink 1.14写入Kafka&#xff0c;首先在pom.xml文件中导入相关依赖 <properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><flink.version>1.14.6</flink.version><spark.version>2.4.3</spa…

鸿蒙一出,android开发处境再受重创

华为宣布其自研操作系统鸿蒙HarmonyOSNEXT开发者预览版将不再兼容安卓系统&#xff0c;这一消息引起了广泛关注和热议。这一决策标志着华为正式告别安卓&#xff0c;摆脱了外部的制约&#xff0c;开始着手打造一个全新的生态系统。 鸿蒙系统4发布一个月&#xff0c;截至目前&a…

Java LeetCode篇-深入了解二叉树经典解法(三种方式实现:获取二叉树的最大深度)

&#x1f525;博客主页&#xff1a; 【小扳_-CSDN博客】 ❤感谢大家点赞&#x1f44d;收藏⭐评论✍ 文章目录 1.0 对称二叉树 1.1 判断对称二叉树实现思路 1.2 代码实现&#xff1a;判断对称二叉树 2.0 二叉树的最大深度 2.1 使用递归实现获取二叉树的最大深度思路 2.2 代码实…

书-用数组给已知数组插入某个元素(3)

#include<stdio.h> int main(){int i ;int b[8]{99,65,87,23,44,55};//在87前面插入一个数int n6 ;// 长度for (in;i>3;i--)b[i]b[i-1]; //解释&#xff1a;原来23是第三个位置&#xff0c;但是插入数字后变成了第四个位置//就是把b[4]赋值给b[3];b[2]1000;nn1;//一定…

深入理解MySQL事务隔离级别与锁机制

表锁&#xff1a; 行锁&#xff1a; InnoDB和MyISAM最大的不同有两点&#xff1a; InnoDB支持事务&#xff08;TRANSACTION&#xff09;InnoDB支持行锁 MyISAM在执行查询SELECT前&#xff0c;会自动给涉及的所有表加读锁&#xff0c;在执行update、insert、delete操作会自动…

【多线程】线程的三种常见创建方式

文章目录 线程创建方式1——Thread线程创建方式2——Runnable线程创建方式2——匿名内部类线程创建方式3——Callable、FutureTask,带返回值 线程其实是程序中的一条执行路径。 那怎样的程序才是多线程程序呢&#xff1f; 例如12306网站就是支持多线程的&#xff0c;因为同时可…

ArcGIS Enterprise on Kubernetes 11.1安装示例

博客主页&#xff1a;https://tomcat.blog.csdn.net 博主昵称&#xff1a;农民工老王 主要领域&#xff1a;Java、Linux、K8S 期待大家的关注&#x1f496;点赞&#x1f44d;收藏⭐留言&#x1f4ac; 目录 安装前置条件基本安装解压文件生成秘钥执行安装脚本 配置DNS方法一方法…

算法通关村第二关—K个一组反转(黄金)

K个一组翻转链表 题目介绍 LeetCode25.给你一个链表&#xff0c;每k个节点一组进行翻转&#xff0c;请你返回翻转后的链表。k是一个正整数&#xff0c;它的值小于或等于链表的长度。如果节点总数不是k的整数倍&#xff0c;那么请将最后剩余的节点保持原有顺序。进阶&#xff1…