Nutanix VM backup fails with error AHV48 “Nutanix AHV API service not available”
Problem description
Nutanix VM backup fails with error AHV48 : “Nutanix AHV API service not available”
Cause
The Nutanix API call is failing during backup
Traceback
level=error ts=2023-10-31T14:10:43.050625746-04:00 filename=backup.go:316 message="Failed to get VM by UUID using V3" Error="Nutanix AHV API service not available"
level=info ts=2023-10-31T14:10:43.095485034-04:00 filename=job.go:89 message="Abort set" method=Abort error="Failed to prepare backup sources" msg="Nutanix AHV API service not available"
level=error ts=2023-10-31T14:10:43.050745977-04:00 filename=backup.go:263 message="Failed to init AHV State"
level=error ts=2023-10-31T14:10:43.050774441-04:00 stack="Nutanix AHV API service not available”
Verification
- Get the UUID of the VM for which the backup is failing. SSH to the CVM [cluster] and run the command
acli vm.list
Reference : Listing VMs via CLI for importing into Excel - Log on to the proxy and execute the command to fire Nutanix API's to get VM information
curl -kX GET -u username:<Password> --header "Accept: application/json" "https://<prism central/element ip address>:9440/api/nutanix/v3/vms/<vm_uuid"
Example :
curl -kX GET -u test@abc.com:123456 --header "Accept: application/json" "https://192.168.1.2:9440/api/nutanix/v3/vms/dh8cfab1-a95a-406d-ba14-1f37ac4de5c"
- It will not return the VM information. Check the /data/logs/aplos.out logs on prism element
less /data/logs/aplos.out - It shows below error when above command is triggered from the proxy
File "build/bdist.linux-x86_64/egg/aplos/intentgw/middlewares/authn_middleware.py", line 484, in authenticate_request
File "build/bdist.linux-x86_64/egg/aplos/lib/auth/auth.py", line 98, in session_authenticate
DsSearchError: Failed to get user with username test@abc.com from domain abc.com, error Invalid credentials for directory url: ldap://192.168.1.1
Resolution
- The LDAP account password is changed and not modified in Prism
- Follow the steps to update the LDAP account password in Prism
- Login to Prism central
- Click the settings button next to username at the top right hand corner
- Click “Authentication” in the left hand side pane
- Update the password for the LDAP account
- Once done, retry the curl command from the proxy and it should work
- Test a backup and it should complete successfully