关于服务启不起来问题

nginx 不能启动,报错如下

listen tcp 127.0.0.1:8000: bind: An attempt was made to access a socket in a way forbidden by its access permissions.


exit status 1

1. 通过 cmd 命令查看 80 端口的占用情况

输入命令: netstat -aon|findstr "80"

C:UsersAdministrator>netstat -aon|findstr "80"
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       17368
  TCP    0.0.0.0:1555           0.0.0.0:0              LISTENING       800
  TCP    0.0.0.0:8081           0.0.0.0:0              LISTENING       18528
  TCP    0.0.0.0:54021          0.0.0.0:0              LISTENING       3480
  TCP    127.0.0.1:80           127.0.0.1:23924        FIN_WAIT_2      17368
  TCP    127.0.0.1:80           127.0.0.1:23930        FIN_WAIT_2      17368
  TCP    127.0.0.1:80           127.0.0.1:23932        FIN_WAIT_2      17368
  TCP    127.0.0.1:80           127.0.0.1:23937        FIN_WAIT_2      17368

2.查看 17368 端口 对应的任务

输入命令: tasklist|findstr "17368"

C:UsersAdministrator>tasklist|findstr "17368"
nginx.exe                    17368 Console                    2      2,260 K

 3. 干掉对应的 任务即可     

 

原文地址:https://www.cnblogs.com/FSH1014/p/12423197.html