mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
239 stars 94 forks source link

Port Is not getting released after stopping nscp service. #706

Closed AdirTrichter closed 3 years ago

AdirTrichter commented 3 years ago

Issue and Steps to Reproduce

Describe your issue and tell us how to reproduce it.

On multiple servers when I need to change a setting of the nscp service I change it and after restarting the service it stops responding to the icinga after some checks I found out that the port is not getting closed, and only restart for the machine (servers in my case) the port is getting released, unfortunately I cannot get a picture or a video of it because I'm working at a close network environment, but if you want I will try to give as much information as I can.

Expected Behavior

Shouldn't the port get released after the service is getting stopped?

Actual Behavior

The port is still being used, even through the service is not active.

Details

Thanks ahead, and best regards, Adir Trichter.

mintsoft commented 3 years ago

@AdirTrichter We see this from time to time as well, usually it's caused by a subprocess (like powershell, cmd or cscript) that is still running at the moment the nscp is stopped that's run as part of one of the checks. If you find the process and kill it, the ports will then be freed.

AdirTrichter commented 3 years ago

Ok than, good to know that, I believe it might be the case at our environment, I will try to see if are there any running process like you said when I will get access to my network.

Thanks you again I I'll update this issue if it succeeds.

AdirTrichter commented 3 years ago

Thank you very much I believe it fixed it, what I had to do is to close all the powershell.exe and the conhost.exe running process, I got to work again.