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

运行nginx服务器时,终端下输入命令ps aux|grep nginx,正确应显示如下图:

   但是却没有显示中间nobody     3162  0.0  0.1  37228  3548 ?        S    22:58   0:00 nginx: worker process这一行,只有其它两行的状况。这样就会造成通过django管理员进入后台传到fastdfs中的图片无法通过静态网页或者img标签访问。最开始打算 卸载重新安装。(编译安装的nginx)。重装后启动nginx报如下错误:

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

然后经过
[root@localhost ~]# ll /usr/local/nginx/sbin/nginx
-rwxr-xr-x. 1 root root 9120664 May 9 11:30 /usr/local/nginx/sbin/nginx

[root@localhost ~]# whereis nginx
nginx: /usr/bin/nginx /usr/local/nginx

[root@localhost ~]# find / -name nginx
find: ‘/run/user/1000/gvfs’: Permission denied
/etc/rc.d/init.d/nginx
/usr/bin/nginx
/usr/local/nginx
/usr/local/nginx/sbin/nginx

[root@localhost ~]# find / -name nginx.conf
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/local/nginx/conf/nginx.conf

[root@localhost ~]# /usr/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
-bash: /usr/sbin/nginx: No such file or directory

[root@localhost ~]# /usr/bin/nginx -c /usr/local/nginx/conf/nginx.conf
[root@localhost ~]# vi /usr/local/nginx/conf/nginx.conf
[root@localhost ~]# nginx -s reload
一通瞎操作(并不知道这样做的原因),解决问题。

猜你喜欢

转载自blog.csdn.net/MR_L_0927/article/details/79504299