How to clean up the orphaned entries in the raw_data_files_info table.

  • 7022308
  • 10-Nov-2017
  • 26-Jul-2018

Environment

Sentinel 7x and 8x Sentinel Server

Situation

An entry similar to the following SEVERE error is appearing multiple times in the logs.


Mon Jun 06 14:36:34 CEST 2016|SEVERE|pool-5-thread-18|esecurity.ccs.comp.event.rawdata.RawEventSource$RawDataSink.init
Error RAWDATA0001(RawData): Error initializing writers for file 06-1400.gz.
Root cause: /var/opt/novell/sentinel/data/rawdata/online/5AFAEF97-BDF7-1033-84B4-525400084011/2016-06/06-1400.gz (No such file or directory) (java.io.FileNotFoundException)
com.novell.sentinel.util.logging.error.rawdata.RAWDATA0001: Error initializing writers for file 06-1400.gz.

Resolution

1. Download cleanup_rawdata_info.sh file.

E.g. ftp.novell.com /outgoing/Sentinel/script for TID 7022308

2. Copy it to the location on Sentinel server where other script files are present.

     eg. /opt/novell/sentinel/bin

3. Set the required permissions to the script.

      chmod 700 /opt/novell/sentinel/bin/cleanup_rawdata_info.sh

      chown novell:novell /opt/novell/sentinel/bin/cleanup_rawdata_info.sh

4. Switch to novell user

      su novell

5. Change to the directory where the script is present.

      cd /opt/novell/sentinel/bin

6. Execute the script and follow the on-screen instruction during the execution.

      ./cleanup_rawdata_info.sh

                  
Features provided in the script:

  • Script validates the directory path (Valid/Invalid).
  • Script gives user flexibility to View/Delete.
  • Script makes confirmation to the user before deletion.
  • Log is maintained to keep the deletion history as a record.
  • Script removes the entries from the DB if the files are missing from the specified directory.

Cause

When actual raw data files are deleted from either primary storage location or secondary storage location, the entries related to those files are not cleaned up from the table raw_data_files_info.