NetXMS Agent on NetXMS Server not working after Database Migration

Started by Spheron, June 06, 2024, 05:55:16 PM

Previous topic - Next topic

Spheron


Hello @all,

i migrated our NetXMS V5.0.3 Installation from Windows (Win10/MySQL) to Linux (Debian 12/PostgreSQL).

Migration worked so far, all pollings are working, except the NetXMS Agent running at the NetXMS Server itself. Before i migrated the DB the agent on the new Linux NetXMS server was working, the agent was recognized from the server and shows many DCI's which was standard after a clean install of the NetXMS Server.

After the migration of the DB, the NetXMS agent infrastructure object still exist, but the DCI are empty and the NetXMS Server cannot reach his own agent. If i make a configuration poll i see this:

[06.06.2024 15:32:19] **** Poll request sent to server ****
[06.06.2024 15:32:19] Poll request accepted, waiting for outstanding polling requests to complete...
[06.06.2024 15:32:19] Starting configuration of for node XXXXX
[06.06.2024 15:32:19] Capability reset
[06.06.2024 15:32:19] Checking node's capabilities...
[06.06.2024 15:32:19]    Checking NetXMS agent...
[06.06.2024 15:32:19]    Cannot connect to NetXMS agent (Internal error)
[06.06.2024 15:32:19]    Checking SNMP...
[06.06.2024 15:32:37]    No response from SNMP agent
[06.06.2024 15:32:37]    Checking SSH connectivity...
[06.06.2024 15:32:37]    Cannot connect to SSH
[06.06.2024 15:32:37]    Checking EtherNet/IP...
[06.06.2024 15:32:37]    Cannot establish EtherNet/IP connection or get device identity (CONNECT FAILED)
[06.06.2024 15:32:37]    Checking Modbus TCP...
[06.06.2024 15:32:37]    Device does not respond to Modbus TCP request (Communication failure)
[06.06.2024 15:32:37] Capability check finished
[06.06.2024 15:32:37] Checking interface configuration...
[06.06.2024 15:32:37] Interface configuration check finished
[06.06.2024 15:32:37] Checking node name
[06.06.2024 15:32:37] Node name cannot be interpreted as valid IP address, no need to resolve to host name
[06.06.2024 15:32:37] Updating general system hardware information
[06.06.2024 15:32:37] Processing template automatic apply rules
[06.06.2024 15:32:37] Processing container autobind rules
[06.06.2024 15:32:37] Processing cluster autobind rules
[06.06.2024 15:32:37] Finished configuration poll of node XXXXX
[06.06.2024 15:32:37] Node configuration was not changed after poll
[06.06.2024 15:32:37] **** Poll completed successfully ****


The NetXMS Server gets an "Internal Error" from his own agent...

In the NetXMS Agent log i get this lines:

2024.06.06 15:31:36.353 *I* [logger             ] Log file opened (rotation policy 2, max size 4194304)
2024.06.06 15:31:36.353 *I* [logger             ] Log rotation policy set to 2 (size=16777216, count=4)
2024.06.06 15:31:36.353 *I* [startup            ] Core agent version 5.0.3 (build tag 5.0-910-gc6da21a763)
2024.06.06 15:31:36.353 *I* [config             ] Additional configuration files was loaded from /etc/nxagentd.conf.d
2024.06.06 15:31:36.353 *I* [logger             ] Debug level set to 0
2024.06.06 15:31:36.353 *I* [config             ] Main configuration file: /etc/nxagentd.conf
2024.06.06 15:31:36.353 *I* [config             ] Configuration tree:
2024.06.06 15:31:36.353 *I* [config             ] config
2024.06.06 15:31:36.353 *I* [config             ]  +- CORE
2024.06.06 15:31:36.353 *I* [config             ]      +- LogFile
2024.06.06 15:31:36.353 *I* [config             ]      |    value: /var/log/nxagentd
2024.06.06 15:31:36.353 *I* [config             ]      +- MasterServers
2024.06.06 15:31:36.353 *I* [config             ]           value: 127.0.0.0/8
2024.06.06 15:31:36.353 *I* [startup            ] Data directory: /var/lib/netxms
2024.06.06 15:31:36.353 *I* [startup            ] File store: /tmp
2024.06.06 15:31:36.355 *I* [crypto             ] Crypto library initialized (OpenSSL 3.0.11 19 Sep 2023)
2024.06.06 15:31:36.361 *I* [db.drv             ] Database driver "sqlite.ddr" loaded and initialized successfully
2024.06.06 15:31:36.381 *I* [db.agent           ] Local database opened successfully
2024.06.06 15:31:36.381 *I* [startup            ] Agent ID is 32ac1782-dda7-4f04-a2e7-ca40c8587c61
2024.06.06 15:31:36.381 *I* [startup            ] Local host name is "XXXXX"
2024.06.06 15:31:36.382 *I* [startup            ] Using system name "XXXXX"
2024.06.06 15:31:36.382 *I* [startup            ] Arbitrary command execution disabled
2024.06.06 15:31:37.386 *I* [linux              ] Unable to parse /proc/drbd, DRBD data collector will not start
2024.06.06 15:31:37.387 *I* [subagents          ] Subagent "Linux" (/usr/lib/x86_64-linux-gnu/netxms/linux.nsm) loaded successfully (version 5.0.3)
2024.06.06 15:31:37.387 *I* [startup            ] System hardware ID is F2B436DCA100E80B2A56CF0AB00456765E905849
2024.06.06 15:31:38.392 *I* [comm               ] Control connector is disabled
2024.06.06 15:31:38.392 *I* [comm               ] Listening on socket 0.0.0.0:4700
2024.06.06 15:31:38.392 *I* [comm               ] Listening on socket :::4700
2024.06.06 15:31:39.393 *I* [filemon            ] Path list for file monitor is empty
2024.06.06 15:31:39.393 *I* [                   ] NetXMS Agent started


I think this line:

2024.06.06 15:31:37.386 *I* [linux              ] Unable to parse /proc/drbd, DRBD data collector will not start
is maybe for a dev a hint to the problem...

So, have anyone any suggestions what i can do, to get a working NetXMS Agent on the NetXMS Server itself (perhaps with all DCI's which are comes with a clean new NetXMS Server install)?

Greetings
Marco



Spheron


Meanwhile i've managed to get the agent on the NetXMS server working again.

In the nxagent.conf i changed:


MasterServers=127.0.0.0/8
in 

MasterServers=<IP_Adress_from_NetXMS_Server>

I deleted the agent object/node in server and recreate it. After that i can get a connect to agent and i can make a configuration poll... :-)

It would be nice if i can recreate the basic DCI from the NetXMS server agent... Can anyonye send me an export of the standard DCI's so i can import this into my installation?

Greetings
Marco  




Filipp Sudanov

Node for the management server should get automatically created when server is started. This node would have special attribute set, you can check it by running NXSL script:

println($node.isLocalManagement);

Based on the presence attribute out of the box templates would be applied.

The templates can be found here: https://github.com/netxms/netxms/tree/master/contrib/templates
Specifically these two files:

netxms_agent.xml
netxms_server.xml

Spheron


Hi Filipp,

thanks for the hint... I restartet NetXMS server, but the templates where not applied to the NetXMS Server Agent.

The println($node.isLocalManagement); show "true" for the NetXMS Server Agent node.

After that, i imported the netxms_server.xml into NetXMS and deploy the template to the NetXMS Server Agent Node and voila... it worked ;D all DCI's from NetXMS Server are in place...

Thanks for the help...

Greetings
Marco