NetXMS Support Forum

English Support => General Support => Topic started by: Hanfelt on June 03, 2022, 09:16:38 PM

Title: Identify problematic source node.
Post by: Hanfelt on June 03, 2022, 09:16:38 PM
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"
      }
   ]
Title: Re: Identify problematic source node.
Post by: Alex Kirhenshtein on June 03, 2022, 09:27:24 PM
try node #2277 (you can search by node id in object browser)
Title: Re: Identify problematic source node.
Post by: Hanfelt on June 03, 2022, 09:35:05 PM
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...
Title: Re: Identify problematic source node.
Post by: Filipp Sudanov on June 06, 2022, 12:36:53 PM
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';
Title: Re: Identify problematic source node.
Post by: Victor Kirhenshtein on June 07, 2022, 09:50:44 AM
Actually 6733 (first part of primary key) should be ID of the node this package belongs to.

Best regards,
Victor