Python 如何在RHEL中启动芹菜花作为守护进程?
我试着让flower作为守护进程运行。我的flower.service文件如下所示:Python 如何在RHEL中启动芹菜花作为守护进程?,python,celery,systemd,flower,systemctl,Python,Celery,Systemd,Flower,Systemctl,我试着让flower作为守护进程运行。我的flower.service文件如下所示: [Unit] Description=Flower Service After=network.target [Service] Type=forking User=maas Group=maas PermissionsStartOnly=true ExecStart=/bin/flower --broker=amqp://oser000300//
[Unit]
Description=Flower Service
After=network.target
[Service]
Type=forking
User=maas
Group=maas
PermissionsStartOnly=true
ExecStart=/bin/flower --broker=amqp://oser000300//
[Install]
WantedBy=multi-user.target
但当我启动服务时,它给出了错误
//systemctl status flower.service
* flower.service - Flower Service
Loaded: loaded (/etc/systemd/system/flower.service; enabled; vendor preset: disabled)
Active: failed (Result: timeout) since Mon 2017-07-10 20:25:59 UTC; 4min 38s ago
Process: 49255 ExecStart=/bin/flower --broker=amqp://oser000300// (code=exited, status=0/SUCCESS)
Connected to amqp://guest:**@oser000300:5672//
flower.service start operation timed out. Terminating.
SIGTERM detected, shutting down
Failed to start Flower Service.
Unit flower.service entered failed state.
flower.service failed.
我在启动服务时遇到了同样的超时问题 这些参数实现了这一点(我已经用forking类型运行了芹菜服务):
flower是芹菜的监控工具(使用redis),你在运行芹菜吗?是的,芹菜正在运行,我可以正常运行flower,但不能作为服务启动。@jww我认为这是一个编程问题,我这里的问题是关于用shell脚本或任何其他形式编写服务文件的。
journalctl-b-u flower.service
是否提供了其他详细信息?
Type=simple
Restart=on-failure