1

Unix newbie here. I am trying to start gunicorn with systemctl. No error message appears, but it's also not showing up in the processes list:

$ sudo systemctl start gunicorn
$ ps aux | grep gunicorn
test+ 29902  0.0  0.0  14224   924 pts/0    S+   11:13   0:00 grep --color=auto gunicorn

Is it possible that it's running, but invisible?

Or if not, how can I debug why it isn't running?

UPDATE: Just tried systemctl status gunicorn and got this:

● gunicorn.service - Gunicorn Application Server handling myapp
   Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Mon 2016-10-31 11:24:04 EDT; 1min 25s ago
  Process: 30135 ExecStart=/.venv/bin/gunicorn --workers 3 --bind unix:/home/myapp/myapp/myapp.sock myapp.wsgi:application (code=exited, status=200/CHDIR)
 Main PID: 30135 (code=exited, status=200/CHDIR)

So it's dead, but how can I find out why?

1
  • have you tried to run it yourself?, what about journalctl? – ryanpattison Oct 31 '16 at 16:53
4
(code=exited, status=200/CHDIR)

The working directory that you've configured in the service unit is wrong or inaccessible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.