search cancel

DX NetOps 22.2.x - NCM Bucket Processing fails

book

Article ID: 255140

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

Error seen in Tomcat log file:

Nov 20, 2022 01:26:10.358 (SRM/NCMConfigHandler/bucketReader) (com.aprisma.spectrum.app.repmgr.dc.event.handler.NCMConfigHandler) - (ERROR) - Error occurred while processing NCM event bucket, Record: [email protected]
Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [INSERT INTO ncm_config (config_text_id, device_model_key, change_time, trap_from, trap_user, trap_on, lines_changed, rel_lines_changed, violated_policies, compliant_policies, spec_user_name, comm_mode, landscape, last_updated_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)]; Data truncation: Data too long for column 'trap_from' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'trap_from' at row 1
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:991)
at com.aprisma.spectrum.app.repmgr.dc.db.dao.jdbc.JdbcNCMConfigDAO.insert(JdbcNCMConfigDAO.java:102)
at com.aprisma.spectrum.app.repmgr.dc.services.DefaultNCMConfigService.insertConfig(DefaultNCMConfigService.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at com.sun.proxy.$Proxy219.insertConfig(Unknown Source)
at com.aprisma.spectrum.app.repmgr.dc.event.handler.NCMConfigBucketReader.processBucketRecords(NCMConfigBucketReader.java:92)
at com.aprisma.spectrum.app.repmgr.dc.event.handler.AbstractBucketReader.readBucket(AbstractBucketReader.java:133)
at com.aprisma.spectrum.app.repmgr.dc.event.handler.BucketReaderScheduler$ScheduledReader.run(BucketReaderScheduler.java:118)
at com.aprisma.util.thread.JobQueue.runJobThread(JobQueue.java:221)
at com.aprisma.util.thread.JobQueue.access$000(JobQueue.java:15)
at com.aprisma.util.thread.JobQueue$JobRunnable.run(JobQueue.java:24)
at java.lang.Thread.run(Thread.java:750)
Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'trap_from' at row 1
 

Environment

Release : 22.2

Resolution

Need to determine the bucket table name causing issues.

This is done by turning on MySQL General Query logging.

Enable MySQL General Query Logging

Once the bucket table name is identified:

Login to MySQL using root and the password MySqlR00t

Then:

1. Type:

drop table <tablename>;

2. Then type:

update bucketactivitylog set destroy_time=now() where bucket_table_name = '<tablename>';

3. Then type:

update handleractivitylog set process_end_time=now() where staging_table='tablename';

4. Restart Tomcat

Example table name: ncmconfigbucket16777216_1663363882995