Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Tucson

#1
Hi,

my setup involves several servers, all of which work fine.
However, recently, one of the agents has become unreachable.
After restarting the agent, the server could collect data, but the connection closed after around five minutes.
The agent logs show that the request from the server is accepted by the agent. What could be the issue here?

serverVersion: 6.1.1
agentVersion: 6.2.1
agentOS: Linux

The output from configuration poll:
[16.07.2026 10:31:44] **** Poll request sent to server ****
[16.07.2026 10:31:44] Poll request accepted, waiting for outstanding polling requests to complete...
[16.07.2026 10:31:44] Starting configuration of for node <nodename>
[16.07.2026 10:31:44] Checking node's capabilities...
[16.07.2026 10:31:44]    Checking NetXMS agent...
[16.07.2026 10:32:14]    Cannot connect to NetXMS agent (Request timeout)
[16.07.2026 10:32:14]    SNMP polling is disabled
[16.07.2026 10:32:14]    EtherNet/IP polling is disabled
[16.07.2026 10:32:14]    Modbus TCP polling is disabled
[16.07.2026 10:32:14] Capability check finished
[16.07.2026 10:32:14] Checking interface configuration...
[16.07.2026 10:32:14] Unable to get interface list from node
[16.07.2026 10:32:14] Interface configuration check finished
[16.07.2026 10:32:14] Checking node name
[16.07.2026 10:32:14] Node name cannot be interpreted as valid IP address, no need to resolve to host name
[16.07.2026 10:32:14] Updating general system hardware information
[16.07.2026 10:32:14] Processing template automatic apply rules
[16.07.2026 10:32:14] Processing container autobind rules
[16.07.2026 10:32:14] Processing cluster autobind rules
[16.07.2026 10:32:14] Finished configuration poll of node <nodename>
[16.07.2026 10:32:14] Node configuration was not changed after poll
[16.07.2026 10:32:14] **** Poll completed successfully ****

nxagentlog DebugLevel 8:
2026.07.16 08:20:21.884 *D* [comm               ] Incoming connection from <server-ip>
2026.07.16 08:20:21.884 *D* [comm               ] Connection from <server-ip> accepted
2026.07.16 08:20:21.884 *D* [comm.cs.4          ] Session registered (control=true, master=true, upgrade=true)
2026.07.16 08:20:21.884 *D* [comm.cs.4          ] Message dump:
  ** 000000 | 00 B6 50 20 00 00 00 10 00 00 00 00 00 00 00 00 | ..P ............
  ** code=0x00B6 (CMD_GET_NXCP_CAPS) version=5 flags=0x0020 id=0 size=16 numFields=0
  ** control message

2026.07.16 08:20:21.884 *D* [comm.cs.4          ] Received control message CMD_GET_NXCP_CAPS
2026.07.16 08:20:21.884 *D* [comm.cs.4          ] Using protocol version 5
2026.07.16 08:20:21.884 *D* [comm.cs.4          ] Sending message CMD_NXCP_CAPS (ID 0; size 16; uncompressed)
2026.07.16 08:20:21.884 *D* [comm.cs.4          ] Outgoing message dump:
  ** 000000 | 00 B7 50 20 00 00 00 10 00 00 00 00 05 00 00 00 | ..P ............
  ** code=0x00B7 (CMD_NXCP_CAPS) version=5 flags=0x0020 id=0 size=16 numFields=83886080
  ** control message

2026.07.16 08:20:21.884 *D* [comm.cs.4          ] Message dump:
  ** 000000 | 01 34 50 00 00 00 00 38 00 00 00 01 00 00 00 05 | .4P....8........
  ** 000010 | 00 00 00 97 03 01 00 01 00 00 02 17 03 01 00 01 | ................
  ** 000020 | 00 00 02 18 03 01 00 01 00 00 02 3A 03 01 00 01 | ...........:....
  ** 000030 | 00 00 03 12 03 01 00 01                         | ........
  ** code=0x0134 (CMD_SET_SERVER_CAPABILITIES) version=5 flags=0x0000 id=1 size=56 numFields=5
  ** 000000: [   151] INT16       1
  ** 000008: [   535] INT16       1
  ** 000010: [   536] INT16       1
  ** 000018: [   570] INT16       1
  ** 000020: [   786] INT16       1

