vm.gowatana.jp

NEOにほんごVMware(仮)

Aria Automation 8.18 でクラウド アカウントのデータ収集エラーを復旧してみる。

Aria Automation のクラウド アカウントでの「データ収集」は、一定回数の失敗があると停止してしまうようです。KB で復旧手順が紹介されているので、Aria Automation 8.18.1 で試してみます。

 

今回の内容です。

 

今回の環境

SDDC Manager のパスワード自動ローテーションで、Aria Automation から vCenter Server に接続するユーザーが認証エラーになりました。ユーザーの認証情報を再設定することで、認証エラー自体は解消してあります。

 

Assembler もしくは Service Broker の「インフラストラクチャ」タブ →「接続」→「クラウド アカウント」で状態を確認すると、「更新」や「イメージ同期」ボタンによるステータスは正常になっていますが、「データ収集」はエラーのままになっています。

 

ちなみに、vCenter Server ユーザーは、別のユーザーを指定したうえであらためて「Cloud Foundation マネージド サービスの認証情報を使用」を指定することで再生成してあります。しかし、しばらく待っても「データ収集」はエラーのままになっています。

※自動生成される「vra-svc-~@vsphere.local」ユーザーを利用する場合は、SDDC Manager でのパスワード ローテーションを無効にしておいたほうが無難かもしれません。

 

1. Aria Automation 仮想アプライアンスへのログイン

Aria Automation 仮想アプライアンスのうち 1台(この環境では 192.168.79.31)に、root ユーザーで SSH ログインします。

$ ssh root@192.168.79.31

 

2. provisioning-db データベースへの接続

vracli コマンドで、PostgreSQL の「provisioning-db」データベースにログインします。接続確認のメッセージがあるので、「yes」を入力して Enter キーを押します。

root@vcf-m01-auto-01 [ ~ ]# vracli dev psql provisioning-db
This execution will be recorded!
'psql' is a developer command. Type 'yes' if you want to continue, or 'no' to stop: yes
2025-03-24 04:15:56,070 [INFO] Logging into database provisioning-db
Defaulted container "control" out of: control, init (init)
psql (14.13)
Type "help" for help.

provisioning-db=#

 

直接 provisioning-db データベースに接続しましたが、ほかにも下記のデータベースが存在します。

provisioning-db=# \l
                                            List of databases
        Name         |        Owner        | Encoding |   Collate   |    Ctype    |   Access privileges
---------------------+---------------------+----------+-------------+-------------+-----------------------
 abx-db              | abx-db              | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 approval-db         | approval-db         | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 catalog-db          | catalog-db          | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 cci-db              | cci-db              | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 ccs-k3s-db          | ccs-k3s-db          | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 cgs-db              | cgs-db              | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 cmx-db              | cmx-db              | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 codestream-db       | codestream-db       | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 ebs-db              | ebs-db              | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 form-db             | form-db             | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 hcmp-db             | hcmp-db             | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 idem-db             | idem-db             | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 identity-db         | identity-db         | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 lemans-resources-db | lemans-resources-db | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 migration-db        | migration-db        | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 postgres            | postgres            | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 project-db          | project-db          | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 provisioning-db     | provisioning-db     | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 relocation-db       | relocation-db       | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 repmgr-db           | repmgr-db           | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 tango-blueprint-db  | tango-blueprint-db  | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0           | postgres            | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
                     |                     |          |             |             | postgres=CTc/postgres
 template1           | postgres            | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
                     |                     |          |             |             | postgres=CTc/postgres
 terraform-db        | terraform-db        | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 userprofile-db      | userprofile-db      | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 vco-db              | vco-db              | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 vro-gateway-db      | vro-gateway-db      | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
(27 rows)

 

3. endpoint_state テーブルの確認

今回の更新対象テーブルは「endpoint_state」です。

provisioning-db=# \dt endpoint_state
                 List of relations
 Schema |      Name      | Type  |      Owner
--------+----------------+-------+-----------------
 public | endpoint_state | table | provisioning-db
