title: Trying to configure gunicorn
body: <p>I have been following this <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04" rel="nofollow noreferrer">tutorial</a> to deploy my django project on Digital Ocean. I am trying to configure <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04#creating-systemd-socket-and-service-files-for-gunicorn" rel="nofollow noreferrer">gunicorn</a>.</p>
  
  <p>My project structure looks similar to this:</p>
  
  <p><a href="https://i.stack.imgur.com/lfinF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lfinF.jpg" alt="enter image description here"></a></p>
  
  <p>On my <code>settings.py</code> I use <code>DEBUG=False</code></p>
  
  <p>I create the gunicorn.socket and gunicorn.service.</p>
  
  <p><strong>/etc/systemd/system/gunicorn.socket</strong></p>
  
  <pre><code>[Unit]
  Description=gunicorn socket
  
  [Socket]
  ListenStream=/run/gunicorn.sock
  
  [Install]
  WantedBy=sockets.target
  </code></pre>
  
  <p><strong>/etc/systemd/system/gunicorn.service</strong></p>
  
  <pre><code>[Unit]
  Description=gunicorn daemon
  Requires=gunicorn.socket
  After=network.target
  
  [Service]
  User=someuser
  Group=www-data
  WorkingDirectory=/home/someuser/myproject
  ExecStart=/home/someuser/myproject/myprojectenv/bin/gunicorn \
            --access-logfile - \
            --workers 3 \
            --bind unix:/run/gunicorn.sock \
            Myproject.wsgi:application
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>I  start and enable the Gunicorn socket:</p>
  
  <pre><code>sudo systemctl start gunicorn.socket 
  sudo systemctl enable gunicorn.socket
  </code></pre>
  
  <p>Check the status of the process to find out whether it was able to start:</p>
  
  <pre><code>sudo systemctl status gunicorn.socket
  </code></pre>
  
  <p>This is what I get and then it returns to the command line.</p>
  
  <pre><code>Failed to dump process list, ignoring: No such file or directory
  β—� gunicorn.socket - gunicorn socket
     Loaded: loaded (/etc/systemd/system/gunicorn.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Sat 2019-05-04 23:12:03 UTC; 13s ago
     Listen: /run/gunicorn.sock (Stream)
     CGroup: /system.slice/gunicorn.socket
  
  May 04 23:12:03 myproject systemd[1]: Listening on gunicorn socket.
  </code></pre>
  
  <p>Next, I check for the existence of the gunicorn.sock  file within the /run directory:</p>
  
  <pre><code>file /run/gunicorn.sock
  /run/gunicorn.sock: socket
  </code></pre>
  
  <p>It seems that a file or directory doesn't exist, but it doesn't provide any more details. The gunicorn.sock seems to exist.</p>
  
  <p>I am familiar with Python but not with servers and deploying so I am at a loss here.</p>
  
  <p>I have successfully followed the similar tutorial for Ubuntu 16.04 a few months ago, but now I keep hitting issues.</p>