2026.07.16 08:20:21.884 *D* [comm.cs.4          ] Received message CMD_SET_SERVER_CAPABILITIES (1)
2026.07.16 08:20:22.224 *D* [dc                 ] DataCollector: sleeping for 60 seconds
2026.07.16 08:20:47.229 *D* [comm.cs.1          ] Session disconnected by watchdog (timestamp = 110222679040, now = 110222799452)
2026.07.16 08:20:47.229 *D* [comm.cs.1          ] CommSession::disconnect()
2026.07.16 08:20:51.885 *D* [comm.cs.4          ] Communication channel closed by peer
2026.07.16 08:20:51.921 *D* [comm               ] Incoming connection from <server-ip>
2026.07.16 08:20:51.921 *D* [comm               ] Connection from <server-ip> accepted
2026.07.16 08:20:51.921 *D* [comm.cs.5          ] Session registered (control=true, master=true, upgrade=true)
2026.07.16 08:20:51.921 *D* [comm.cs.5          ] Message dump:
  ** 000000 | 00 B6 50 20 00 00 00 10 00 00 00 00 00 00 00 00 | ..P ............
  ** code=0x00B6 (CMD_GET_NXCP_CAPS) version=5 flags=0x0020 id=0 size=16 numFields=0
  ** control message

2026.07.16 08:20:51.921 *D* [comm.cs.5          ] Received control message CMD_GET_NXCP_CAPS
2026.07.16 08:20:51.921 *D* [comm.cs.5          ] Using protocol version 5
2026.07.16 08:20:51.921 *D* [comm.cs.5          ] Sending message CMD_NXCP_CAPS (ID 0; size 16; uncompressed)
2026.07.16 08:20:51.922 *D* [comm.cs.5          ] Outgoing message dump:
  ** 000000 | 00 B7 50 20 00 00 00 10 00 00 00 00 05 00 00 00 | ..P ............
  ** code=0x00B7 (CMD_NXCP_CAPS) version=5 flags=0x0020 id=0 size=16 numFields=83886080
  ** control message

2026.07.16 08:20:51.922 *D* [comm.cs.5          ] Message dump:
  ** 000000 | 01 34 50 00 00 00 00 38 00 00 00 01 00 00 00 05 | .4P....8........
  ** 000010 | 00 00 00 97 03 01 00 01 00 00 02 17 03 01 00 01 | ................
  ** 000020 | 00 00 02 18 03 01 00 01 00 00 02 3A 03 01 00 01 | ...........:....
  ** 000030 | 00 00 03 12 03 01 00 01                         | ........
  ** code=0x0134 (CMD_SET_SERVER_CAPABILITIES) version=5 flags=0x0000 id=1 size=56 numFields=5
  ** 000000: [   151] INT16       1
  ** 000008: [   535] INT16       1
  ** 000010: [   536] INT16       1
  ** 000018: [   570] INT16       1
  ** 000020: [   786] INT16       1

2026.07.16 08:20:51.922 *D* [comm.cs.5          ] Received message CMD_SET_SERVER_CAPABILITIES (1)
2026.07.16 08:20:52.229 *D* [comm.cs.2          ] Session disconnected by watchdog (timestamp = 110222679791, now = 110222804453)
2026.07.16 08:20:52.229 *D* [comm.cs.2          ] CommSession::disconnect()
2026.07.16 08:20:57.229 *D* [comm.cs.3          ] Session disconnected by watchdog (timestamp = 110222687458, now = 110222809453)
2026.07.16 08:20:57.230 *D* [comm.cs.3          ] CommSession::disconnect()
2026.07.16 08:21:21.922 *D* [comm.cs.5          ] Communication channel closed by peer
2026.07.16 08:21:22.224 *D* [dc                 ] DataCollector: sleeping for 60 seconds
2026.07.16 08:21:56.957 *D* [comm               ] Incoming connection from <server-ip>
2026.07.16 08:21:56.957 *D* [comm               ] Connection from <server-ip> accepted
2026.07.16 08:21:56.957 *D* [comm.cs.6          ] Session registered (control=true, master=true, upgrade=true)