(1 row)

 

endpoint_state テーブルの定義を確認すると、更新対象のカラム(列)である「custom_properties」のデータ型は、jsonb(JOSN をバイナリ形式で格納)になっています。

provisioning-db=# \d endpoint_state
                       Table "public.endpoint_state"
             Column              |  Type   | Collation | Nullable | Default
---------------------------------+---------+-----------+----------+---------
 document_self_link              | text    |           | not null |
 document_auth_principal_link    | text    |           |          |
 document_expiration_time_micros | bigint  |           | not null | 0
 document_owner                  | text    |           |          |
 document_update_action          | text    |           |          |
 document_update_time_micros     | bigint  |           | not null | 0
 document_version                | bigint  |           | not null | 0
 id                              | text    |           | not null |
 name                            | text    |           |          |
 c_desc                          | text    |           |          |
 custom_properties               | jsonb   |           |          |
 tenant_links                    | jsonb   |           |          |
 group_links                     | jsonb   |           |          |
 tag_links                       | jsonb   |           |          |
 org_auth_link                   | text    |           |          |
 project_auth_link               | text    |           |          |
 owner_auth_link                 | text    |           |          |
 msp_auth_link                   | text    |           |          |
 creation_time_micros            | bigint  |           |          | 0
 region_id                       | text    |           |          |
 endpoint_links                  | jsonb   |           |          |
 compute_host_link               | text    |           |          |
 expanded_tags                   | jsonb   |           |          |
 document_creation_time_micros   | bigint  |           |          | 0
 endpoint_type                   | text    |           | not null |
 auth_credentials_link           | text    |           |          |
 compute_link                    | text    |           |          |
 compute_description_link        | text    |           |          |
 resource_pool_link              | text    |           |          |
 parent_link                     | text    |           |          |
 associated_endpoint_links       | jsonb   |           |          |
 endpoint_properties             | jsonb   |           |          |
 maintenance_mode                | boolean |           |          |
 mobility_endpoint_links         | jsonb   |           |          |
 license_config                  | text    |           |          |
Indexes:
    "endpoint_state_pkey" PRIMARY KEY, btree (document_self_link)
    "endpoint_state__idx__associated_endpoint_links" gin (associated_endpoint_links)
    "endpoint_state__idx__compute_host_link" btree (compute_host_link)
    "endpoint_state__idx__compute_link" btree (compute_link)
    "endpoint_state__idx__creation_time_micros" btree (creation_time_micros)
    "endpoint_state__idx__custom_properties" gin (custom_properties)
    "endpoint_state__idx__document_creation_time_micros" btree (document_creation_time_micros)
    "endpoint_state__idx__document_expiration_time_micros" btree (document_expiration_time_micros)
    "endpoint_state__idx__document_update_action" btree (document_update_action)
    "endpoint_state__idx__document_update_time_micros" btree (document_update_time_micros)
    "endpoint_state__idx__endpoint_links" gin (endpoint_links)
    "endpoint_state__idx__endpoint_properties" gin (endpoint_properties)
    "endpoint_state__idx__endpoint_type" btree (lower(endpoint_type))
    "endpoint_state__idx__group_links" gin (group_links)
    "endpoint_state__idx__id" btree (id)
    "endpoint_state__idx__mobility_endpoint_links" btree (mobility_endpoint_links)
    "endpoint_state__idx__msp_auth_link" btree (msp_auth_link)
    "endpoint_state__idx__org_auth_link" btree (org_auth_link)
    "endpoint_state__idx__owner_auth_link" btree (owner_auth_link)
    "endpoint_state__idx__parent_link" btree (parent_link)
    "endpoint_state__idx__project_auth_link" btree (project_auth_link)
    "endpoint_state__idx__sort__creation_time_micros" btree (creation_time_micros, document_self_link)
    "endpoint_state__idx__sort__endpoint_type" btree (lower(endpoint_type), document_self_link)
    "endpoint_state__idx__sort__name" btree (lower(name), document_self_link)
    "endpoint_state__idx__sort_region_id" btree (region_id, document_self_link)
    "endpoint_state__idx__tag_links" gin (tag_links)
    "endpoint_state__idx__tenant_links" gin (tenant_links)

