2017-06-29 2 views
0

Essayer de gunicorn d'installation pour fonctionner avec le fichier de contrôle systemd est sudo nano /etc/systemd/system/gunicorn.service et la sortie pour le test estconfiguration gunicorn pour fonctionner avec systemd

[email protected]:~# systemctl start gunicorn 
Failed to start gunicorn.service: Unit gunicorn.service is not loaded properly: Invalid argument. 
See system logs and 'systemctl status gunicorn.service' for details. 


[email protected]:~# systemctl status gunicorn.service 
● gunicorn.service - gunicorn daemon 
    Loaded: error (Reason: Invalid argument) 
    Active: inactive (dead) 

Jun 29 05:13:17 samuel-pc systemd[1]: [/etc/systemd/system/gunicorn.service:9] Executable path is not absolute, ignoring: gunicorn --access-logfile - --workers 3 --bind unix:/root/revamp/revamp 
Jun 29 05:13:17 samuel-pc systemd[1]: gunicorn.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. 
Jun 29 05:13:29 samuel-pc systemd[1]: [/etc/systemd/system/gunicorn.service:9] Executable path is not absolute, ignoring: gunicorn --access-logfile - --workers 3 --bind unix:/root/revamp/revamp 
Jun 29 05:13:29 samuel-pc systemd[1]: gunicorn.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. 
Jun 29 05:15:45 samuel-pc systemd[1]: [/etc/systemd/system/gunicorn.service:9] Executable path is not absolute, ignoring: gunicorn --access-logfile - --workers 3 --bind unix:/root/revamp/revamp 
Jun 29 05:15:45 samuel-pc systemd[1]: gunicorn.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. 
Jun 29 07:01:10 samuel-pc systemd[1]: [/etc/systemd/system/gunicorn.service:9] Executable path is not absolute, ignoring: gunicorn --access-logfile - --workers 3 --bind unix:/root/revamp/revamp 
Jun 29 07:01:10 samuel-pc systemd[1]: gunicorn.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. 
Jun 29 07:01:55 samuel-pc systemd[1]: [/etc/systemd/system/gunicorn.service:9] Executable path is not absolute, ignoring: gunicorn --access-logfile - --workers 3 --bind unix:/root/revamp/revamp 
Jun 29 07:01:55 samuel-pc systemd[1]: gunicorn.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. 

qui montre l'erreur commence dans la ligne 9 du service gunicorn en raison de la ExecStart

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

[Service] 
User=root 
Group=www-data 
WorkingDirectory=/root/revamp 
ExecStart=gunicorn --access-logfile - --workers 3 --bind unix:/root/revamp/revamp.sock revamp.wsgi:application 


[Install] 
WantedBy=multi-user.target 

Répondre

1

Son vous dire qu'il ne veut pas un chemin relatif pour l'exécutable gunicorn:
Executable path is not absolute, ignoring.

Vous devez changer le chemin absolu de votre exécutable gunicorn, soit:

  • exécutable du système: ExecStart=/usr/local/bin/gunicorn
  • votre exécutable environnement virtuel: ExecStart=/path/to/venv/bin/gunicorn

Vous pouvez vérifier ce point essentiel : Using Systemd to Make Sure Gunicorn Starts on Boot, pour un fichier de configuration de service système gunicorn minimal.

Espérons que cela aide!

+0

Merci Je crois que cela a résolu ce problème, maintenant je reçois une erreur «arguments en excès» –

+0

pouvez-vous poster le journal? – HassenPy