vRA inventory data collection fails with error 404 after renaming agent
search cancel

vRA inventory data collection fails with error 404 after renaming agent

book

Article ID: 343006

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • A proxy agent was recently reinstalled or renamed.
  • You are unable to trigger an Inventory Data Collection from the vRA UI.
  • You cannot see the Inventory Data Collection status information.


Environment

VMware vRealize Automation 7.0.x
VMware vRealize Automation 7.1.x
VMware vRealize Automation 6.2.x
VMware vRealize Automation 7.2.x

Cause

This is a known issue when reinstalling a proxy agent with a new name. When an endpoint is created and the proxy agent is deployed, database records are also created for each of these objects. If you uninstall and reinstall the proxy agent for that endpoint with a new name, it creates inconsistencies within the database, preventing data collection for the endpoint.

Resolution

To resolve this issue, complete this the procedure

Note: Ensure you have DBO access to the IaaS Database.
 
  1. Take a backup of your IaaS database.
  2. Log in to SQL Management Studio.
  3. To confirm inconsistencies:
     
    1. Open a new query tab, select the vRA database and record the agent ID and Name for the old and the new agent by running the query:

      select AgentID, AgentName from Agent
       
    2. To confirm the agent ID name is (it should be the old agent's ID), run the query below:

      Select DataCollectionStatusID, AgentID, EntityID from DataCollectionStatus Where EntityID IN (Select HostID from Host h join ManagementEndpoints e on h.ManagementEndpointID = e.ManagementEndpointID Where e.ManagementEndpointName = '@endpointName' )
       
    3. To record the ProvisioningAgentID, run the below query:

      Select HostID, HostName, HostUniqueID, ProvisioningAgentID from Host h join ManagementEndpoints e on h.ManagementEndpointID = e.ManagementEndpointID Where e.ManagementEndpointName = '@endpointName’


      Note: It may not be the same for all the hosts and/or is may be different value from the result of the query in step 3b.
  4. If the preceding queries prove that there are agent name inconsistencies in the records, complete these steps:
     
    1. Update the hosts with the appropriate agent ID:

      Update host set ProvisioningAgentID = '{{desired-agent-id-from-step-1}}'
      Where HostID IN (Select HostID from Host h join ManagementEndpoints e on h.ManagementEndpointID = e.ManagementEndpointID Where e.ManagementEndpointName =
      '@endpointName' )

      Note: {{desired-agent-id-from-step-1}} should be replaced with the ID for the desired agent name in Step 3a.
    2. Reset the data collection status by running this query:

      Delete DataCollectionStatus
      Where EntityID IN (Select HostID from Host h join ManagementEndpoints e on h.ManagementEndpointID = e.ManagementEndpointID Where e.ManagementEndpointName =
      '@endpointName’ )
       
  5. Wait a few minutes for the changes to propagate accordingly.
  6. Make sure your new agent service is running and the old agent is stopped (the old agent should already be stopped if the agent has been uninstalled).
  7. Go to the vRA UI and confirm that the data collection is available for requesting.


Additional Information

简体中文重命名代理后,vRA 清单数据收集失败并显示错误 404

Impact/Risks:
The above could cause data inconsistencies if not performed exactly as instructed. Always take back ups prior to performing manual database edits.