[systemd-devel] Is this list still active? Where can I get basic help with systemd

Doug Snyder webcoach101 at gmail.com
Wed Dec 6 01:34:48 UTC 2017


Andrei,
yes I did try to their solution and the reason I claimed that it didn't
work is because it doesn't
Of course thats the first thing I tried and it fails because It doesn't
reference the variables in the config file.
I tried to simplify the example posted on celery's site to restrict the
many possible sources of errors
That caused problems above since I had an %I in my service file and I was
told that this was because I wasn't using a template
( with no further explanation or any documentation  I can see on
freedesktop.org )
I assumed maybe the fact that I wasn't using a template was why the
variables being templated from the config file weren't being resolved,
but asked for further clarification ...
but really, how would I know?
The problem seems to be rooted in the fact that I'm not a Linux enthusiast,
I'm a data scientist that needs to run a simple task queue
but none of the instructions I find work.
Its true I've modified the ExecStart command from the example the celery
docs give.
I used the command that's listed in different part of the documentation to
run the task queue.
The command works fine in the command line, so I thought it would work when
run by systemd
I said that clearly in my first post.
As far as I know I'm trying to just get systemd to run a command at start
up in its own process
The only working systemd service I had was one I wrote for couchdb and so I
made the assumption it would work in a similar way
and tried to work off code that was working since systemd is so bad about
letting you know where errors originate
If that's not how things work, I'd like to know about it
That's why I'm here ... to learn how systemd works

While searching for something else I found the answer that I needed:
https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
For forking services you are supposed to define the PIDFile:

   - PIDFile=: If the service type is marked as "forking", this directive
   is used to set the path of the file that should contain the process ID
   number of the main child that should be monitored.

This was what was causing the error even though the error said nothing of
the sort.
I had to get the templating working and define PIDFile using the %n
variable that was used on celery's site
Its all working now.


On Tue, Dec 5, 2017 at 1:50 PM, Lennart Poettering <lennart at poettering.net>
wrote:

> On Di, 05.12.17 13:33, Doug Snyder (webcoach101 at gmail.com) wrote:
>
> > Getting rid of the template syntax changed the behavior but now it
> appears
> > there's another problem I don't understand.
> > it tries to start the unit and it shows some encouraging signs but fails
> > because a timeout was exceeded.
> > Celery starts and shows healthy output but then sends a SIGCHLD and then
> > dies
>
> Uh, I am not sure what celery is, but if celery is started but exits
> on its own then I am not sure I can help you very much.
>
> > I don't know if you know what celery is but its a task queue so it does
> > create child processes
> > I thought the Type=forking line in the service unit would let systemd
> about
> > that.
> > Or maybe its dying for some other reason?
> > It works fine when run without systemd
>
> Does it detach on its own? i.e. double fork? if yes, then type=forking
> is the right choice, otherwise you need a different Type=.
>
> > I don't think I can send you detailed output until we get this issue
> > resolved with the mailing list and why its not excepting emails with
> debug
> > output.
> > Short emails seem to post. Long ones don't. There's no indication of
> whats
> > going on
>
> There are message size limits on this mailing list. Please condense
> your logs to only include relevant bits hence, or use fpaste.org or
> something like that, and drop the URL.
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171205/8c3891cb/attachment.html>


More information about the systemd-devel mailing list