API を使用した vCenter Server の証明書の更新で "Failed to notify APPLMGMT" と表示される
search cancel

API を使用した vCenter Server の証明書の更新で "Failed to notify APPLMGMT" と表示される

book

Article ID: 442504

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

免責事項:これは英文の記事「Replacement of vCenter Server Certificates Using the API Reports "Failed to notify APPLMGMT"」の日本語訳です。記事はベストエフォートで翻訳を進めているため、ローカライズ化コンテンツは最新情報ではない可能性があります。最新情報は英語版の記事で参照してください。


  • API を使用して vCenter Server の標準の自己署名証明書を CA 署名証明書に置き換える際、証明書は更新されるものの、"Failed to notify APPLMGMT" というエラーが報告されます。

  • vSphere API エンドポイント https://{api_host}/api/vcenter/certificate-management/vcenter/tls を使用すると、JSON レスポンスと共に HTTP コード 500 が返されます。

    "json": {
        "error_type": "ERROR",
        "messages": [
          {
            "args": [
              "Failed to notify APPLMGMT on http://localhost:1080/api/appliance/certificates/notification, on all retries."
            ],
            "default_message": "Exception found (Failed to notify APPLMGMT on http://localhost:1080/api/appliance/certificates/notification, on all retries.)",
            "id": "com.vmware.certificatemanagement.error"
          }
        ]
      }
  • vSphere UI の証明書管理ページから証明書を更新すると下記のエラーで失敗します。

    [CERTIFICATE] Replace cert Failed: Exception found (Failed to notify APPLMGMT on http://localhost:1080/api/appliance/certificates/notification, on all
    retries.)

         

  • PowerCLI で Invoke-vSphereApiClient を使用すると、応答は下記のようになります。

    Invoke-vSphereApiClient: C:\Program Files\PowerShell\Modules\VMware.Sdk.vSphere.vCenter.CertManagement\8.0.2099.24145081\Api\TlsApi.ps1:1116:33
    Line |
    1116 | $invokeResult = Invoke-vSphereApiClient @invokeParams
    
         | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
         
        [ERROR] Exception found (Failed to notify APPLMGMT http://localhost:1080/api/appliance/certificates/notification, on all retries.) 
  • vCenter Server にて下記のログの出力が確認されます。

    /var/log/vmware/vapi/endpoint/endpoint-access.log
    YYYY-MM-DDTHH:MM:SS.710Z | jetty-default-30261       | <session_id> | Invoking                  com.vmware.appliance.certificates.notification:notify
    YYYY-MM-DDTHH:MM:SS.750Z | vAPI-I/O dispatcher-0     | <session_id> |- - [DD/MM/YY-MM-DDTHH:MM:SS+0000] "POST / api/appliance/certificates/notification HTTP/1.1" 403 142 "-" "Java/1.8.0_412" 40

    /var/log/vmware/applmgmt/applmgmt.log
    YYYY-MM-DDTHH:MM:SS AM UTC [8512]DEBUG:vmware.vapi.security.jwt.jwt_authentication_handler:Authenticated user with username -  machine-<UUID>
    YYYY-MM-DDTHH:MM:SS AM UTC [8512]INFO:vmware.appliance.vapi.auth:Authorization request for service_id:
    com.vmware.appliance.certificates.notification, operation_id : notify
    YYYY-MM-DDTHH:MM:SS AM UTC [8512]ERROR:root:Unable to authorize request with authz client: SoapException:
    faultcode: ns0:FailedAuthentication
    faultstring: Password of the user logging on is expired. :: Password of the user logging on is expired. :: User account expired: {Name: vmware-applmgmtservice-<UUID>, Domain: ########.#######.#######.###}
    faultxml: ns0:FailedAuthenticationPassword of the user logging on is expired. :: Password of the user logging on is expired. :: User account expired: {Name: vmware-applmgmtservice-<UUID>, Domain:  ########.#######.#######.###}

    /var/log/vmware/vsphere-ui/logs/vsphere_client_virgo.log

    [YYYY-MM-DDThh:mm:ss] [INFO ] vc-service-async-pool-288304  c.v.v.p.e.propertycollector.SolutionInstallPropertyCollector      Scheduling re-subscription with delay of 5000 milliseconds.
    [YYYY-MM-DDThh:mm:ss] [ERROR] nio-127.0.0.1-5090-exec-3950  com.vmware.vise.mvc.exception.GlobalExceptionHandler              Exception handled while processing request for /ui/certificate-ui/ctrl/certificates/renew-machine-cert:  com.vmware.vapi.std.errors.Error: Error (com.vmware.vapi.std.errors.error) => {
        messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => {
        id = com.vmware.certificatemanagement.error,
        defaultMessage = Exception found (Failed to notify APPLMGMT on http://localhost:1080/api/appliance/certificates/notification, on all retries.),
        args = [Failed to notify APPLMGMT on http://localhost:1080/api/appliance/certificates/notification, on all retries.],
        params = <null>,
        localized = <null>
    }],
        data = <null>,
        errorType = ERROR
    }
            at java.lang.Thread.getStackTrace(Thread.java:1564)
            at com.vmware.vapi.bindings.client.AsyncCallbackSyncAdapter.get_aroundBody1$advice(AsyncCallbackSyncAdapter.java:49)
            at com.vmware.vapi.bindings.client.AsyncCallbackSyncAdapter.get(AsyncCallbackSyncAdapter.java:1)
            at com.vmware.vapi.internal.bindings.Stub.invokeMethod(Stub.java:145)
            at com.vmware.vcenter.certificate_management.vcenter.TlsStub.renew(TlsStub.java:123)
    Caused by: com.vmware.vapi.std.errors.Error: Error (com.vmware.vapi.std.errors.error) => {
        messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => {
        id = com.vmware.certificatemanagement.error,
        defaultMessage = Exception found (Failed to notify APPLMGMT on http://localhost:1080/api/appliance/certificates/notification, on all retries.),
        args = [Failed to notify APPLMGMT on http://localhost:1080/api/appliance/certificates/notification, on all retries.],
        params = <null>,
        localized = <null>
    }],
        data = <null>,
        errorType = ERROR
    }
            at com.vmware.vapi.std.errors.Error._newInstance2(Error.java:671)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.vmware.vapi.internal.bindings.convert.impl.JavaClassStructConverter.createStructBinding(JavaClassStructConverter.java:275)
            at com.vmware.vapi.internal.bindings.convert.impl.JavaClassStructConverter.fromValue(JavaClassStructConverter.java:79)
            at com.vmware.vapi.internal.bindings.convert.impl.JavaClassStructConverter.fromValue(JavaClassStructConverter.java:33)
            at com.vmware.vapi.internal.bindings.TypeConverterImpl$ValueToJavaVisitor.visit(TypeConverterImpl.java:332)
            at com.vmware.vapi.bindings.type.ErrorType.accept(ErrorType.java:31)
            ... 1 common frames omitted




      

Environment

VMware vCenter Server 8.x

Cause

  • これは API あるいは vCenter Server UI 経由での証明書更新に影響する既知の問題です。
  • エラーは、証明書の置き換えにより更新されるはずのソリューションユーザーの有効期限が切れており、システムが不整合な状態となっていることを示します。

Resolution

この問題は、vCenter Server 8.0 Update 3g (Build 24853646) で修正されています。

回避策:

即時のアップグレードできない場合は、下記手順に従って必要な管理サービスを再起動し、証明書の更新を再度実施します。

  1. SSH 経由で root として vCenter Server Appliance にログインします。

  2. lighttpd の適切なサービス名を特定します。vCenter Server のバージョンによって、このサービスは "vami-lighttpd" あるいは "cap-lighttpd のどちらか一方で表記されます。下記のコマンドを実行して、どちらのサービスが存在するかを確認します。
     systemctl list-unit-files | grep lighttpd

     3. Appliance Management サービスと手順 2 で特定した lighttpd サービスを再起動します (例:cap-lighttpd or vami-lighttpd)。
          service-control --restart applmgmt
     systemctl restart <service_name>

     4. 両サービスが active で running となっていることを確認します。
          service-control --status applmgmt
     systemctl status <service_name>

サービスが稼働していることを確認できたら、証明書の更新を再度実施します。