代码之家  ›  专栏  ›  技术社区  ›  Dolphin

nginx:[警报]kill(57200,1)失败(3:无此进程)

  •  2
  • Dolphin  · 技术社区  · 6 年前

    ./nginx -s reload
    

    抛出错误:

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

    当我打开门nginx.pid文件:

    vim /usr/loca/nginx/logs/nginx.pid
    

    进程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
    

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

    1 回复  |  直到 6 年前
        1
  •  6
  •   Anil Maurya    6 年前

    我在nginx1.10.2上也遇到了类似的问题。

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