昨天排查一个日志上报失败的问题,查看nginx日志发现全是emerg
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)
加科普,log level:
debug < info < notice < warn < error < crit < alert < emerg
后来上网搜应该是端口被占用了,英文好的看日志其实也能看出来,80端口bind失败,无权限创建socket,知道原因后就开始处理。
1、找到占用80端口的进程,查到对应pid=4
C:\Users\Administrator>netstat -ano | findstr :80
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4
TCP