Question

what (code=exited, status=1/FAILURE) ? service nginx status

I just found an error in the state of nginx. This error does not prevent anything. It does not give me problems. Everything is started correctly. Nginx -t It did not return any syntax errors.

I only see it in the nginx status sale. Service nginx status. Or Systemctl status nginx

Error:

systemctl status nginx

  • nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2017-02-11 20:55:04 UTC; 5min ago Process: 25343 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=1/FAILURE) Process: 25710 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 25706 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 25715 (nginx) Tasks: 2 Memory: 2.0M CPU: 49ms CGroup: /system.slice/nginx.service |-25715 nginx: master process /usr/sbin/nginx -g daemon on; master_process on `-25720 nginx: worker process

Feb 11 20:55:04 Singapore-ap-southeast systemd[1]: Starting A high performance web server and a reverse proxy server… Feb 11 20:55:04 Singapore-ap-southeast systemd[1]: nginx.service: PID 25363 read from file /run/nginx.pid does not exist or is a zombie. Feb 11 20:55:04 Singapore-ap-southeast systemd[1]: Started A high performance web server and a reverse proxy server.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

If nginx -t doesn’t return anything, I would verify Nginx error log. By default, it should be located in /var/log/nginx/error.log. You can open it with any text editor:

  1. sudo nano /var/log/nginx/error.log

Can you find there something suspiciously?

Second log which can you take a look is Syslog:

  1. sudo nano /var/log/syslog

Try to find nginx logs and see what they say. Did you changed anything before this happened?

Check whether apache is running using “service apache2 status” If yes stop it using “service apache2 start” Than restart nginx with “service nginx restart”

i am tuck on blow error please help me out.

root@phpmyadmin-s-1vcpu-1gb-nyc3-01:~/digial-estate# systemctl daemon-reload root@phpmyadmin-s-1vcpu-1gb-nyc3-01:~/digial-estate# sudo systemctl start digital-state root@phpmyadmin-s-1vcpu-1gb-nyc3-01:~/digial-estate# sudo systemctl enable digital-state root@phpmyadmin-s-1vcpu-1gb-nyc3-01:~/digial-estate# sudo systemctl status digital-state ● digital-state.service - Gunicorn instance to serve myproject Loaded: loaded (/etc/systemd/system/digital-state.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2019-09-24 12:10:39 UTC; 10s ago Main PID: 29859 (code=exited, status=200/CHDIR)

Sep 24 12:10:39 phpmyadmin-s-1vcpu-1gb-nyc3-01 systemd[1]: Started Gunicorn instance to serve myproject. Sep 24 12:10:39 phpmyadmin-s-1vcpu-1gb-nyc3-01 systemd[29859]: digital-state.service: Changing to the requested working directory failed: No such file or directory Sep 24 12:10:39 phpmyadmin-s-1vcpu-1gb-nyc3-01 systemd[29859]: digital-state.service: Failed at step CHDIR spawning /root/digial-estate/myprojectenv/bin/gunicorn: No such file or directory Sep 24 12:10:39 phpmyadmin-s-1vcpu-1gb-nyc3-01 systemd[1]: digital-state.service: Main process exited, code=exited, status=200/CHDIR Sep 24 12:10:39 phpmyadmin-s-1vcpu-1gb-nyc3-01 systemd[1]: digital-state.service: Failed with result ‘exit-code’.