Monitoring, Management & Location Tracking

Nightly Maintenance Failed due to clean_database error

MVP
MVP
Problem:

Nightly Maintenance Failed due to clean_database error



Diagnostics:

Below is the error noticed in clean_database log, here the error is pointing to the target_id in scheduled_event table.

 

Only one row should match. at /usr/local/airwave/lib/perl/Mercury/Utility/Assert.pm line 59

                eval {...} called at /usr/local/airwave/lib/perl/Mercury/Utility/Assert.pm line 59

                Mercury::Utility::Assert::assert_quickly('', 'Only one row should match.') called at /usr/local/airwave/lib/perl/Mercury/DB/TableRowBase.pm line 265

                Mercury::DB::TableRowBase::only_one_row_allowed('Mercury::ScheduledEvent', 'Mercury::ScheduledEvent::Edit=HASH(0x1aee9d60)', 'Mercury::ScheduledEvent::Edit=HASH(0x15834bd8)') called at /usr/local/airwave/lib/perl/Mercury/DB/TableRowBase.pm line 273

                Mercury::DB::TableRowBase::get_by_fields('Mercury::ScheduledEvent', 'type', 'ARRAY(0x1ae0d6c8)', 'target_id', 13506965) called at /usr/local/airwave/lib/perl/Mercury/DB/NewConfigItem.pm line 68

                Mercury::DB::NewConfigItem::status('Mercury::DB::NewConfigItem=HASH(0x1ae06af0)') called at /usr/local/airwave/bin/clean_database.pl line 66

                main::__ANON__() called at /usr/local/airwave/lib/perl/Mercury/Utility/Time.pm line 55

                Mercury::Utility::Time::time_block('CODE(0x10e967a0)', 'new_config expiration') called at /usr/local/airwave/bin/clean_database.pl line 72

 

Check the scheduled_event table for any duplicate entries.

For Example: Found duplicate entry for the above highlighted target_id 13506965, as shown below.

      

  

Check the ids under report_definition as shown below to see which one is not returning any result.

Here the id 8501 did not fetch any result.

 

 



Solution

Delete the duplicate id (i.e. id that did not return any result) from scheduled_event table using the below command to resolve the issue.

airwave=> delete from scheduled_event where id = 8501;

 

 

Version history
Revision #:
2 of 2
Last update:
‎10-02-2018 04:13 AM
Updated by:
 
Labels (1)
Contributors
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: