<div dir="ltr"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Andrei, </span><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">yes I did try to their solution and the reason I claimed that it didn't work is because it doesn't</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Of course thats the first thing I tried and it fails because It doesn't reference the variables in the config file.</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">I tried to simplify the example posted on celery's site to restrict the many possible sources of errors</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">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</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">( with no further explanation or any documentation I can see on <a href="http://freedesktop.org/" target="_blank">freedesktop.org</a> )</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">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,</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">but asked for further clarification ...</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">but really, how would I know?</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">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</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">but none of the instructions I find work.</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Its true I've modified the ExecStart command from the example the celery docs give.</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">I used the command that's listed in different part of the documentation to run the task queue.</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">The command works fine in the command line, so I thought it would work when run by systemd</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">I said that clearly in my first post.</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">As far as I know I'm trying to just get systemd to run a command at start up in its own process</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">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</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">and tried to work off code that was working since systemd is so bad about letting you know where errors originate</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">If that's not how things work, I'd like to know about it</span></div><div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">That's why I'm here ... to learn how systemd works</span></div><div><font size="4"><br></font></div><div><font size="4">While searching for something else I found the answer that I needed: </font></div><div><font size="4"><a href="https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files">https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files</a></font></div><div style="font-size:12.8px"><font color="#000000" face="Times New Roman" size="3">For forking services you are supposed to define the PIDFile:</font></div><div><ul style="font-size:16px;box-sizing:border-box;margin:0px auto 1.7rem;padding:0px 0px 0px 2.5rem;width:745px;color:rgb(0,0,0);font-family:proxima-nova,sans-serif"><li style="margin:0px 0px 0.8rem;box-sizing:border-box;padding:0px 0px 0px 4px;list-style:disc outside none"><span style="box-sizing:border-box"><code style="box-sizing:border-box;background-color:rgba(0,0,0,0.05);border-radius:3px;line-height:22px;font-size:15px;padding:3px">PIDFile=</code></span>: 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.</li></ul><div><font color="#000000" face="proxima-nova, sans-serif"><span style="font-size:16px">This was what was causing the error even though the error said nothing of the sort. </span></font></div><div><font color="#000000" face="proxima-nova, sans-serif"><span style="font-size:16px">I had to get the templating working and define PIDFile using the %n variable that was used on celery's site</span></font></div><div><font color="#000000" face="proxima-nova, sans-serif"><span style="font-size:16px">Its all working now.</span></font></div></div><div class="gmail_extra" style="font-size:12.8px"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 5, 2017 at 1:50 PM, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Di, 05.12.17 13:33, Doug Snyder (<a href="mailto:webcoach101@gmail.com">webcoach101@gmail.com</a>) wrote:<br>
<br>
> Getting rid of the template syntax changed the behavior but now it appears<br>
> there's another problem I don't understand.<br>
> it tries to start the unit and it shows some encouraging signs but fails<br>
> because a timeout was exceeded.<br>
> Celery starts and shows healthy output but then sends a SIGCHLD and then<br>
> dies<br>
<br>
</span>Uh, I am not sure what celery is, but if celery is started but exits<br>
on its own then I am not sure I can help you very much.<br>
<span class=""><br>
> I don't know if you know what celery is but its a task queue so it does<br>
> create child processes<br>
> I thought the Type=forking line in the service unit would let systemd about<br>
> that.<br>
> Or maybe its dying for some other reason?<br>
> It works fine when run without systemd<br>
<br>
</span>Does it detach on its own? i.e. double fork? if yes, then type=forking<br>
is the right choice, otherwise you need a different Type=.<br>
<span class=""><br>
> I don't think I can send you detailed output until we get this issue<br>
> resolved with the mailing list and why its not excepting emails with debug<br>
> output.<br>
> Short emails seem to post. Long ones don't. There's no indication of whats<br>
> going on<br>
<br>
</span>There are message size limits on this mailing list. Please condense<br>
your logs to only include relevant bits hence, or use <a href="http://fpaste.org" rel="noreferrer" target="_blank">fpaste.org</a> or<br>
something like that, and drop the URL.<br>
<div class="HOEnZb"><div class="h5"><br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Red Hat<br>
</div></div></blockquote></div><br></div>