Process started with systemctl throws no errors, but does not appear in process list?

7,945
(code=exited, status=200/CHDIR)

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

Share:
7,945

Related videos on Youtube

Richard
Author by

Richard

Updated on September 18, 2022

Comments

  • Richard
    Richard over 1 year

    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?

    • ryanpattison
      ryanpattison over 7 years
      have you tried to run it yourself?, what about journalctl?