Converting sysV inetd service to systemd

Latest response

Complete newbie here. On a Debian Wheezy system, I have configured a service which accepts UDP connections on port 7500 and passes info to terminal:

/etc/services

scan        7500/udp

/etc/inetd.conf

scan dgram udp wait ops /usr/sbin/tcpd /wvsr/bin/scand

I am trying to convert to RHEL 7.4 systemd init. I have made a "scan.socket" file:

[Unit]
Description=Scan Socket
PartOf=scan@.service

[Socket]
ListenDatagram=137.228.209.75:7500
Accept=true

[Install]
WantedBy=sockets.target

and a scan@service file:

[Unit]
Description=Scan Server
After=scan.socket
Requires=scan.socket

[Service]
Type=simple
ExecStart=-/usr/sbin/tcpd /wvsr/bin/scand
StandardInput=socket

Both files reside in /etc/systemd/system. I run:
systemctl daemon-reload
systemctl enable scan.socket
systemctl start scan.socket

I get errors:
[root@olr1: /etc/systemd/system]# systemctl status -l scan.socket
* scan.socket - Scan Socket
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Listen: 137.228.209.75:7500 (Datagram)
Accepted: 0; Connected: 0

Apr 06 19:23:08 olr1.dtf21 systemd[1]: scan.socket configured for accepting sockets, but sockets are non-accepting. Refusing.

I must be missing something fundamental here. Any thoughts?

Responses