| ERROR | task-service-activity-pool-17292 | JDBCExceptionReporter | Batch entry 0 /* Method: unknown */ /* Method: unknown */ /* delete com.vmware.vcloud.common.model.VAppTemplateModel */ delete from catalog_item where id='########-####-####-####-#############'::uuid was aborted: ERROR: canceling statement due to lock timeout
Where: while deleting tuple (11,3) in relation "catalog_item" Call getNextException to see other errors in the batch. | requestId=########-####-####-####-#############
b,request=POST https://DNS/api/catalog/########-####-####-####-#############/action/captureVApp,requestTime=1724137296783,remoteAddress=X.X.X.X:
29331,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/*+xml;version 38.0 vcd=########-####-####-####-#############, task=ID
########-####-####-####-############# activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:'########-####-####-####-#############
| ERROR | task-service-activity-pool-17292 | JDBCExceptionReporter | ERROR: canceling statement due to lock timeout
Where: while deleting tuple (11,3) in relation "catalog_item" | requestId=########-####-####-####-#############,request=POST https://DNS/api/catalo
g/########-####-####-####-#############/action/captureVApp,requestTime=1724137296783,remoteAddress=IP-Address:29331,userAgent=Searchengine/X.0 (System)
AppleWebKit/537.36 ...,accept=application/*+xml;version 38.0 vcd=########-####-####-####-#############,task=ID activity=(com.vmware.vc
loud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-####-#############)
| INFO | task-service-activity-pool-17292 | Conversation | Transaction rolled back; session has been closed [Conversation:
########-####-####-####-#############, transaction null, transactionDepth: 0] Transaction opened at:
current stack: java.lang.Exception
at com.vmware.vcloud.common.persist.Conversation$1.getNewText(Conversation.java:98)
at com.vmware.vcloud.logging.DecoratedLogger.info(DecoratedLogger.java:153)
at com.vmware.vcloud.common.persist.Conversation.rollBackTransactionIfActive(Conversation.java:373)
at com.vmware.cl.impl.LibraryItemServiceImpl.deleteLibraryItemAndBackingSync(LibraryItemServiceImpl.java:931)
at com.vmware.vcloud.api.presentation.service.impl.VdcServiceAdapterImpl.abortTask(VdcServiceAdapterImpl.java:3366)
at com.vmware.vcloud.backendbase.management.system.TaskActivity$TerminatePhase$1.doInSecurityContext(TaskActivity.java:563)
at com.vmware.vcloud.backendbase.management.system.TaskActivity$TerminatePhase$1.doInSecurityContext(TaskActivity.java:560)
at com.vmware.vcloud.backendbase.management.system.SecurityContextTemplate.executeForOrgAndUser(SecurityContextTemplate.java:49)
at com.vmware.vcloud.backendbase.management.system.TaskActivity$TerminatePhase.invokeInner(TaskActivity.java:566)
at com.vmware.vcloud.backendbase.management.system.TaskActivity$TaskActivityBasePhase.invoke(TaskActivity.java:361)
at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175)
at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
VMware Cloud Director 10.x
The root cause of this issue is the use of special characters in the folder names. When special characters are used, vApp template creation fails, and the process leaves behind unresolved entries in the catalog. The task to delete these entries fails due to a lock timeout error in the database, which prevents the cleanup process from completing successfully.
Resolution:
Workaround:
Note: Before performing any delete operation in VCD, ensure that you take a full database backup and snapshots of the VCD cells.
1. Log into VMware Cloud Director
2. Navigate to the Catalog
3. Select the Appropriate Catalog
4. Identify the Templates to Clean Up
5. Delete the Template Entries
6. Verify Template Deletion
Note: Deleting a template only removes the catalog entry; it does not delete the actual virtual machine or the template file from the underlying storage unless specified.