Restart Agent 3.9.334 on CentOS 7

Started by twenrich, November 15, 2021, 12:53:15 PM

Previous topic - Next topic

twenrich

During the last days, I upgraded our 2.2.12 NetXMS to 3.9.334 (mostly painless).
I also upgraded the agents on most of our servers (with the exception of some CentOS6 machines).

However, I was used to restart the agent from the console (Node=>Tools=>Restart agent).
With the 3.9 agent, this works only on the Windows servers.

On CentOS7, this stops the agent (and requires manual restart on the target machine).

Do I miss some configuration option ?

Regards,

Thomas

Filipp Sudanov

How the agent is actually started? Is there some startup script?
if you do
ps fax | grep nxagentd
what commang line parameters are visible there?

twenrich

ps fax returns
/3086 ?        Ssl   27:08 /opt/netxms/bin/nxagentd -d -c /etc/nxagentd.conf


On system startup, I use a script in /etc/rc.d/init.d/nxagentd (attached).
However, the restart usually worked with a few 2.2 versions and the same startup configuration.

With Agent 2.2.10, I get in the log
2021.11.16 10:08:19.108 *D* RestartAgent() called
2021.11.16 10:08:19.108 *D* Restarting agent with command line '"/opt/netxms/bin/nxagentd" -c "/etc/nxagentd.conf" -d -D 1 -G CORE -X 29246'
2021.11.16 10:08:19.112 *D* Trap sender thread terminated
2021.11.16 10:08:20.113 *D* Session Watchdog thread terminated
2021.11.16 10:08:20.113 *D* Listener thread terminated
2021.11.16 10:08:20.114 *D* [threads.pool       ] Thread pool COMM destroyed
2021.11.16 10:08:20.592 *I* NetXMS Agent stopped

2021.11.16 10:08:21.116 Log file opened (rotation policy 2, max size 4194304)
2021.11.16 10:08:21.116 *D* Log rotation policy set to 2 (size=16777216, count=4)
2021.11.16 10:08:21.116 *I* Core agent version 2.2.10
2021.11.16 10:08:21.116 *I* Additional configs was loaded from /etc/nxagentd.conf.d
2021.11.16 10:08:21.116 *I* Debug level set to 1
2021.11.16 10:08:21.117 *I* Data directory: /opt/netxms/var/lib/netxms
2021.11.16 10:08:21.117 *I* File store: /opt/var/nxagentd


With Agent 3.9.334 (installed with package manager from the NPI on the NetXMS Download page), on the same machine, I get in the logs
2021.11.16 10:11:33.315 *D* [                   ] RestartAgent() called
2021.11.16 10:11:33.316 *D* [                   ] Restarting agent with command line '"/opt/netxms/bin/nxagentd" -c "/etc/nxagentd.conf" -p "/var/run/nxagentd.pid" -G CORE -d -X 2641'
2021.11.16 10:11:33.375 *D* [dc                 ] Data reconciliation thread stopped
2021.11.16 10:11:33.376 *D* [threads.pool       ] Thread pool DATACOLL destroyed
2021.11.16 10:11:33.376 *D* [dc                 ] Data collection scheduler thread stopped
2021.11.16 10:11:33.376 *D* [dc                 ] Data sender thread stopped
2021.11.16 10:11:33.377 *D* [dc                 ] Database writer thread stopped
2021.11.16 10:11:34.377 *D* [                   ] Session Watchdog thread terminated
2021.11.16 10:11:34.377 *D* [                   ] Listener thread terminated
2021.11.16 10:11:34.377 *D* [notifications      ] Notification processor stopped
2021.11.16 10:11:34.378 *D* [threads.pool       ] Thread pool COMM destroyed
2021.11.16 10:11:34.378 *D* [threads.pool       ] Thread pool WEBSVC destroyed
2021.11.16 10:11:34.378 *D* [threads.pool       ] Thread pool PROCEXEC destroyed
2021.11.16 10:11:34.703 *I* [                   ] NetXMS Agent stopped


Regards,
Thomas

Victor Kirhenshtein

Hi,

looks like bug in new agent. I will try to reproduce it on my CentOS 7 test system.

Best regards,
Victor