正常运行时,即网页能够访问时:
[root@web1 ~]# ps -aux | grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
www 1928 0.0 0.5 64560 21748 ? S 10:29 0:00 nginx: worker process
root 37826 0.0 0.0 103168 856 pts/0 S+ 10:56 0:00 grep nginx
出现 [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
问题时:
[root@web2 sk]# ps -aux | grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 1608 0.0 0.0 44548 1080 ? Ss 10:48 0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
www 1609 0.0 0.5 64560 21276 ? S 10:48 0:00 nginx: worker process
root 1628 0.0 0.0 103168 856 pts/0 S+ 10:56 0:00 grep nginx
然后测试其状态:
[root@web1 ~]# nginx -c /usr/local/nginx/conf/nginx.conf
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[root@web2 sk]# nginx -c /usr/local/nginx/conf/nginx.conf
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
两个 web 服务器都被占用?那 web1 怎么能够访问? web2 竟然不能
难道是 主进程 在干扰?
怎样解决?
网上说的是
kill -9 $PID --nginx 的 pid
[root@web1 ~]# ps -aux | grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
www 1928 0.0 0.5 64560 21748 ? S 10:29 0:00 nginx: worker process
root 37826 0.0 0.0 103168 856 pts/0 S+ 10:56 0:00 grep nginx
出现 [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
问题时:
[root@web2 sk]# ps -aux | grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 1608 0.0 0.0 44548 1080 ? Ss 10:48 0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
www 1609 0.0 0.5 64560 21276 ? S 10:48 0:00 nginx: worker process
root 1628 0.0 0.0 103168 856 pts/0 S+ 10:56 0:00 grep nginx
然后测试其状态:
[root@web1 ~]# nginx -c /usr/local/nginx/conf/nginx.conf
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[root@web2 sk]# nginx -c /usr/local/nginx/conf/nginx.conf
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
两个 web 服务器都被占用?那 web1 怎么能够访问? web2 竟然不能
难道是 主进程 在干扰?
怎样解决?
网上说的是
kill -9 $PID --nginx 的 pid
没有用,我这里
突然就弄好了?
看来下次要好好观察