Issue/Introduction
Use this article to troubleshoot ZCenter resource synchronization failures by checking cloud environment connectivity, synchronization tasks, distributed locks, and service logs.
Symptoms
- ZCenter cannot complete resource synchronization for a cloud environment.
- A synchronization task fails or resource information is not updated.
Environment
- Product line: ZVF
- Component: ZCenter
- Version: 5.1.0
Possible causes
The issue may be related to the following conditions:
- There is a network connectivity issue between ZCenter and a ZSphere or VMware management node.
- A Redis distributed lock was not released after a synchronization task exited abnormally.
- Repeated attempts to retrieve Region information failed.
- The vm-server service reports an error related to resource synchronization.
Resolution
1. Check cloud environment connectivity
- Check: Confirm network reachability from ZCenter to the ZSphere or VMware management node.
- UI path: Go to Platform Management > Cloud Environment Management.
- Expected result: The cloud environment status is displayed as valid.
- If abnormal: Check the network connection between ZCenter and the corresponding management node.
2. Trigger synchronization manually
- API:
POST /api/portal/v4/cloud-account/SyncAccount - Request parameter:
{"uuid": "cloudAccountId"} - Check: Observe the API response and confirm whether the synchronization task can be triggered normally.
3. Check the distributed lock
- Check: Check whether the
{serviceName}:{cloudAccountId}key exists in Redis. - Description: Resource synchronization uses a Redis distributed lock to prevent concurrent execution. If a previous synchronization task exited abnormally and the lock was not released, a new task may be unable to acquire the lock.
4. Check service logs
- Check: Check the vm-server logs.
- Log keywords:
syncResource,cloudAccountId. - Action: Continue locating the stage where the issue occurred based on the specific error in the logs.
5. Check the Region retrieval result
- Check: Confirm whether Region information was retrieved successfully.
- Description: If Region information retrieval fails, the system automatically retries three times at intervals of 50 ms. If all retries fail, the Region is marked as abnormal, but other Regions are not affected.
Additional information
- During troubleshooting, record the affected cloud environment,
cloudAccountId, the time when the issue occurred, and the related service logs.
