By apothecaryre
As i am following through the tutorial of
gunicorn is not running
when i used the command sudo systemctl status gunicorn
my gunicorn.socket file
[Unit]
Description=gunicorn socket
[Socket]
ListenStream=/run/gunicorn.sock
[Install]
WantedBy=sockets.target
my gunicorn.service file
developer@ubuntu-s-1vcpu-1gb-blr1-01:~$ sudo nano /etc/systemd/system/gunicorn.service
GNU nano 4.8
/etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=developer
Group=www-data
WorkingDirectory=/home/developer/myprojectdir
ExecStart=/home/developer/myprojectdir/myprojectenv/bin/gunicorn \
--access-logfile - \
--workers 3 \
--bind unix:/run/gunicorn.sock \
bharathwajan.wsgi:application
[Install]
WantedBy=multi-user.target
error comes when i try to check the status of gunicorn by the command
sudo systemctl status gunicorn
Error:
gunicorn.service - gunicorn daemon
Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-06-04 03:53:42 UTC; 48min ago
TriggeredBy: ● gunicorn.socket
Main PID: 51351 (code=exited, status=1/FAILURE)
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 gunicorn[51351]: self.stop()
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 gunicorn[51351]: File "/home/developer/myprojectdir/myprojectenv/lib/python3.8/site-packages/gunicorn/arbiter.py>
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 gunicorn[51351]: time.sleep(0.1)
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 gunicorn[51351]: File "/home/developer/myprojectdir/myprojectenv/lib/python3.8/site-packages/gunicorn/arbiter.py>
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 gunicorn[51351]: self.reap_workers()
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 gunicorn[51351]: File "/home/developer/myprojectdir/myprojectenv/lib/python3.8/site-packages/gunicorn/arbiter.py>
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 gunicorn[51351]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 gunicorn[51351]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: gunicorn.service: Main process exited, code=exited, status=1/FAILURE
Jun 04 03:53:42 ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: gunicorn.service: Failed with result 'exit-code'.
lines 1-16/16 (END)
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!
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.
i am also facing same isssue
Sep 23 10:57:10 zellaqatar.com systemd[1]: Started gunicorn daemon. Sep 23 10:57:11 zellaqatar.com systemd[1]: gunicorn.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Sep 23 10:57:11 zellaqatar.com systemd[1]: gunicorn.service: Failed with result ‘exit-code’. Sep 23 10:57:39 zellaqatar.com systemd[1]: Started gunicorn daemon. Sep 23 10:57:39 zellaqatar.com systemd[1]: gunicorn.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Sep 23 10:57:39 zellaqatar.com systemd[1]: gunicorn.service: Failed with result ‘exit-code’. Sep 23 10:57:39 zellaqatar.com systemd[1]: Started gunicorn daemon. Sep 23 10:57:39 zellaqatar.com systemd[1]: gunicorn.service: Main process exited, code=exited, status=1/FAILURE Sep 23 10:57:39 zellaqatar.com systemd[1]: gunicorn.service: Failed with result ‘exit-code’. Sep 23 10:57:39 zellaqatar.com systemd[1]: Started gunicorn daemon. Sep 23 10:57:39 zellaqatar.com systemd[1]: gunicorn.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Sep 23 10:57:39 zellaqatar.com systemd[1]: gunicorn.service: Failed with result ‘exit-code’. Sep 23 10:57:39 zellaqatar.com systemd[1]: Started gunicorn daemon. Sep 23 10:57:40 zellaqatar.com systemd[1]: gunicorn.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Sep 23 10:57:40 zellaqatar.com systemd[1]: gunicorn.service: Failed with result ‘exit-code’. Sep 23 10:57:40 zellaqatar.com systemd[1]: Started gunicorn daemon. Sep 23 10:57:40 zellaqatar.com systemd[1]: gunicorn.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Sep 23 10:57:40 zellaqatar.com systemd[1]: gunicorn.service: Failed with result ‘exit-code’. Sep 23 10:57:40 zellaqatar.com systemd[1]: gunicorn.service: Start request repeated too quickly. Sep 23 10:57:40 zellaqatar.com systemd[1]: gunicorn.service: Failed with result ‘exit-code’. Sep 23 10:57:40 zellaqatar.com systemd[1]: Failed to start gunicorn daemon.
Hi there,
When checking the Gunicorn application logs, do you get any other errors?
sudo journalctl -u gunicorn
Also I could suggest checking the Gunicorn socket logs by typing the following command:
sudo journalctl -u gunicorn.socket
Feel free to share the logs here as well.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
