Discussion:
"service failed because a configured resource limit was exceeded" for service whose ExecStart command works without systemd
(too old to reply)
Doug Snyder
2017-11-28 20:54:05 UTC
Permalink
Raw Message
I am trying to create a systemd service to manage the celery task queue

My service file is :
[Unit]
Description=Celery bf Service
After=network.target

[Service]
Type=forking
User=doug
Group=doug
WorkingDirectory=/home/doug/www/my_project
ExecStart=/home/doug/.virtualenvs/bf-env/bin/celery -A tasks worker
--app=tasks.celery_app:app --logfile=/var/log/celery/bf/%n%I.log
--loglevel=INFO -Ofair --time-limit=300

When I run:
$ systemctl start celery_bf.service
I get:
Job for celery_bf.service failed because a configured resource limit was
exceeded. See "systemctl status celery_bf.service" and "journalctl -xe" for
details.

$ systemctl status celery_bf.service
● celery_bf.service - Celery bf Service
Loaded: loaded (/etc/systemd/system/celery_bf.service; enabled; vendor
preset: disabled)
Active: failed (Result: resources)

Nov 20 13:57:20 stower systemd[1]: celery_bf.service failed.
Nov 20 13:57:20 stower systemd[1]: Starting Celery bf Service...
Nov 20 13:58:33 stower systemd[1]: celery_bf.service failed to run 'start'
task: Operation not supported
Nov 20 13:58:33 stower systemd[1]: Failed to start Celery bf Service.
Nov 20 13:58:33 stower systemd[1]: celery_bf.service failed.
Nov 20 13:58:33 stower systemd[1]: Starting Celery bf Service...
Nov 20 14:06:03 stower systemd[1]: celery_bf.service failed to run 'start'
task: Operation not supported
Nov 20 14:06:03 stower systemd[1]: Failed to start Celery bf Service.
Nov 20 14:06:03 stower systemd[1]: celery_bf.service failed.
Nov 20 14:06:03 stower systemd[1]: Starting Celery bf Service...

$ journalctl -xe
Nov 20 14:05:12 stower polkitd[29785]: Unregistered Authentication Agent
for unix-process:11449:78569047 (system bus name :1.1184, object path
/org/freedesktop
Nov 20 14:06:00 stower polkitd[29785]: Registered Authentication Agent for
unix-process:11476:78574149 (system bus name :1.1187 [/usr/bin/pkttyagent
--notify-f
Nov 20 14:06:03 stower polkitd[29785]: Operator of
unix-process:11476:78574149 successfully authenticated as unix-user:doug to
gain ONE-SHOT authorization for
Nov 20 14:06:03 stower systemd[1]: celery_bf.service failed to run 'start'
task: Operation not supported
Nov 20 14:06:03 stower systemd[1]: Failed to start Celery bf Service.
-- Subject: Unit celery_bf.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit celery_bf.service has failed.
--
-- The result is failed.
Nov 20 14:06:03 stower systemd[1]: celery_bf.service failed.
Nov 20 14:06:03 stower systemd[1]: Starting Celery bf Service...
-- Subject: Unit celery_bf.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit celery_bf.service has begun starting up.

It appears that something is wrong with the ExecStart command,
But when I cut and paste the same command into the command line it works as
expected and celery starts without any issues

Any help Would be appreciated
Thanks,
Doug
Loading...