nginx: [alert] kill(57200, 1) failed (3: No such process)

Dol*_*hin 4 nginx

当我执行此命令时:

./nginx -s reload
Run Code Online (Sandbox Code Playgroud)

抛出错误:

nginx: [alert] kill(57200, 1) failed (3: No such process)
Run Code Online (Sandbox Code Playgroud)

当我打开 nginx.pid 文件时:

vim /usr/loca/nginx/logs/nginx.pid
Run Code Online (Sandbox Code Playgroud)

进程 id 是:57200。但是当我检查 nginx 进程时,它没有主进程,输出是:

    [root@localhost logs]# ps -aux|grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root      12191  0.0  0.0  28172  8956 ?        S    Aug29   3:54 nginx: worker process                        
root      12192  0.0  0.0  28172  8960 ?        S    Aug29   3:53 nginx: worker process                        
root      12193  0.0  0.0  28436  9272 ?        S    Aug29   3:46 nginx: worker process                        
root      12194  0.0  0.0  28172  8948 ?        S    Aug29   3:55 nginx: worker process                        
root      12195  0.0  0.0  28436  9156 ?        S    Aug29   3:56 nginx: worker process                        
root      12196  0.0  0.0  28172  8944 ?        S    Aug29   3:49 nginx: worker process                        
root      12197  0.0  0.0  28172  8988 ?        S    Aug29   3:58 nginx: worker process                        
root      12198  0.0  0.0  27908  8740 ?        S    Aug29   3:42 nginx: worker process                        
root      12199  0.0  0.0  27908  8744 ?        S    Aug29   3:39 nginx: worker process                        
root      53760  0.0  0.0 103252   832 pts/1    S+   22:14   0:00 grep nginx
root      80835  0.0  0.0  27908  8740 ?        S    Aug31   2:30 nginx: worker process
Run Code Online (Sandbox Code Playgroud)

怎么了?如何解决这个问题呢?nginx 版本是 1.10.2。

Ani*_*rya 6

我在 nginx 1.10.2 上也遇到了类似的问题。

而不是./nginx -s reload,我曾经./nginx启动 nginx 并解决了这个问题。