Symptoms:
"Replace vSphere with Tanzu Supervisor Certificates" に添付されている certmgr コマンドを実行することができません。
time="YYYY-MM-DDThh:mm:ssZ" level=info msg="[/root/certmgr certificates rotate]"time="YYYY-MM-DDThh:mm:ssZ" level=error msg="STS Issue HOK request failedPost \"https://<vCenter Server PNID>/sts/STSService/vsphere.local\": Forbidden"time="YYYY-MM-DDThh:mm:ssZ" level=error msg="Failed to get STS token: Post \"https://<vCenter Server PNID>/sts/STSService/vsphere.local\": Forbidden"time="YYYY-MM-DDThh:mm:ssZ" level=fatal msg="Failed to obtain VC client: %sfailed to login to VC: Post \"https://<vCenter Server PNID>/sts/STSService/vsphere.local\": Forbidden"
注: メッセージのの内容は環境により異なる場合があります。
root@vcsa [ ~ ]# env | grep -i proxy
https_proxy=http://proxy_ip_address:port/
http_proxy=http://proxy_ip_address:port/
no_proxy=localhost, 127.0.0.1
NO_PROXY=localhost, 127.0.0.1
...
免責事項: これは英文の記事 Failed to rotate vSphere with Tanzu Supervisor certificate when a HTTPS Proxy is configured の日本語訳です。記事はベストエフォートで翻訳を進めているため、ローカライズ化コンテンツは最新情報ではない可能性があります。最新情報は英語版の記事で参照してください。
vSphere with Tanzu, vSphere Supervisor
certmgr は vCenter Server で設定されている HTTPS プロキシの影響を受けます。 certmgr が vCenter Server 自身へアクセスする際、プロキシを経由してしまうことでアクセスが失敗することがあります。
Workaround 1: vCenter Server 自身へアクセスする際、プロキシを経由しないように設定します。
設定手順の詳細は "How to configure Proxy Settings for vCenter Server"をご覧ください。
Workaround 2: certmgr を実行する際に環境変数 NO_PROXY を使用します。
no_proxy="localhost, 127.0.0.1, <vCenter Server PNID>" ./certmgr certificates rotate
または
NO_PROXY="localhost, 127.0.0.1, <vCenter Server PNID>" ./certmgr certificates rotate