Monday, September 19, 2016

Error installing tftpd-hpa onto Raspian: action "start" failed

What is the issue?

When trying to install the tftpd-hpa package, the installation isn't completed succesfully and the daemon is not running or cannot be started.

root@raspberrypi:/srv/tftp# apt-get install tftpd-hpa
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  ffmpeg openbsd-inetd
Use 'apt-get autoremove' to remove them.
Suggested packages:
  syslinux-common
The following NEW packages will be installed:
  tftpd-hpa
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/46.1 kB of archives.
After this operation, 142 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package tftpd-hpa.
(Reading database ... 85095 files and directories currently installed.)
Unpacking tftpd-hpa (from .../tftpd-hpa_5.2-4_armhf.deb) ...
Processing triggers for man-db ...
Setting up tftpd-hpa (5.2-4) ...

tftpd-hpa directory (/srv/tftp) already exists, doing nothing.
[....] Starting HPA's tftpd: in.tftpdinvoke-rc.d: initscript tftpd-hpa, action "start" failed.
dpkg: error processing tftpd-hpa (--configure):
 subprocess installed post-installation script returned error exit status 71
Errors were encountered while processing:
 tftpd-hpa
E: Sub-process /usr/bin/dpkg returned an error code (1)

How to fix?

Edit the tftpd-hpa config file, which is normally located under /etc/default:
vi /etc/default/tftpd-hpa
Change the IP from 0.0.0.0 to the real IP of you tftpd-hpa server machine.
Add into the option parameter "--ipv4"

Force a re-installation of tftpd-hpa.

root@raspberrypi:/srv/tftp# apt-get install -f tftpd-hpa
Reading package lists... Done
Building dependency tree
Reading state information... Done
tftpd-hpa is already the newest version.
The following packages were automatically installed and are no longer required:
  ffmpeg openbsd-inetd
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up tftpd-hpa (5.2-4) ...
tftpd user (tftp) already exists, doing nothing.
tftpd-hpa directory (/srv/tftp) already exists, doing nothing.
[ ok ] Starting HPA's tftpd: in.tftpd.

Now tftpd-hpa is starting properly and by default listening onto UDP port 69.

No comments:

Post a Comment