SRM Data Truncation on security_string and ncm_config_text tables
search cancel

SRM Data Truncation on security_string and ncm_config_text tables

book

Article ID: 270426

calendar_today

Updated On: 03-26-2025

Products

Network Observability Spectrum

Issue/Introduction

Next error are seen in catalina.out

  • Jul 06, 2023 14:52:28.541 (SRM/NCMConfigHandler33554432/bucketReader) (com.aprisma.spectrum.app.repmgr.dc.event.handler.NCMConfigHandler) - (ERROR) - Error occurred while processing NCM event bucket, Record: com.aprisma.spectrum.app.repmgr.dc.dto.BucketRow@178c438b
    Caused by: java.lang.Exception: Failes to insert NCM Config DTOPreparedStatementCallback; SQL [INSERT INTO  ncm_config_text ( prev_config_text_id, config_model_key, prev_config_model_key, create_time, diff_text, config_text) VALUES (?,?,?,?,?,?)]; Data truncation: Data too long for column 'config_text' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'config_text' at row 1
        at com.aprisma.spectrum.app.repmgr.dc.db.dao.jdbc.JdbcNCMConfigTextDAO.insert(JdbcNCMConfigTextDAO.java:110)
  • Jul 06, 2023 14:39:18.003 (SRM/SecurityHandler/bucketReader) (com.aprisma.spectrum.app.repmgr.dc.event.handler.SecurityHandler) - (ERROR) - Error occurred while processing Security event bucket
    Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [INSERT INTO security_string( security_string ) VALUES( ? ) ON DUPLICATE KEY UPDATE security_string = security_string]; Data truncation: Data too long for column 'security_string' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'security_string' at row 1
        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
  • Jul 06, 2023 14:37:47.157 - Error parsing security string: (ADMIN|ANF|SUPERUSER)&(ADMIN|CGD|SUPERUSER)&(ADMIN|CMMAFRA|SUPERUSER)&(ADMIN|EFACEC|SUPERUSER)&(ADMIN|ROVENSA|SUPERUSER)&(ADMIN|SBG|SUPERUSER)&(ADMIN|SIRESP|SUPERUSER)&(ADMIN|SSIERRA|SUPERUSER)&(ADMIN|SUPERUSER|WRT)&(BARQ|SUPERUSER)&(SCML|SUPERUSER)&(SUPE:

    Error parsing security string (ADMIN|ANF|SUPERUSER)&(ADMIN|CGD|SUPERUSER)&(ADMIN|CMMAFRA|SUPERUSER)&(ADMIN|EFACEC|SUPERUSER)&(ADMIN|ROVENSA|SUPERUSER)&(ADMIN|SBG|SUPERUSER)&(ADMIN|SIRESP|SUPERUSER)&(ADMIN|SSIERRA|SUPERUSER)&(ADMIN|SUPERUSER|WRT)&(BARQ|SUPERUSER)&(SCML|SUPERUSER)&(SUPE: no close parenthesis

  • Jul 18, 2023 17:55:55.799 (SRM/NCMConfigHandler33554432/bucketReader) (com.aprisma.spectrum.app.repmgr.dc.event.handler.NCMConfigHandler) - (ERROR) - Error occurred while processing NCM event bucket, Record: com.aprisma.spectrum.app.repmgr.dc.dto.BucketRow@47e14948
    Caused by: java.lang.Exception: Failes to insert NCM Config DTOPreparedStatementCallback; SQL [INSERT INTO  ncm_config_text ( prev_config_text_id, config_model_key, prev_config_model_key, create_time, diff_text, config_text) VALUES (?,?,?,?,?,?)]; Data truncation: Data too long for column 'config_text' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'config_text' at row 1

     

Environment

Release : 22.2

Cause

The current size of the columns is not enough to store the data

Resolution

1. Stop reporting OC tomcat

2. Run below queries 

==================================================

ALTER TABLE devicemodel MODIFY security_string varchar(768);

ALTER TABLE accountablemodels MODIFY security_string varchar(768); 

ALTER TABLE interfacemodel MODIFY security_string varchar(768); 

ALTER TABLE virtualinterfacemodel MODIFY security_string varchar(768); 

ALTER TABLE security_string MODIFY security_string varchar(768);

 ALTER TABLE security_string_accessibility_by_landscape MODIFY security_string varchar(768);

ALTER TABLE model MODIFY security_string varchar(768);

ALTER TABLE ncm_config_text  MODIFY config_text LONGTEXT;

=======================================================

3. Start reporting OC tomcat

4. Verify the data truncation error's are no longer logged in Tomcat logs

Additional Information

It is important to have on mind:

- Making this change will resolve the issue but it will also increase the size of the reporting DB
- To avoid storage issues and  performance issues, the recommended would be to increase the filesystem size, the system memory and the Web Server Memory (Tomcat heap space).