I would suggest adding StandardError=journal, so that you get to see the Python exceptions when they happen.
On Mon, Mar 22, 2021, 04:21 Matt Zagrabelny <[email protected]> wrote: > Greetings, > > I'm running systemd 241-7~deb10u6, Debian 10 (Buster). > > 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. > > Here are my unit files: > > ==> /etc/systemd/system/[email protected] <== > [Unit] > Description=Call Detail Record Adjunct Processor > > [Service] > ExecStart=/opt/src/cdr-adjunct/python/cdr-adjunct.py > StandardInput=socket > User=phone > > ==> /etc/systemd/system/cdr-adjunct.socket <== > [Unit] > Description=Socket for Call Detail Record Adjunct Processor > > [Socket] > ListenStream=9000 > Accept=yes > > [Install] > WantedBy=sockets.target > > While the mechanics work, there are, seemingly, issues in my process. I'm > seeing over 2000 failed units for the service in question. > > $ sudo systemctl --state=failed > UNIT LOAD > ACTIVE SUB DESCRIPTION > ● [email protected]:9000-10.27.0.3:31541.service loaded > failed failed Call Detail Record Adjunct Processor (10.27.0.3:31541) > ● [email protected]:9000-10.27.0.3:32034.service loaded > failed failed Call Detail Record Adjunct Processor (10.27.0.3:32034) > [snip ~2000 lines] > ● [email protected]:9000-10.27.0.3:10955.service loaded > failed failed Call Detail Record Adjunct Processor (10.27.0.3:10955) > > My python3 script processes STDIN as such: > > for line in sys.stdin: > > #do stuff > > I'm a little confused as to where to look to determine why I'm seeing so > many failed units. > > Any help or suggestions are very welcome. > > Thank you! > > -m > _______________________________________________ > systemd-devel mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/systemd-devel >
_______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
