Why does tftp-server install a systemd service

General support questions
Post Reply
Posts: 96
Joined: 2013/01/31 00:29:05

Why does tftp-server install a systemd service

Post by afalanga » 2018/01/02 19:11:01

I'm struggling to understand why the package tftp-server installs a systemd service, tftp.service and tftp.socket, when it's managed through xinetd which is also a service. My understanding is that xinetd listens on the well-known service sockets and then, when something happens on the tftp socket, it starts tftpd. So, why the need for a separate service? Does xinetd start things things through systemd? Is that why? Or is it just in case I'd rather have tftp running all the time and not depend upon a "middle-man?"

My reason for this question
$ rpm -ql tftp-server

Posts: 1
Joined: 2014/11/05 17:57:44

Why does tftp-server install a systemd service

Post by hupcey » 2019/09/14 00:02:07

Did you ever figure this out or get an answer anywhere? It constantly baffles our folks who think the TFTP server is DEAD, because the status always says:

>systemctl status tftp
* tftp.service - Tftp Server
Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
Active: inactive (dead) since Wed 2019-09-04 14:19:38 PDT; 1 weeks 2 days ago
Docs: man:in.tftpd
Main PID: 374498 (code=exited, status=0/SUCCESS)

Sep 04 14:04:38 pe-ld3 systemd[1]: Started Tftp Server.
Sep 04 14:04:38 pe-ld3 systemd[1]: Starting Tftp Server...

But of course when you request a TFTP transfer then xinetd starts the tftpd server OK:
root 268819 336559 0 16:19 ? 00:00:00 in.tftpd --verbose -s /var/lib/tftpboot

There is also a tftp.socket which is active:
>systemctl status tftp.socket
* tftp.socket - Tftp Server Activation Socket
Loaded: loaded (/usr/lib/systemd/system/tftp.socket; enabled; vendor preset: disabled)
Active: active (listening) since Fri 2019-07-26 16:36:28 PDT; 1 months 18 days ago
Listen: (Datagram)

Jul 26 16:36:28 pe-ld3 systemd[1]: Listening on Tftp Server Activation Socket.
Jul 26 16:36:28 pe-ld3 systemd[1]: Starting Tftp Server Activation Socket.

But when the remote system hangs in PXE boot people always blame TFTP because they say that issuing a "systemctl start tftp" then makes the PXE boot work!


User avatar
Forum Moderator
Posts: 29171
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Why does tftp-server install a systemd service

Post by TrevorH » 2019/09/14 00:40:52

I'm pretty sure you shouldn't be using xinetd for tftp if you have also enabled the tftpd.socket in systemd. They do the same thing (only differently).
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - General Support”