Internal Server Error
- Could not execute JDBC batch update; SQL [/* Method: unknown */ /* insert com.vmware.vcloud.common.model.net.GatewayLoadBalancerHealthMonitorAssignmentModel */ insert into gateway_lb_hm_assignment (lb_health_monitor_id, lb_pool_id, id) values (?, ?, ?)]; constraint [uq_gat_lb_hm_ass_l_p_i_l_h_m_i]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
- Batch entry 0 /* Method: unknown */ /* Method: unknown */ /* insert com.vmware.vcloud.common.model.net.GatewayLoadBalancerHealthMonitorAssignmentModel */ insert into gateway_lb_hm_assignment (lb_health_monitor_id, lb_pool_id, id) values ('
########.####.####.########
fad5'::uuid, '########.####.####.########b26f'::uuid, '########.####.####.########
907e'::uuid) was aborted: ERROR: duplicate key value violates unique constraint "uq_gat_lb_hm_ass_l_p_i_l_h_m_i" Detail: Key (lb_pool_id, lb_health_monitor_id)=(
########.####.####.########
b26f, ########.####.####.########
fad5) already exists. Call getNextException to see other errors in the batch.
VMware Cloud Director 10.6
VMware Cloud Director 10.6.0.1
This error is seen when a provider scoped health monitor is assigned to pool in NSX Avi Load Balancer (NSX-ALB). The pool is already associated with a tenant scoped health monitor in VCD.
During the health monitor sync, VCD tried to create health monitor assignment for both health monitors because of which duplicate key error is seen.
This is a known issue affecting VMware Cloud Director 10.6 and 10.6.0.1
Deleting existing assignments from VMware Cloud Director so that the next sync doesn’t fail.
To delete the existing assignments from VMware Cloud Director visit the documentation at Create and Assign a Custom Health Monitor in the VMware Cloud Director Service Provider Admin Portal
This will ensure that the functionality is not impacted because HMs are still associated with the pool in NSX-ALB.