SOLVED – tftpd-hpa won’t start after upgrade

I just ran into an old TFTPD-HPA bug from 2009, that is still not fixed.

What happened:

Upgrading my Raspberry PI and using it as a PXE Boot server resulted in TFTPD-HA not starting with an error message like this:

Jul 23 12:12:32 xxxx in.tftpd[27342]: cannot open IPv6 socket, disable IPv6: Address family not supported by protocol
Jul 23 12:12:32 xxxx in.tftpd[27342]: Cannot set nonblock flag on socket: Bad file descriptor

This problem is also mentioned here in more detail.

Apparently the TFTPD-HPA tries to support IPv6 even that the kernel is not. See bug note.

The only thing you need to do is to start the daemon only in IPv4 mode.

edit your /etc/init.d/tftpd-hpa file.

Change the line (in my case 58) from

start-stop-daemon --start --quiet --oknodo --exec ${DAEMON} -- \
--listen --user ${TFTP_USERNAME} --address ${TFTP_ADDRESS} \


start-stop-daemon --start --quiet --oknodo --exec ${DAEMON} -- \
--listen --ipv4 --user ${TFTP_USERNAME} --address ${TFTP_ADDRESS} \

and finally:

service tftp-hpa restart

This should solve the issue and only provide support for IPv4.

One Response to SOLVED – tftpd-hpa won’t start after upgrade

  1. jan says:

    edit /etc/default/tftpd-hpa and append “–ipv4: to the option line – debian variants i guess

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.