1

I have Angular 8 installed on the server which uses port 4200. But today I can't run angular on port 4200. The error message is "An unhandled exception occurred: listen EACCES: permission denied 127.0.0.1:4200".

Using netstat -a I noticed that the port is listening and it is used by the system. I tried to kill the process taskkill /F /PID 1242 but couldn't. The error message is "Access is denied".

How can I kill the process?

Tim
  • 5,435
  • 7
  • 42
  • 62
zhor
  • 11
  • 1
  • 3
  • It might seem obvious but I have to mention it, have you tried restarting and trying again? Are you using windows 10 or windows server? what is running on port 4200? maybe you have another running instance of Angular – Masoud Tahmasebi Jun 09 '20 at 06:17
  • I am sorry it is windows server 2016. I have no another project of angular. It was restarted many times. Here is details about the process. Name - System PID - 4 Status - Running User name - System Description - NT Kernel & System – zhor Jun 09 '20 at 06:28
  • a workaround can be suggested as in here, but the answer to your question I will do some research and let you know: https://stackoverflow.com/questions/40717449/how-to-change-angular-port-from-4200-to-any-other – Masoud Tahmasebi Jun 09 '20 at 06:33
  • can you please try this link and let me know? https://community.talend.com/t5/Architecture-Best-Practices-and/How-to-find-and-kill-a-process-running-on-a-port/ta-p/55315 – Masoud Tahmasebi Jun 09 '20 at 06:36
  • didn't help. End task is not available. Cmd commands didn't work – zhor Jun 09 '20 at 06:53

1 Answers1

0

try this:

taskkill /pid 2134 /t /fi username eq administrator

Taken from: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/taskkill

maor yadin
  • 51
  • 8