<div dir="auto">I would suggest adding StandardError=journal, so that you get to see the Python exceptions when they happen.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 22, 2021, 04:21 Matt Zagrabelny <<a href="mailto:mzagrabe@d.umn.edu">mzagrabe@d.umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Greetings,</div><div><br></div><div>I'm running systemd 241-7~deb10u6, Debian 10 (Buster).</div><div><br></div><div>I am attempting to have an inetd like service run, where systemd listens on a port (TCP 9000) and passes the data to a python3 script's STDIN.</div><div><br></div><div>Here are my unit files:</div><div><br></div><div>==> /etc/systemd/system/cdr-adjunct@.service <==<br>[Unit]<br>Description=Call Detail Record Adjunct Processor<br><br>[Service]<br>ExecStart=/opt/src/cdr-adjunct/python/cdr-adjunct.py<br>StandardInput=socket<br>User=phone<br><br>==> /etc/systemd/system/cdr-adjunct.socket <==<br>[Unit]<br>Description=Socket for Call Detail Record Adjunct Processor<br><br>[Socket]<br>ListenStream=9000<br>Accept=yes<br><br>[Install]<br>WantedBy=sockets.target</div><div><br></div><div>While the mechanics work, there are, seemingly, issues in my process. I'm seeing over 2000 failed units for the service in question.<br></div><div><br></div><div>$ sudo systemctl --state=failed</div><div>  UNIT                                                          LOAD   ACTIVE SUB    DESCRIPTION                                            <br>● cdr-adjunct@0-131.212.109.135:9000-10.27.0.3:31541.service    loaded failed failed Call Detail Record Adjunct Processor (<a href="http://10.27.0.3:31541" target="_blank" rel="noreferrer">10.27.0.3:31541</a>) <br>● cdr-adjunct@1-131.212.109.135:9000-10.27.0.3:32034.service    loaded failed failed Call Detail Record Adjunct Processor (<a href="http://10.27.0.3:32034" target="_blank" rel="noreferrer">10.27.0.3:32034</a>) <br></div><div>[snip ~2000 lines]</div><div>● cdr-adjunct@999-131.212.109.135:9000-10.27.0.3:10955.service  loaded failed failed Call Detail Record Adjunct Processor (<a href="http://10.27.0.3:10955" target="_blank" rel="noreferrer">10.27.0.3:10955</a>)</div><div><br></div><div>My python3 script processes STDIN as such:</div><div><br></div><div>        for line in sys.stdin:                                                                                                                                  #do stuff</div><div><br></div><div>I'm a little confused as to where to look to determine why I'm seeing so many failed units.</div><div><br></div><div>Any help or suggestions are very welcome.</div><div><br></div><div>Thank you!</div><div><br></div><div>-m<br></div></div>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div>