vCACCAFEEntitiesFinder.getCatalogItemRequest Returns an Error with 404 Value

Mindwatering Incorporated

Author: Tripp W Black

Created: 08/12/2020 at 10:47 AM

 

Category:
VMWare
vRO - VCAC

Issue 404 Error:
Using vCACCAFEEntitiesFinder.getCatalogItemRequest returns a message including a 404 at the end.
var request = vCACCAFEEntitiesFinder.getCatalogItemRequest(host, requestID);

If you are on an old vRO installation (e.g. before 7.3.1), there is a patch and this issue is fixed in 7.3.1 and 7.4.
Otherwise, this error indicates that the wrong requestId was passed.

in the payload there are multiple requestIds.

These return the same request Id, but it is not the correct request ID to get the CatalogItemRequest:
payload[requestId]
payload[machine][properties][__api.request.Id]

Correct:
[payload][machine][properties][__Cafe.Root.Request.Id]




Issue 400:
With 400 Error, and ErrorCode 10101.
The error will likely present as a useless java.lang.reflect.InvocationTargetException error.
The actual error may be found in /storage/log/vmware/vco/app-server/server.log.

Look for a log at the same time as the vRO log.
[ResponseErrorHandler] [Rest Error]: {Status code:400},{Error code: 10101}, {Error Source:null},{Error Msg: Invalid argument.},{System Msg: Unknown name value [Deleted] for enum class [com.vmware.vcac.catalog.domain.enumeration.ResourceStatus]}

In this case, the status column was Deleted instead of DELETED. But the System Msg: section is the key to finding the issue in the psql database.

To find the bad entries, we exported the table.

# su - postgres
$ cd /opt/vmware/vpostgres/current/bin
$ ./psql
postgres=# COPY (SELECT name,status FROM cat_resource WHERE tenant_id='MWTenant') TO '/tmp/ouput.csv' (format csv, delimiter ',');
<wait a minute or two>
postgres=# \q




previous page