Ich möchte Nginx stoppen, aber es schlägt so fehl.
$ sudo service nginx stop
Stopping nginx: [FAILED]
Und nginx.confdas definiert Ort von nginx.pid haben eine Linie.
# /etc/nginx/nginx.conf
pid /var/run/nginx.pid;
Aber es gibt keine nginx.pidim Verzeichnis /var/run/.
locate nginx.pid zeigt diese Ausgabe.
/var/run/nginx.pid
/var/run/nginx.pid.oldbin
Aber nachdem updatedbes keine Übereinstimmung für die Suche gibt. Ich verwende Nginx / 1.4.4 in CentOS release 6.5 (Final).
Was soll ich tun, um den Nginx-Daemon zu stoppen?
Edit 2014/01/07
Dies ist eine Ausgabe von ps -ef | grep nginx, anscheinend läuft der Nginx-Daemon noch.
ironsand 17065 16933 0 15:55 pts/0 00:00:00 grep --color nginx
root 19506 1 0 2013 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
ironsand 19507 19506 0 2013 ? 00:00:25 nginx: worker process
Und sudo service nginx restartgibt diesen Fehler. Ich glaube nginx, der Start scheitert, weil der Alte noch lebt. Und /var/log/nginx/error.log-2014017enthält auch diesen Fehler.
Stopping nginx: [FAILED]
Starting nginx: 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()
[FAILED]
psBefehls hinzu.
ps -ef | grep nginxoder überprüfensudo netstat -tlnp | grep nginx.