Unable to add or rediscover a cluster in Unified Manager due to duplicate entry for key in AIQUM
- Views:
- 256
- Visibility:
- Public
- Votes:
- 0
- Category:
- active-iq-unified-manager
- Specialty:
- om
- Last Updated:
- 7/14/2025, 10:42:53 AM
Applies to
- Active IQ Unified Manager (AIQUM) 9.x
- ONTAP 9.x
Issue
- While adding the cluster or rediscover in GUI getting error as follows:
Unable to add datasource. ERROR:could not execute batch; SQL [insert into DataSource (resourceKey, objVersion, objectName, healthStatus, acquisitionMessage, acquisitionStatus, analysisMessage, analysisStatus, communicationStatus, lastOperationFailureTime, lastOperationSuccessTime, objectResourceKey, operation, operationEndTime, operationStartTime, operationState, pingable, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [datasource.DataSource_objectName_UQ]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch.
- In
Ocumserver.log
the error as reported as below:
ERROR [admin] [default task-8] [c.n.o.r.m.e.GlobalExceptionHandler] could not execute batch
org.hibernate.exception.ConstraintViolationException: could not execute batch
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.sql.BatchUpdateException: (conn=20) Duplicate entry 'xx.xx.xx.xx' for key 'datasource.DataSource_objectName_UQ'
at org.mariadb//org.mariadb.jdbc.MariaDbStatement.executeBatchExceptionEpilogue(MariaDbStatement.java:323)
at org.mariadb//org.mariadb.jdbc.ClientSidePreparedStatement.executeBatch(ClientSidePreparedStatement.java:301)
at deployment.dfm-app.war//com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:131)
at deployment.dfm-app.war//com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
at deployment.dfm-app.war//org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:125)
... 173 common frames omitted
Caused by: java.sql.SQLIntegrityConstraintViolationException: (conn=20) Duplicate entry 'xx.xx.xx.xx' for key 'datasource.DataSource_objectName_UQ'
at org.mariadb//org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:70)
at org.mariadb//org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:153)
at org.mariadb//org.mariadb.jdbc.MariaDbStatement.executeBatchExceptionEpilogue(MariaDbStatement.java:319)
... 177 common frames omitted
Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: Duplicate entry 'xx.xx.xx.xx' for key 'datasource.DataSource_objectName_UQ'
at org.mariadb//org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException.of(MariaDbSqlException.java:34)