Nginx: [Alert] Kill (2480) failed (3:no such process) solution

Source: Internet
Author: User

"Problem description"

    • After you change the nginx.conf file, execute the/app/nginx/sbin/nginx-s reload command to reload the configuration file to report the following error message:

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

    • Nginx Help Information

# /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
    • Nginx Service Management Common commands

/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
    • Close Nginx Service

  1. #/app/nginx/sbin/nginx-s Stop

  2. # 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

  3. 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

    • Start Nginx Service

    1. /app/nginx/sbin/nginx

    2. # 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.