[systemd-devel] Error message for Accept=true and non-template service file

Thomas H.P. Andersen phomes at gmail.com
Mon Nov 19 14:17:13 PST 2012


I started looking at the remaining SysV to systemd conversions in
fedora. For telnet there was already prepared socket and service files
but also reports that they did not work [1]. It was not specified how
the two files should be named and I suspect that the reported error
could be due to using a non-template service file type with an
Accept=true socket.

If this was the case then it would have helped with a clearer error
message. Currently with a non-template service the socket can be
started just fine, but on first connect we will get this:

# systemctl status telnetd.socket
telnetd.socket - Telnet Server Activation Socket
      Loaded: loaded (/etc/systemd/system/telnetd.socket; disabled)
      Active: failed (Result: resources) since Mon, 2012-11-19
22:54:27 CET; 4s ago
    Accepted: 1; Connected: 0
      CGroup: name=systemd:/system/telnetd.socket

Nov 19 22:54:13 localhost.localdomain systemd[1]: Starting Telnet
Server Activation Socket.
Nov 19 22:54:13 localhost.localdomain systemd[1]: Listening on Telnet
Server Activation Socket.
Nov 19 22:54:27 localhost.localdomain systemd[1]: Unit telnetd.socket
entered failed state

# journalctl -n4
-- Logs begin at Mon, 2012-11-19 21:07:42 CET, end at Mon, 2012-11-19
22:54:27 CET. --
Nov 19 22:54:13 localhost.localdomain systemd[1]: Starting Telnet
Server Activation Socket.
Nov 19 22:54:13 localhost.localdomain systemd[1]: Listening on Telnet
Server Activation Socket.
Nov 19 22:54:27 localhost.localdomain systemd[1]: telnetd.socket
failed to queue socket startup job: Invalid argument
Nov 19 22:54:27 localhost.localdomain systemd[1]: Unit telnetd.socket
entered failed state

It is not very obvious what went wrong. Would it not make sense to
detect the wrong service file type at socket start time? I could try
to write a patch for that. (Any advice or pointers about where to best
implement it would naturally be much appreciated)

[1] telnet bug: https://bugzilla.redhat.com/show_bug.cgi?id=737725


More information about the systemd-devel mailing list