search cancel

Global Sync Failing

book

Article ID: 187615

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

Global Sync is failing and the following error is seen in DMService.log
 
ERROR | pool-4-thread-1          | 2020-03-27 00:01:13,695 | com.ca.im.portal.dm.productsync.DataSourcePoller                 
      | Exception thrown by sync task: org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [INSERT INTO temp_addresses (SourceID, DomainID, Address, IPs) SELECT SourceID, DomainID, Address, GROUP_CONCAT(v6_ntoa(RawAddress)) FROM temp_changed_items WHERE Address != RawAddress GROUP BY Address, SourceID, DomainID HAVING count(*) > 1]; Data truncation: Data too long for column 'IPs' at row 403; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'IPs' at row 403
java.util.concurrent.ExecutionException: org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [INSERT INTO temp_addresses (SourceID, DomainID, Address, IPs) SELECT SourceID, DomainID, Address, GROUP_CONCAT(v6_ntoa(RawAddress)) FROM temp_changed_items WHERE Address != RawAddress GROUP BY Address, SourceID, DomainID HAVING count(*) > 1]; Data truncation: Data too long for column 'IPs' at row 403; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'IPs' at row 403
 at java.util.concurrent.FutureTask.report(FutureTask.java:122)
 at java.util.concurrent.FutureTask.get(FutureTask.java:192)
 at com.ca.im.portal.dm.productsync.SyncPhaseExecutor.execute(SyncPhaseExecutor.java:67)
 at com.ca.im.portal.dm.productsync.DataSourcePoller.pollLoopInternal(DataSourcePoller.java:290)
 at com.ca.im.portal.dm.productsync.DataSourcePoller.pollLoop(DataSourcePoller.java:235)
 at com.ca.im.portal.dm.productsync.DataSourcePoller.access$200(DataSourcePoller.java:51)
 at com.ca.im.portal.dm.productsync.DataSourcePoller$2.run(DataSourcePoller.java:540)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [INSERT INTO temp_addresses (SourceID, DomainID, Address, IPs) SELECT SourceID, DomainID, Address, GROUP_CONCAT(v6_ntoa(RawAddress)) FROM temp_changed_items WHERE Address != RawAddress GROUP BY Address, SourceID, DomainID HAVING count(*) > 1]; Data truncation: Data too long for column 'IPs' at row 403; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'IPs' at row 403
 at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100)
 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
 at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:521)
 at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.update(SimpleJdbcTemplate.java:251)
 at com.ca.im.portal.api.common.services.impl.database.TransientDBConnection.execute(TransientDBConnection.java:354)
 at com.ca.im.portal.dm.productsync.GlobalSyncDeviceItems.handleMultipleMatchesFromSameDataSource(GlobalSyncDeviceItems.java:388)
 at com.ca.im.portal.dm.productsync.GlobalSyncDeviceItems.doSynchronizeInternal(GlobalSyncDeviceItems.java:108)
 at com.ca.im.portal.dm.productsync.AbstractGlobalSyncStage.doSynchronize(AbstractGlobalSyncStage.java:71)
 at com.ca.im.portal.dm.productsync.GlobalSyncItems.doSynchronizeInternal(GlobalSyncItems.java:124)
 at com.ca.im.portal.dm.productsync.AbstractGlobalSyncStage.doSynchronize(AbstractGlobalSyncStage.java:71)
 at com.ca.im.portal.dm.productsync.GlobalSync.globalSynchronization(GlobalSync.java:99)
 at com.ca.im.portal.dm.productsync.GlobalSyncPhaseTask.execute(GlobalSyncPhaseTask.java:41)
 at com.ca.im.portal.dm.productsync.GlobalSyncPhaseTask.execute(GlobalSyncPhaseTask.java:13)
 at com.ca.im.portal.dm.productsync.SyncPhaseExecutor$SyncPhaseTaskCallable.call(SyncPhaseExecutor.java:135)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 ... 3 more
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'IPs' at row 403
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3971)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
 at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
 at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
 at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
 at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
 at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
 at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:511)
 at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:509)
 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
 ... 16 more

Cause

Symptom: Global synchronization for devices could throw error about "Data too long for column 'IPs'" if there were too many devices with same common IP.
Resolution: Removed the function that contained the offending SQL, as it was no longer needed.
(3.7.5, DE429382)

Environment

CAPM release less than 3.7.5

Resolution

The resolution would be to upgrade to CAPM 3.7.5 or higher to get the above fix.  After upgrading the global sync should complete successfully