[root@123 ~]# service nginx restart
Stoping nginx... nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
failed. Use force-quit
Starting nginx... nginx (pid 11124 599) already running.
原因,猜测可能是nginx卡死:
ps -ef|grep nginx
kill -9 599 11124 #杀死主进程
再次重启,正常:
service nginx start
或
service nginx restart