为什么在运行systemd时始终退出进程

时间:2017-03-07 05:18:48

标签: linux celery systemd

运行systemd时为什么我的服务总是退出? 如果将dir manualy改为var / www / enterprise / src /并执行/ var / www / env / bin / celery -A catalog.tasks beat,proccess work perfect

  root@debian-django-nginx:/var/www/enterprise/src# cat /etc/systemd/system/celerybeat.service 
[Unit]
Description=celery beat

[Service]
WorkingDirectory=/var/www/enterprise/src/
Type=simple
ExecStart=/var/www/env/bin/celery -A catalog.tasks beat &
KillMode=process
TimeoutSec=300

[Install]
WantedBy=multi-user.target 
root@debian-django-nginx:/var/www/enterprise/src# systemctl daemon-reload 
root@debian-django-nginx:/var/www/enterprise/src# systemctl start celerybeat
root@debian-django-nginx:/var/www/enterprise/src# systemctl status celerybeat
● celerybeat.service - celery beat
   Loaded: loaded (/etc/systemd/system/celerybeat.service; enabled)
   Active: active (exited) since Tue 2017-02-28 15:01:52 +10; 1 weeks 0 days ago

Mar 07 14:11:55 debian-django-nginx systemd[1]: celerybeat.service lacks ExecStart setting. Refusing.
Mar 07 14:28:08 debian-django-nginx systemd[1]: Started celery beat.
Mar 07 14:39:34 debian-django-nginx systemd[1]: Started celery beat.
Mar 07 15:05:56 debian-django-nginx systemd[1]: Started celery beat.
Mar 07 15:08:46 debian-django-nginx systemd[1]: Started celery beat.
Mar 07 15:19:35 debian-django-nginx systemd[1]: Started celery beat.
Mar 07 15:33:38 debian-django-nginx systemd[1]: Started celery beat.

0 个答案:

没有答案