ERROR [vcf_lcm,0000000000000000,0000] [c.v.e.s.m.s.s.ExportDataService,pool-4-thread-16] Error while fetching credentials data
org.springframework.web.client.HttpServerErrorException$GatewayTimeout: 504 Gateway Time-out: "<html><EOL><EOL><head><title>504 Gateway Time-out</title></head><EOL><EOL><body><EOL><EOL><center><h1>504 Gateway Time-out</h1></center><EOL><EOL><hr><center>nginx</center><EOL><EOL></body><EOL><EOL></html><EOL><EOL>"
at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:114)
ERROR [vcf_lcm,0000000000000000,0000] [c.v.e.s.o.model.error.ErrorFactory,pool-4-thread-16] [F####0] FAILED_TO_GET_CREDENTIAL_DATA_EXPORT Failed to get credentials data using export api.
com.vmware.evo.sddc.orchestrator.exceptions.OrchTaskException: Failed to get credentials data using export api.
/usr/pgsql/13/bin/psql -h localhost -U postgres -d platform -c "select count(*) from credentialhistory;"
count
-------
10798
(1 row)
VMware Cloud foundation 5.x
The large number of credentialhistory records causes the credential export API to timeout.
Engineering is aware of this issue and a permanent fix is planned for inclusion in a future release.
Workaround Steps:
Option#1 Delete records older than 3 months.
/usr/pgsql/13/bin/psql -h localhost -U postgres -d platform -c "DELETE FROM credentialhistory WHERE creationtime < EXTRACT(epoch FROM NOW() - INTERVAL '3 months') * 1000;"
Option#2 Temporarily move records to a backup table
/usr/pgsql/13/bin/psql -h localhost -U postgres -d platform
create table credentialhistory_bak as table credentialhistory;
truncate credentialhistory;
/usr/pgsql/13/bin/psql -h localhost -U postgres -d platform
insert into credentialhistory select * from credentialhistory_bak;
drop table credentialhistory_bak;