provisioning-db=#

 

下記の SQL で、現在の状況を確認します。

select
  document_self_link,
  name,
  custom_properties->>'consecutiveFailuresCount' as consecutiveFailuresCount,
  custom_properties->>'endpointHealthCheckState' as endpointHealthCheckState
from endpoint_state;

 

SQL を実行すると、下記のように consecutiveFailuresCount が「20」になっているレコードがあります。KB の例のように endpointHealthCheckState「SUSPENDED」になっていませんが、データ収集は止まっているようです。

provisioning-db=# select
provisioning-db-#   document_self_link,
provisioning-db-#   name,
provisioning-db-#   custom_properties->>'consecutiveFailuresCount' as consecutiveFailuresCount,
provisioning-db-#   custom_properties->>'endpointHealthCheckState' as endpointHealthCheckState
provisioning-db-# from endpoint_state;
                    document_self_link                     |                  name                   | consecutivefailurescount | endpointhealthcheckstate
-----------------------------------------------------------+-----------------------------------------+--------------------------+--------------------------
 /resources/endpoints/76b0de75-63dc-4992-b5f3-d514151af0d3 | embedded-ABX-onprem                     |                          |
 /resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5 | vcf-m01-cloud-vcf-m01-vc-01.c.go-lab.jp | 20                       |
 /resources/endpoints/eef08c18-eec4-4ad8-90d1-2db3ef5a5675 | embedded-VRO                            |                          |
 /resources/endpoints/8a9f1a31-98ac-49b9-8f35-c4b9daaf1a51 | sddc manager                            |                          |
 /resources/endpoints/d456129d-9dac-4a2f-ba1c-ef856011b33b | vcf-m01-cloud-vcf-m01-nsx.c.go-lab.jp   |                          |
 /resources/endpoints/f0d50d5e-142e-454c-b517-ea1aa0f5a97f | vcf-m01-cloud                           | 0                        | AVAILABLE
(6 rows)

provisioning-db=#

 

document_self_link をもとに、対象のレコードだけ取得してみます。

select
  document_self_link,
  name,
  custom_properties->>'consecutiveFailuresCount' as consecutiveFailuresCount,
  custom_properties->>'endpointHealthCheckState' as endpointHealthCheckState
from endpoint_state
where
  document_self_link = '/resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5';

 

実際に SQL を実行すると、下記のようにレコードを取得できます。

provisioning-db=# select
provisioning-db-#   document_self_link,
provisioning-db-#   name,
provisioning-db-#   custom_properties->>'consecutiveFailuresCount' as consecutiveFailuresCount,
provisioning-db-#   custom_properties->>'endpointHealthCheckState' as endpointHealthCheckState
provisioning-db-# from endpoint_state
provisioning-db-# where
provisioning-db-#   document_self_link = '/resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5';
                    document_self_link                     |                  name                   | consecutivefailurescount | endpointhealthcheckstate
-----------------------------------------------------------+-----------------------------------------+--------------------------+--------------------------
 /resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5 | vcf-m01-cloud-vcf-m01-vc-01.c.go-lab.jp | 20                       |
(1 row)

provisioning-db=#

 

ちなみに、custom_properties 列には下記のような JSON データが格納されています。ここでは、jsonb_pretty で整形表示しています。