Kind regards
#2
Hi,

since upgrading to v6 one of my SQL-queries is slower than usual.
Similar queries are still fast like before the update.

I don't know why the DB should threat them differently.


Slow Query:
SELECT CONVERT(i.description, CHAR) 'metric', FLOOR(idata_timestamp/300000)*300000 'time', CONVERT(idata_value,DOUBLE) 'value'
-> FROM idata_1177 d
-> JOIN items i ON i.item_id = d.item_id
-> WHERE i.item_id IN (38416,38421,38422)
-> AND idata_timestamp BETWEEN <starttime> AND <endtime>
-> ORDER BY idata_timestamp;

describe idata_1177;
+-----------------+--------------+------+-----+---------+-------+
| Field           | Type         | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| item_id         | int          | NO   | PRI | NULL    |       |
| idata_timestamp | bigint       | NO   | PRI | NULL    |       |
| idata_value     | varchar(255) | YES  |     | NULL    |       |
| raw_value       | varchar(255) | YES  |     | NULL    |       |
+-----------------+--------------+------+-----+---------+-------+


EXPLAIN SELECT CONVERT(i.description, CHAR) 'metric', FLOOR(idata_timestamp/300000)*300000 'time', CONVERT(idata_value,DOUBLE) 'value'
-> FROM idata_1177 d
-> JOIN items i ON i.item_id = d.item_id
-> WHERE i.item_id IN (38416,38421,38422)
-> AND idata_timestamp BETWEEN <starttime> AND <endtime>
-> ORDER BY idata_timestamp;
+----+-------------+-------+------------+-------+---------------+---------+---------+------------------+------+----------+----------------------------------------------+
| id | select_type | table | partitions | type  | possible_keys | key     | key_len | ref              | rows | filtered | Extra                                        |
+----+-------------+-------+------------+-------+---------------+---------+---------+------------------+------+----------+----------------------------------------------+
|  1 | SIMPLE      | i     | NULL       | range | PRIMARY       | PRIMARY | 4       | NULL             |    3 |   100.00 | Using where; Using temporary; Using filesort |
|  1 | SIMPLE      | d     | NULL       | ref   | PRIMARY       | PRIMARY | 4       | netxms.i.item_id | 1355 |    11.11 | Using where                                  |
+----+-------------+-------+------------+-------+---------------+---------+---------+------------------+------+----------+----------------------------------------------+
2 rows in set, 1 warning (0,00 sec)


EXPLAIN ANALYZE SELECT CONVERT(i.description, CHAR) 'metric', FLOOR(idata_timestamp/300000)*300000 'time', CONVERT(idata_value,DOUBLE) 'value' FROM idata_1177 d JOIN items i ON i.item_id = d.item_id WHERE i.item_id IN (38416,38421,38422) AND idata_timestamp BETWEEN <starttime> AND <endtime> ORDER BY idata_timestamp;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Sort: d.idata_timestamp  (actual time=2041.314..2041.572 rows=4318 loops=1)
    -> Stream results  (cost=418.24 rows=452) (actual time=978.482..2039.624 rows=4318 loops=1)
        -> Nested loop inner join  (cost=418.24 rows=452) (actual time=978.464..2037.612 rows=4318 loops=1)
            -> Filter: (i.item_id in (38416,38421,38422))  (cost=3.63 rows=3) (actual time=0.086..0.144 rows=3 loops=1)
                -> Index range scan on i using PRIMARY over (item_id = 38416) OR (item_id = 38421) OR (item_id = 38422)  (cost=3.63 rows=3) (actual time=0.084..0.137 rows=3 loops=1)
            -> Filter: (d.idata_timestamp between 1776340969454 and 1776427369454)  (cost=7.70 rows=151) (actual time=678.666..679.068 rows=1439 loops=3)
                -> Index lookup on d using PRIMARY (item_id=i.item_id)  (cost=7.70 rows=1355) (actual time=0.046..659.711 rows=525672 loops=3)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (2,05 sec)



