Failed to start gunicorn.service: Unit gunicorn.service is masked

704 Views Asked by At

I am trying to deploy django web application on alibabacloud everything seems to be working perfectly(running gunicorn --bind 0.0.0.0:8000 project_name.wsgi on virtual environment)

Then after deactivating the virtual environment and setting up

[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=admin
Group=www-data
WorkingDirectory=/home/admin/project_name
ExecStart=/home/admin/project_name/myprojectenv/bin/gunicorn --access-logfile - --workers 3 --bind 
unix:/home/admin/project_name/project_name.sock project_name.wsgi:application

in /etc/systemd/system/gunicorn.service then running sudo systemctl start gunicorn I keep getting the error

Failed to start gunicorn.service: Unit gunicorn.service is masked.

Please how can I fix this?

I have tried systemctl unmask gunicorn.socket but it keeps showing me the error

Unit gunicorn.socket does not exist, proceeding anyway.
Failed to unmask unit: The name org.freedesktop.PolicyKit1 was not provided 
by any .service files
0

There are 0 best solutions below