"Problem description"
Nginx: [Alert] Kill (2480, failed) (3:no such process)
Hint that there are no related processes.
Solution
In fact, the problem is very low, that is, I did not start the Nginx service, execute/app/nginx/sbin/nginx, open nginx Service, reload Nginx configuration, all normal!
Appendix
# /app/nginx/sbin/nginx -hnginx version: nginx/1.6.3usage: nginx [-?hvvtq] [-s signal] [-c filename] [-p prefix] [-g directives]options: -? ,-h : this help -v : show version and exit - V : show version and configure options then exit -t : test configuration and exit -q : suppress non-error messages during configuration testing -s signal : send Signal to a master process: stop, quit, reopen, reload -p prefix : set prefix path (DEFAULT: /APP/NGINX-1.6.3/) -c filename : set configuration file (default: conf/nginx.conf) -g directives : set global directives out of configuration File
/app/nginx/sbin/nginx-h View Nginx Help information nginx-s stop,-fast shutdownnginx-s quit,-graceful shutdown literally mean for graceful close, personal Understand that it should be safe to shut down nginx-s reopen-reopening the log files to reopen the logfile nginx-s reload-reloading the configuration file to re-add Download config file #/app/nginx/sbin/nginx-t check config nginx:the configuration file/app/nginx-1.6.3/conf/nginx.conf syntax is Oknginx:con Figuration file/app/nginx-1.6.3/conf/nginx.conf Test is successful
#/app/nginx/sbin/nginx-s Stop
-
# pkill-9 Nginx force off
Ps-ef |head-1;ps-ef |grep nginx
uid PI d ppid C stime tty time CMD
root 2114 0 00:39? 00:00:00 nginx:worker Process
root 2126 1660 0 00:41 pts/0& nbsp; 00:00:00 grep nginx
# kill 2114
# pgrep nginx
#/app/nginx/sbin/ Nginx
# pgrep nginx
2150
2151
ps-a | grep Nginx | Grep-v grep | awk ' {print $;} ' |head-1 |xargs-l 1 kill-quit
Use Xargs-l 1 to ensure that only one line of content is taken at a time, then use Kill-quit to close Nginx
-
/app/nginx/sbin/nginx
-
# Ps-ef |head-1;ps-ef |grep nginx
uid pid ppid C stime tty time CMD
root 2157 1 0 00:47? 00:00:00 nginx:master Process/app/nginx/sbin/nginx
nginx 2158 2157 0 00:47? 00:00:00 Nginx:worker process
root 2174 1660 0 00:52 pts/0 00:00:00 grep nginx
# kill-hup 2157
#
# pgrep nginx
2157
2175
After you change the configuration file, you can use the kill- The HUP command reloads the configuration without stopping the original service, a bit nginx-s reload flavor.
Nginx: [Alert] Kill (2480) failed (3:no such process) workaround