Fast Query:
SELECT CONVERT(i.description, CHAR) 'metric', FLOOR(idata_timestamp/300000)*300000 'time', CONVERT(idata_value,DOUBLE) 'value'
-> FROM idata_921 d
-> JOIN items i ON i.item_id = d.item_id
-> WHERE i.item_id IN (83253,83254)
-> AND idata_timestamp BETWEEN <starttime> AND <endtime>
-> ORDER BY idata_timestamp;

describe idata_921;
+-----------------+--------------+------+-----+---------+-------+
| Field           | Type         | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| item_id         | int          | NO   | PRI | NULL    |       |
| idata_timestamp | bigint       | NO   | PRI | NULL    |       |
| idata_value     | varchar(255) | YES  |     | NULL    |       |
| raw_value       | varchar(255) | YES  |     | NULL    |       |
+-----------------+--------------+------+-----+---------+-------+


EXPLAIN SELECT CONVERT(i.description, CHAR) 'metric', FLOOR(idata_timestamp/300000)*300000 'time', CONVERT(idata_value,DOUBLE) 'value'
-> FROM idata_921 d
-> JOIN items i ON i.item_id = d.item_id
-> WHERE i.item_id IN (83253,83254)
-> AND idata_timestamp BETWEEN <starttime> AND <endtime>
-> ORDER BY idata_timestamp;
+----+-------------+-------+------------+--------+---------------+---------+---------+------------------+------+----------+-----------------------------+
| id | select_type | table | partitions | type   | possible_keys | key     | key_len | ref              | rows | filtered | Extra                       |
+----+-------------+-------+------------+--------+---------------+---------+---------+------------------+------+----------+-----------------------------+
|  1 | SIMPLE      | d     | NULL       | range  | PRIMARY       | PRIMARY | 12      | NULL             | 2880 |   100.00 | Using where; Using filesort |
|  1 | SIMPLE      | i     | NULL       | eq_ref | PRIMARY       | PRIMARY | 4       | netxms.d.item_id |    1 |   100.00 | NULL                        |
+----+-------------+-------+------------+--------+---------------+---------+---------+------------------+------+----------+-----------------------------+
2 rows in set, 1 warning (0,00 sec)


EXPLAIN ANALYZE SELECT CONVERT(i.description, CHAR) 'metric', FLOOR(idata_timestamp/300000)*300000 'time', CONVERT(idata_value,DOUBLE) 'value' FROM idata_921 d JOIN items i ON i.item_id = d.item_id WHERE i.item_id IN (83253,83254) AND idata_timestamp BETWEEN <starttime> AND <endtime> ORDER BY idata_timestamp;
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=3749.56 rows=2880) (actual time=1.607..5.474 rows=2880 loops=1)
    -> Sort: d.idata_timestamp  (cost=581.56 rows=2880) (actual time=1.563..1.708 rows=2880 loops=1)
        -> Filter: ((d.item_id in (83253,83254)) and (d.idata_timestamp between 1776340969454 and 1776427369454))  (cost=581.56 rows=2880) (actual time=0.021..1.171 rows=2880 loops=1)
            -> Index range scan on d using PRIMARY over (item_id = 83253 AND 1776340969454 <= idata_timestamp <= 1776427369454) OR (item_id = 83254 AND 1776340969454 <= idata_timestamp <= 1776427369454)  (cost=581.56 rows=2880) (actual time=0.018..0.876 rows=2880 loops=1)
    -> Single-row index lookup on i using PRIMARY (item_id=d.item_id)  (cost=1.00 rows=1) (actual time=0.001..0.001 rows=1 loops=2880)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,01 sec)