"Operation cancelled due to an unexpected error" message when reconfiguring the Cloud Director endpoint in Cloud Director Availability 4.x
search cancel

"Operation cancelled due to an unexpected error" message when reconfiguring the Cloud Director endpoint in Cloud Director Availability 4.x

book

Article ID: 315143

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • Reconfiguring the Cloud Director endpoint in the Settings view of the Cloud Director Availability Provider Portal fails and you see an error similar to:
     Operation cancelled due to an unexpected error.
  • In the /opt/vmware/h4/cloud/log/cloud.log file on the Cloud Replication Management Appliance, you see a similar entry:
2023-09-05 13:31:49.386 ERROR - [UI-a7eed626-6d35-4347-9892-1b0288c9b89a-r31118-HE] [https-jsse-nio-8443-exec-1] c.v.h.c.c.error.ExceptionAdvisorBase  : A POST request from root[192.168.1.90] to /config/vcloud failed.

java.lang.IllegalArgumentException: The given 'offset' must be multiple of 'limit'
    at com.vmware.vcloud.client.json.JsonVcloudClient.buildQuery(JsonVcloudClient.java:777)
    at com.vmware.vcloud.client.json.JsonVcloudClient.lambda$findCategoryByName$5(JsonVcloudClient.java:730)
    at com.vmware.vcloud.client.util.JsonVcloudClientUtil.getAllObjects(JsonVcloudClientUtil.java:31)
    at com.vmware.vcloud.client.json.JsonVcloudClient.findCategoryByName(JsonVcloudClient.java:729)
    at com.vmware.h4.cloud.service.VcloudExtensionService.getOtherCategory(VcloudExtensionService.java:185)
    at com.vmware.h4.cloud.service.VcloudExtensionService.register(VcloudExtensionService.java:100)
    at com.vmware.h4.cloud.service.ConfigService.configureCloud(ConfigService.java:281)
    at com.vmware.h4.cloud.service.ConfigService.configVcd(ConfigService.java:213)
    at com.vmware.h4.cloud.controller.ConfigController.configVcd(ConfigController.java:155)
    ...

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware Cloud Director Availability 4.x
VMware Cloud Director 10.x

Cause

This issue occurs because Cloud Director Availability requests 32 elements per page when querying Cloud Director rights categories but Cloud Director is configured with a maximum page size that is less than 32.

Resolution

To resolve this issue, configure the API maximum page size in Cloud Director to 32.

Note: Before performing the following procedure, ensure that the Cloud Director cell cluster is in manual failover mode.
  1. SSH to the primary Cloud Director cell and log in as root.
  2. Increase the Cloud Director API maximum page size using the cell-management-tool:
/opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n restapi.queryservice.maxPageSize -v "32"
  1. Restart the Cloud Director services on each of the cells for the changes to be applied. For more information see the Managing a Cell section of the Cloud Director documentation.
Note: To avoid downtime with Cloud Director, restart each cell one at a time.
  1. Once the Cloud Director services all the cells have been restarted, reconfigure the Cloud Director endpoint in the Cloud Director Availability Provider Portal.