provisioning-db=# select
provisioning-db-#   jsonb_pretty(custom_properties)
provisioning-db-# from endpoint_state
provisioning-db-# where
provisioning-db-#   document_self_link = '/resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5';
                                                                                                          jsonb_pretty
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 {                                                                                                                                                                                                                             +
     "dcId": null,                                                                                                                                                                                                             +
     "vcUuid": "74fd0eba-56e6-4716-82ee-91ea20ab4e67",                                                                                                                                                                         +
     "version": "8.0.3",                                                                                                                                                                                                       +
     "hostName": "vcf-m01-vc-01.c.go-lab.jp",                                                                                                                                                                                  +
     "isExternal": "false",                                                                                                                                                                                                    +
     "patchLevel": "00300",                                                                                                                                                                                                    +
     "buildNumber": "24305161",                                                                                                                                                                                                +
     "certificate": null,                                                                                                                                                                                                      +
     "nsxEndpoint": null,                                                                                                                                                                                                      +
     "nsxHostName": null,                                                                                                                                                                                                      +
     "vcfDomainId": null,                                                                                                                                                                                                      +
     "__wcpEnabled": "true",                                                                                                                                                                                                   +
     "privateKeyId": "vra-svc-eb0b6a1a-3557-4895-8a30-7d603bcec1d0@vsphere.local",                                                                                                                                             +
     "useSharedNsx": "false",                                                                                                                                                                                                  +
     "nsxPrivateKey": null,                                                                                                                                                                                                    +
     "sddcManagerId": null,                                                                                                                                                                                                    +
     "vcfDomainName": null,                                                                                                                                                                                                    +
     "nsxCertificate": null,                                                                                                                                                                                                   +
     "supportTagging": "{\"documentKinds\":[\"com:vmware:photon:controller:model:resources:ComputeService:ComputeState\"],\"enabled\":true}",                                                                                  +
     "use.policy.api": null,                                                                                                                                                                                                   +
     "nsxPrivateKeyId": null,                                                                                                                                                                                                  +
     "vsphereEndpoint": null,                                                                                                                                                                                                  +
     "__facade_endpoint": null,                                                                                                                                                                                                +
     "supportDatastores": "true",                                                                                                                                                                                              +
     "__vmClassesEnabled": "true",                                                                                                                                                                                             +
     "authCredentialsLink": null,                                                                                                                                                                                              +
     "sddcManagerHostName": null,                                                                                                                                                                                              +
     "enumerationTaskState": "FAILED",                                                                                                                                                                                         +
     "useServiceCredentials": null,                                                                                                                                                                                            +
     "__facade_endpoint_type": "vcf",                                                                                                                                                                                          +
     "__skip_sddc_validation": null,                                                                                                                                                                                           +
     "enumerationTaskMessage": "java.util.concurrent.CompletionException: com.vmware.photon.controller.model.adapters.vsphere.VsphereAdapterException: The connection with vAPI endpoint can not be established. Cause: null ",+
     "nsxAuthCredentialsLink": null,                                                                                                                                                                                           +
     "consecutiveFailuresCount": "20",                                                                                                                                                                                         +
     "imageEnumerationTaskState": "FINISHED",                                                                                                                                                                                  +
     "__deleteServiceCredentials": null,                                                                                                                                                                                       +
     "lastFailureTimestampMillis": "1742525193022",                                                                                                                                                                            +
     "acceptSelfSignedCertificate": "true",                                                                                                                                                                                    +
     "lastEnumerationTimestampMicro": "1741652432295001",                                                                                                                                                                      +
     "lastImageEnumerationTimestampMicro": "1742788037031000",                                                                                                                                                                 +
     "lastSuccessfulEnumerationTimestampMicro": "1741650614022001",                                                                                                                                                            +
     "lastSuccessfulImageEnumerationTimestampMicro": "1742788037031000"                                                                                                                                                        +
 }
(1 row)

 

4. endpoint_state テーブルの更新

下記のように、endpoint_state テーブルにある custom_properties カラムの値を更新します。

 

consecutiveFailuresCount: 0 に変更

UPDATE endpoint_state
SET custom_properties = jsonb_set(custom_properties, '{consecutiveFailuresCount}', '0', true) 
WHERE document_self_link = '/resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5';

 

endpointHealthCheckState: "AVAILABLE" に変更

UPDATE endpoint_state
SET custom_properties = jsonb_set(custom_properties, '{endpointHealthCheckState}', '"AVAILABLE"', true)
WHERE document_self_link = '/resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5';

 

実際に SQL を実行すると、下記のようになります。

