Occasional issues with NetXMS Agents after service restart

Started by Tursiops, January 22, 2018, 04:50:31 AM

Previous topic - Next topic

Tursiops

Hi,

On Windows, I am at times seeing an issue where the NetXMS service will not restart (either after an upgrade or a manual restart attempt to load a new configuration).
Checking the logs, I this is generally due to a the NetXMS agent port still being in use by PowerShell (which we use extensively for Parameters, Actions and ParametersProviders). The actual NetXMS agent service is stopped, the process is not running, but a PowerShell process which was started by NetXMS is still active and for some reason managed to hold the agent's network port open. The system does not recover from this by itself, we have to go in manually and kill powershell.exe, after which the NetXMS service will start again.
Not sure if this is an issue where the NetXMS agent either does not clean up all external commands (properly) prior to shutdown or if at some point it just loses track of one of those commands, which is then never killed and just keeps sitting there.

We've had this issue for a while and this is appears to impact maybe a handful of systems a week (I have two systems which seem to have this problem pretty much every week, other systems appear to be more random). Considering we have 2000+ agents, it's certainly not a huge issue, but it is quite a nuisance to pick up on this  (with some systems which we do not expect to be on all the time, this problem may be ongoing and we wouldn't even notice) and resolve it.

I am pretty sure we have this problem prior to starting to implement ParametersProviders and we are not regularly running actions against the two recurring systems, so I have to assume it's just an external parameter problem.

Has anyone else encountered a similar problem?

Cheers