मैं Nginx को रोकना चाहता हूं लेकिन यह इस तरह विफल रहता है।
$ sudo service nginx stop
Stopping nginx: [FAILED]
और nginx.confकि nginx.pid की जगह को परिभाषित करता है एक लाइन है।
# /etc/nginx/nginx.conf
pid /var/run/nginx.pid;
लेकिन nginx.pidडायरेक्टरी में नहीं है /var/run/।
locate nginx.pid यह आउटपुट दिखाता है।
/var/run/nginx.pid
/var/run/nginx.pid.oldbin
लेकिन खोज के बाद updatedbकोई मेल नहीं है। मैं nginx / 1.4.4 का उपयोग कर रहा हूं CentOS release 6.5 (Final)।
नगनेक्स डेमन को रोकने के लिए मुझे क्या करना चाहिए?
2014/01/07 को संपादित करें
यह आउटपुट है ps -ef | grep nginx, ऐसा लगता है कि नगनेक्स डेमन अभी भी चल रहा है।
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
और sudo service nginx restartयह त्रुटि देता है। मुझे लगता nginxहै कि शुरू करने में विफल रहता है क्योंकि पुराना अभी भी जीवित है। और /var/log/nginx/error.log-2014017इस त्रुटि को भी समाहित करता है।
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]
psकमांड का परिणाम जोड़ा ।
ps -ef | grep nginxया जाँच कर सकते हैंsudo netstat -tlnp | grep nginx।