provisioning-db=# UPDATE endpoint_state
provisioning-db-# SET custom_properties = jsonb_set(custom_properties, '{consecutiveFailuresCount}', '0', true)
provisioning-db-# WHERE document_self_link = '/resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5';
UPDATE 1
provisioning-db=#
provisioning-db=# select
provisioning-db-#   document_self_link,
provisioning-db-#   name,
provisioning-db-#   custom_properties->>'consecutiveFailuresCount' as consecutiveFailuresCount,
provisioning-db-#   custom_properties->>'endpointHealthCheckState' as endpointHealthCheckState
provisioning-db-# from endpoint_state
provisioning-db-# where
provisioning-db-#   name = 'vcf-m01-cloud-vcf-m01-vc-01.c.go-lab.jp';
                    document_self_link                     |                  name                   | consecutivefailurescount | endpointhealthcheckstate
-----------------------------------------------------------+-----------------------------------------+--------------------------+--------------------------
 /resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5 | vcf-m01-cloud-vcf-m01-vc-01.c.go-lab.jp | 0                        |
(1 row)

provisioning-db=#
provisioning-db=# UPDATE endpoint_state
provisioning-db-# SET custom_properties = jsonb_set(custom_properties, '{endpointHealthCheckState}', '"AVAILABLE"', true)
provisioning-db-# WHERE document_self_link = '/resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5';
UPDATE 1
provisioning-db=#
provisioning-db=# select
provisioning-db-#   document_self_link,
provisioning-db-#   name,
provisioning-db-#   custom_properties->>'consecutiveFailuresCount' as consecutiveFailuresCount,
provisioning-db-#   custom_properties->>'endpointHealthCheckState' as endpointHealthCheckState
provisioning-db-# from endpoint_state
provisioning-db-# where
provisioning-db-#   name = 'vcf-m01-cloud-vcf-m01-vc-01.c.go-lab.jp';
                    document_self_link                     |                  name                   | consecutivefailurescount | endpointhealthcheckstate
-----------------------------------------------------------+-----------------------------------------+--------------------------+--------------------------
 /resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5 | vcf-m01-cloud-vcf-m01-vc-01.c.go-lab.jp | 0                        | AVAILABLE
(1 row)

provisioning-db=#

 

これで、接続失敗していたレコードが更新できました。

provisioning-db=# select
provisioning-db-#   document_self_link,
provisioning-db-#   name,
provisioning-db-#   custom_properties->>'consecutiveFailuresCount' as consecutiveFailuresCount,
provisioning-db-#   custom_properties->>'endpointHealthCheckState' as endpointHealthCheckState
provisioning-db-# from endpoint_state;
                    document_self_link                     |                  name                   | consecutivefailurescount | endpointhealthcheckstate
-----------------------------------------------------------+-----------------------------------------+--------------------------+--------------------------
 /resources/endpoints/440295d2-487f-4887-8993-c75be5934cd5 | vcf-m01-cloud-vcf-m01-vc-01.c.go-lab.jp | 0                        | AVAILABLE
 /resources/endpoints/76b0de75-63dc-4992-b5f3-d514151af0d3 | embedded-ABX-onprem                     |                          |
 /resources/endpoints/eef08c18-eec4-4ad8-90d1-2db3ef5a5675 | embedded-VRO                            |                          |
 /resources/endpoints/8a9f1a31-98ac-49b9-8f35-c4b9daaf1a51 | sddc manager                            |                          |
 /resources/endpoints/d456129d-9dac-4a2f-ba1c-ef856011b33b | vcf-m01-cloud-vcf-m01-nsx.c.go-lab.jp   |                          |
 /resources/endpoints/f0d50d5e-142e-454c-b517-ea1aa0f5a97f | vcf-m01-cloud                           | 0                        | AVAILABLE
(6 rows)

 

少し待つと、クラウド アカウントでもデータ取得の状態が正常になるはずです。

 

以上、Aria Automation クラウド アカウントのデータ収集エラーを復旧してみる話でした。