大网数据广告活动
服务器运维问答

tftpd allows connections, but times out transferring a file

· 52CE 我爱测

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 serv…

问题原文

原帖链接 · Steve · CC BY-SA 3.0

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
}

已采纳解答

原帖链接 · Beli · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-05-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。