nginx An attempt was made to access a socket in a way forbidden by its access permissions
一直启动不了 nginx ,于是看错误日志:[emerg] 4376#4256: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
这个错误找了很久,我也一直怀疑是80端口被占用,把防火墙关了也不行!
然后就开始排查是谁占用了80端口
Windows平台
在windows命令行窗口下执行:
C:\>netstat -aon|findstr "80"
TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448
最后一个数值是PID 记录下来
打开
任务管理器=>选择菜单查看=>选择列=>勾选PID
结果看到对应的是“System”,这个进程,悲剧了!
然后又在网上搜了是:sqlserver reporting services服务 占用进程!
然后马上停止该服务!搞定!