Am o eroare când o fac systemctl start gunicorn.socket
systemctl status gunicorn.socket
â gunicorn.socket - priză gunicorn
Încărcat: eroare (Motiv: Unitatea gunicorn.socket nu s-a încărcat corect: mesaj greșit.)
Activ: inactiv (mort)
17 septembrie 14:20:52 tcs-generator systemd[1]: /etc/systemd/system/gunicorn.socket:3: Antet de secțiune nevalid „[Socket]ListenStream=/run/gunicorn.sock”
Fișierul My SystemD Unit (gunicorn.service):
[Unitate]
Descriere=demon gunicorn
Necesită=gunicorn.socket
După=rețea.țintă
[Serviciu]
Utilizator=rădăcină
Grup=www-date
WorkingDirectory=/var/www/Network_web
ExecStart=/var/www/Network_web/djangoenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock Network_web.wsgi:application
[Instalare]
WantedBy=multi-user.target
Fișierul meu socket (gunicorn.socket):
[Unitate]
Descriere = priză gunicorn
[Socket]ListenStream=/run/gunicorn.sock
[Instalare]
WantedBy=sockets.target
Acestea sunt câteva dintre rezultatele pe care le vedem:
root@tcs-generator:/# ls -la /run/ | grep gu
root@tcs-generator:/#
17 septembrie 17:18:28 tcs-generator systemd[1]: A pornit demonul gunicorn.
17 septembrie 17:18:31 tcs-generator gunicorn[858]: utilizare: gunicorn [OPȚIUNI] [APP_MODULE]
17 septembrie 17:18:31 tcs-generator gunicorn[858]: gunicorn: eroare: argument -b/--bind: așteptat un argument
17 septembrie 17:18:31 tcs-generator systemd[1]: gunicorn.service: Proces principal ieșit, cod=ieșit, stare=2/INVALIDARGUMENT
17 septembrie 17:18:31 tcs-generator systemd[1]: gunicorn.service: Eșuat cu rezultatul „exit-code”.
17 septembrie 14:20:52 tcs-generator systemd[1]: /etc/systemd/system/gunicorn.service:10: Lipsește „=”, ignorând linia.