tftpd allows connections, but times out transferring a file
I'm runnung Ubuntu 12.04 in a VirtualBox VM. I've installed the tftpd-hpa
package. I'm using this to boot an embedded Linux system, and I've noticed that on first boot of my VM, it wouldn't work, but restarting the tftpd-hpa
service made it work every time, until next boot.
Today, I ran a shell script from Texas Instruments that may have mucked with my tftpd configuration, and now I cannot get it to work at all. I'm able to connect, but transfers timeout, even to localhost (I also tried 127.0.0.1):
steve@steve-VirtualBox:~$ tftp
tftp> connect localhost
tftp> status
Connected to localhost.
Mode: netascii Verbose: off Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> get zImage
Transfer timed out.
tftp>
Note that /var/lib/tftpboot/zImage
does exist, however I get the exact same behavior for a file that doesn't exist.
Here are the contents of /etc/default/tftpd-hpa
:
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
Here is /etc/xinetd.d/tftp
:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /var/lib/tftpboot
disable = no
}
Seems you're starting tftpd-hpa from xinetd and as a standalone service at the same time. Please choose one and disable the other.
E.g. set disable = yes
in /etc/xinetd.d/tftp
and restart xinetd.
Then restart the standalone service service tftpd-hpa restart
and try the connection again.
Setting TFTP_ADDRESS="0.0.0.0:69" didn't work for me, at least for both interfaces.
Setting TFTP_ADDRESS=":69"
did the job