vCenter Server で HTTPS プロキシを構成していると vSphere with Tanzu の Supervisor の証明書を更新できない
search cancel

vCenter Server で HTTPS プロキシを構成していると vSphere with Tanzu の Supervisor の証明書を更新できない

book

Article ID: 421387

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

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"

    注: メッセージのの内容は環境により異なる場合があります。

  • certmgr コマンドの実行環境で env コマンドを実行すると、http_proxyhttps_proxy といった環境変数が定義されていることが確認できます。
    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 の日本語訳です。記事はベストエフォートで翻訳を進めているため、ローカライズ化コンテンツは最新情報ではない可能性があります。最新情報は英語版の記事で参照してください。

Environment

vSphere with Tanzu, vSphere Supervisor

Resolution

certmgr は vCenter Server で設定されている HTTPS プロキシの影響を受けます。 certmgr が vCenter Server 自身へアクセスする際、プロキシを経由してしまうことでアクセスが失敗することがあります。

Additional Information

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