拒绝访问-尝试通过端口#终止任务

时间:2019-06-16 14:20:36

标签: java windows command-prompt

我想杀死端口5000上运行的进程。

我尝试遍历Windows命令提示符并使用发现的PID终止进程,但收到消息“访问被拒绝”。我通过这些命令运行的帐户是一个管理员帐户。显示的代码就是我的提示窗口的样子:

C:\Users\btobi>netstat -ano | findstr :5000

  TCP    127.0.0.1:5000         0.0.0.0:0              LISTENING       18092

  TCP    127.0.0.1:5000         127.0.0.1:51883        CLOSE_WAIT      18092

  TCP    127.0.0.1:5000         127.0.0.1:51973        CLOSE_WAIT      18092

  TCP    127.0.0.1:5000         127.0.0.1:51979        CLOSE_WAIT      18092

  TCP    127.0.0.1:5000         127.0.0.1:51989        CLOSE_WAIT      18092

  TCP    127.0.0.1:5000         127.0.0.1:51990        CLOSE_WAIT      18092

  TCP    127.0.0.1:5000         127.0.0.1:51998        CLOSE_WAIT      18092

  TCP    127.0.0.1:5000         127.0.0.1:52004        CLOSE_WAIT      18092

  TCP    127.0.0.1:5000         127.0.0.1:52005        CLOSE_WAIT      18092

  TCP    127.0.0.1:51883        127.0.0.1:5000         FIN_WAIT_2      13328

  TCP    127.0.0.1:51973        127.0.0.1:5000         FIN_WAIT_2      13328

  TCP    127.0.0.1:51979        127.0.0.1:5000         FIN_WAIT_2      13328

  TCP    127.0.0.1:51989        127.0.0.1:5000         FIN_WAIT_2      13328

  TCP    127.0.0.1:51990        127.0.0.1:5000         FIN_WAIT_2      13328

  TCP    127.0.0.1:51998        127.0.0.1:5000         FIN_WAIT_2      13328

  TCP    127.0.0.1:52004        127.0.0.1:5000         FIN_WAIT_2      13328

  TCP    127.0.0.1:52005        127.0.0.1:5000         FIN_WAIT_2      13328

  TCP    [2605:a000:1419:2421:80b8:1461:7d55:e5c4]:61769

[2001:4998:58:4904::5000]:443  ESTABLISHED     13328

C:\Users\btobi>taskkill /PID 18092 /F

ERROR: The process with PID 18092 could not be terminated.

Reason: Access is denied.

C:\Users\btobi>

0 个答案:

没有答案