Troubleshooting
Problem
The error "ERROR=Attempt to insert duplicate row on line 1 of statement" , what does this mean in the probe log? Why does the probe repeatedly disconnect and reconnect?
Symptom
2012-04-30T08:40:31: Error: E-UNK-000-000: Server 'NCOMS': ERROR=Attempt to insert duplicate row on line 1 of statement 'insert into custom.status values ( 'DS=2-0-2-1-2-3-2',0,'NODE','10.10.10.10','mttrapd','SNMP probe','DS=2-0-2-1-2-3-2','',1,'DS alert with 1 entities affected.',0,1335793231,1335793231,0,0,1,0,4100,0,'',65...'
2012-04-30T08:40:31: Warning: W-UNK-000-000: Results processing failed
2012-04-30T08:40:31: Error: E-UNK-000-000: Connection to object server 'NCOMS' marked DEAD !
2012-04-30T08:40:31: Debug: D-UNK-000-000: SAF: Writing DisconnectionTime file for NCOMS
2012-04-30T08:40:31: Debug: D-UNK-000-000: Attempting a connection to server 'NCOMS'.
Resolving The Problem
The duplicate row error will cause the probe to disconnect and reconnect to the Object Server. If the probe is inserting into the alerts.status table, check that the default trigger deduplication exists and is enabled.
To prevent the error and the probe disconnection for other tables than alerts.status, a deduplication trigger should be written for the custom table on what action to take when there is a duplicate row. Below is an example which simply drops the incoming duplicate event data and make no updates. This will prevent the probe disconnections, but you may want to update the trigger to take a different action when the duplicate row is received. If the duplicate event data is really needed, either the probe rules file can be updated to make the Identifier unique or the trigger updated to update the existing row in the custom table.
create or replace trigger custom_dedup
group default_triggers
debug false
enabled true
priority 1
comment 'Deduplication processing for custom.status'
before reinsert on custom.status
for each row
begin
cancel;
end;
Historical Number
PMR 53778;122;000
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21622825