Identify problematic source node.

Started by Hanfelt, June 03, 2022, 09:16:38 PM

Previous topic - Next topic

Hanfelt

Hi everyone do you know how I can identify the source node from this error? Would like to delete it to get rid of this error...


   "id": 2819476,
   "rootId": 0,
   "code": 52,
   "name": "SYS_DB_QUERY_FAILED",
   "timestamp": 1654279789,
   "originTimestamp": 1654279789,
   "origin": 0,
   "source": 2277,
   "zone": 0,
   "dci": 0,
   "severity": 4,
   "message": "Database query failed (Query: INSERT INTO software_inventory (node_id,name,version,vendor,install_date,url,description) VALUES (?,?,?,?,?,?,?); Error: Duplicate entry '6733-Cisco AnyConnect Secure Mobility Client -4.7.04056' for key 'PRIMARY')",
   "lastAlarmKey": "SERVICE_NOT_RUNNING_8ED0B4979152E0DCB6AABCDFC6194391_0x000008E5",
   "lastAlarmMessage": "",
   "tags": null,
   "parameters": [
      {
         "name": "query",
         "value": "INSERT INTO software_inventory (node_id,name,version,vendor,install_date,url,description) VALUES (?,?,?,?,?,?,?)"
      },
      {
         "name": "message",
         "value": "Duplicate entry '6733-Cisco AnyConnect Secure Mobility Client -4.7.04056' for key 'PRIMARY'"
      },
      {
         "name": "connectionLost",
         "value": "0"
      },
      {
         "name": "hash",
         "value": "8ED0B4979152E0DCB6AABCDFC6194391"
      }
   ]

Alex Kirhenshtein

try node #2277 (you can search by node id in object browser)

Hanfelt

The problem is that 2277 is the Netxms server itself, I have converted the sql to utf and got rid of two other problematic nodes but I cannot seem to find this one...

Filipp Sudanov

Ok, so looks that the event about the SQL error is generated showing the server as source.

This error happens due to old version netxms agent - it cropped name of software package and it could happen that remaining part of name for two packages was the same. So the solution is to upgrade agents on all nodes.
You can try to find the node

select from software_inventory where name like '6733-Cisco AnyConnect Secure Mobility Client%' and version = '4.7.04056';

Victor Kirhenshtein

Actually 6733 (first part of primary key) should be ID of the node this package belongs to.

Best regards,
Victor