2

我试图将花作为守护进程运行。我的flower.service 文件内容如下:

[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.
4

1 回答 1

0

启动服务时我遇到了同样的超时问题。

这些参数起到了作用(我已经用分叉类型运行了 celery 服务):

Type=simple
Restart=on-failure
于 2017-11-16T23:49:25.553 回答