3

I am trying to stop a windows service that is using a port I need, but the service keeps restarting it self. How do I stop it from restarting itself?

I followed this question to kill it (How to kill the process currently using a port on localhost in windows?), but when I listen for the port again a new service started already:

enter image description here

How this happened and some notes:

  • I created a Nodejs service and started it as a windows service (so now it is running in it's own windows instance)
  • My service had a cmd line to stop it self net stop "Service Name". This semi-failed for some reason (it did stop, kinda, but then it starts again)
  • I have even uninstalled the Nodejs service completely, but still something is starting it up over and over (because the port stays in use)
  • I can't move the Nodejs service files, because they are in use
Paul Kruger
  • 2,094
  • 7
  • 22
  • 49

1 Answers1

2

To find out what application/service the PID is referring to, you can open Resource Monitor by running: resmon

Then choose CPU tab and look for the PID, Note: it could be under Processes or Services. If it's a service then you can stop and disable it so it won't run again.

If it's a Process, the name should give you an idea what it is.

alt146
  • 501
  • 6
  • 7
  • This helped me to kill a process that was messing up my system clock (running about 10 minutes slow and would not stay synchronised with internet time - would briefly sync then go back to being slow). – CameronAtkinson Feb 25 '20 at 11:40