tftp timeout for ubuntu and debian client, but not for centos client

Asif Iqbal vadud3 at gmail.com
Thu Mar 6 22:36:57 UTC 2014


Hi All,

I am running tftpd server with xinetd on ubuntu lts.

(xinetd_2.3.14-7ubuntu4_amd64.deb and tftpd_0.17-18ubuntu2_amd64.deb)

When I try to get a file from ubuntu or debian client it is failing and
timing out. When I try to get
the same file over tftp from a centos client it gets the file right away.

ubuntu/debian tftp client is tftp-hpa 5.2
centos tftp client is 0.49

The ubuntu ftp server's xinted.d/tftp file looks like this

service tftp
{
disable = no
socket_type = dgram
 protocol = udp
wait = yes
 user = root
server = /usr/sbin/in.tftpd
 server_args = -s /var/lib/tftpboot
per_source = 11
 cps = 100 2
flags = IPv4
}

There is no firewall between the servers and all the ubuntu, debian and
centos client
are on same /24 network.


[vagrant at foo ~]$ uname -a
Linux foo 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64
x86_64 x86_64 GNU/Linux
[vagrant at foo ~]$ tftp -V
tftp-hpa 0.49, with readline
[vagrant at foo ~]$ tftp 192.168.0.15 -c get file
[vagrant at foo ~]$

vagrant at debian:~$ uname -a
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
vagrant at debian:~$ tftp -V
tftp-hpa 5.2, without readline
vagrant at debian:~$ tftp 192.168.0.15 -c get file
Transfer timed out.
vagrant at debian:~$

vagrant at foo:~$ uname -a
Linux foo 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux
vagrant at foo:~$ tftp -V
tftp-hpa 5.2, without readline
vagrant at foo:~$ tftp 208.47.0.15 -c get file
Transfer timed out.
vagrant at foo:~$

compiled tftp-hpa 0.49 with readline on debian and timing out
vagrant at debian:~/tftp-hpa-0.49$ tftp -V
tftp-hpa 0.49, with readline
vagrant at debian:~/tftp-hpa-0.49$ cd
vagrant at debian:~$ rm file
vagrant at debian:~$ tftp 192.168.0.15 -c get fileTransfer timed out.
Transfer timed out.

tcpdump on tftpd server shows packets coming in on udp port 69.


The tftp server has xinetd running OK
root     51282     1  0 16:55 ?        00:00:00 /usr/sbin/xinetd -dontfork
-pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6

last few lines from working tftp client (centos)

 sendto(3, "\0\1file\0netascii\0", 16, 0, {sa_family=AF_INET,
sin_port=htons(69), sin_addr=inet_addr("192.168.0.15")}, 16) = 16
 alarm(5) = 0
 recvfrom(3, "\0\3\0\1this is a test\r\n", 516, 0, {sa_family=AF_INET,
sin_port=htons(50220), sin_addr=inet_addr("192.168.0.15")}, [16]) = 20
 alarm(0) = 5
 sendto(3, "\0\4\0\1", 4, 0, {sa_family=AF_INET, sin_port=htons(50220),
sin_addr=inet_addr("192.168.0.15")}, 16) = 4
 write(4, "this is a test\r", 15) = 15
 lseek(4, 14, SEEK_SET) = 14
 write(4, "\n", 1) = 1
 close(4) = 0
 munmap(0x7fd64b797000, 4096) = 0
 exit_group(0) = ?

last few lines from not working tftp client (ubuntu and debian)

sendto(3, "\0\1file\0netascii\0", 16, 0, {sa_family=AF_INET,
sin_port=htons(69), sin_addr=inet_addr("192.168.0.15")}, 16) = 16
alarm(5)                                = 0
recvfrom(3, 0x606b24, 516, 0, 0x7fff3159f820, 0x7fff3159f808) = ?
ERESTARTSYS (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
sendto(3, "\0\1file\0netascii\0", 16, 0, {sa_family=AF_INET,
sin_port=htons(69), sin_addr=inet_addr("192.168.0.15")}, 16) = 16
alarm(5)                                = 0
recvfrom(3, 0x606b24, 516, 0, 0x7fff3159f820, 0x7fff3159f808) = ?
ERESTARTSYS (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f942b3bf000
write(1, "Transfer timed out.\n", 20Transfer timed out.
)   = 20
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(69)                          = ?


xinetd debug output when tftp client is working

14/3/6 at 17:29:56: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:29:56: DEBUG: 37026 {svc_suspend} Suspended service tftp
14/3/6 at 17:29:56: DEBUG: 37026 {server_start} Starting service tftp
14/3/6 at 17:29:56: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:29:56: DEBUG: 37051 {exec_server} duping 6
14/3/6 at 17:29:56: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:29:56: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:29:56: DEBUG: 37026 {check_pipe} Got signal 17 (Child exited)
14/3/6 at 17:29:56: DEBUG: 37026 {child_exit} waitpid returned = 37051
14/3/6 at 17:29:56: DEBUG: 37026 {server_end} tftp server 37051 exited
14/3/6 at 17:29:56: DEBUG: 37026 {drain} UDP socket should be empty
14/3/6 at 17:29:56: DEBUG: 37026 {svc_resume} Resumed service tftp
14/3/6 at 17:29:56: DEBUG: 37026 {child_exit} waitpid returned = -1
14/3/6 at 17:29:56: DEBUG: 37026 {main_loop} active_services = 1


xinetd debug out when tftp client is timing out

14/3/6 at 17:30:22: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:30:22: DEBUG: 37026 {svc_suspend} Suspended service tftp
14/3/6 at 17:30:22: DEBUG: 37026 {server_start} Starting service tftp
14/3/6 at 17:30:22: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:30:22: DEBUG: 37315 {exec_server} duping 6
14/3/6 at 17:30:22: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:30:22: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:30:22: DEBUG: 37026 {check_pipe} Got signal 17 (Child exited)
14/3/6 at 17:30:22: DEBUG: 37026 {child_exit} waitpid returned = 37315
14/3/6 at 17:30:22: DEBUG: 37026 {server_end} tftp server 37315 exited
14/3/6 at 17:30:22: DEBUG: 37026 {drain} UDP socket should be empty
14/3/6 at 17:30:22: DEBUG: 37026 {svc_resume} Resumed service tftp
14/3/6 at 17:30:22: DEBUG: 37026 {child_exit} waitpid returned = -1
14/3/6 at 17:30:22: DEBUG: 37026 {main_loop} active_services = 1
14/3/6 at 17:30:32: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:30:32: DEBUG: 37026 {svc_suspend} Suspended service tftp
14/3/6 at 17:30:32: DEBUG: 37026 {server_start} Starting service tftp
14/3/6 at 17:30:32: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:30:32: DEBUG: 37362 {exec_server} duping 6
14/3/6 at 17:30:32: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:30:32: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:30:32: DEBUG: 37026 {check_pipe} Got signal 17 (Child exited)
14/3/6 at 17:30:32: DEBUG: 37026 {child_exit} waitpid returned = 37362
14/3/6 at 17:30:32: DEBUG: 37026 {server_end} tftp server 37362 exited
14/3/6 at 17:30:32: DEBUG: 37026 {drain} UDP socket should be empty
14/3/6 at 17:30:32: DEBUG: 37026 {svc_resume} Resumed service tftp
14/3/6 at 17:30:32: DEBUG: 37026 {child_exit} waitpid returned = -1
14/3/6 at 17:30:32: DEBUG: 37026 {main_loop} active_services = 1
14/3/6 at 17:30:37: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:30:37: DEBUG: 37026 {svc_suspend} Suspended service tftp
14/3/6 at 17:30:37: DEBUG: 37026 {server_start} Starting service tftp
14/3/6 at 17:30:37: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:30:37: DEBUG: 37385 {exec_server} duping 6
14/3/6 at 17:30:37: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:30:37: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:30:37: DEBUG: 37026 {check_pipe} Got signal 17 (Child exited)
14/3/6 at 17:30:37: DEBUG: 37026 {child_exit} waitpid returned = 37385
14/3/6 at 17:30:37: DEBUG: 37026 {server_end} tftp server 37385 exited
14/3/6 at 17:30:37: DEBUG: 37026 {drain} UDP socket should be empty
14/3/6 at 17:30:37: DEBUG: 37026 {svc_resume} Resumed service tftp
14/3/6 at 17:30:37: DEBUG: 37026 {child_exit} waitpid returned = -1
14/3/6 at 17:30:37: DEBUG: 37026 {main_loop} active_services = 1
14/3/6 at 17:30:42: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:30:42: DEBUG: 37026 {svc_suspend} Suspended service tftp
14/3/6 at 17:30:42: DEBUG: 37026 {server_start} Starting service tftp
14/3/6 at 17:30:42: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:30:42: DEBUG: 37407 {exec_server} duping 6
14/3/6 at 17:30:42: DEBUG: 37026 {main_loop} active_services = 0
14/3/6 at 17:30:42: DEBUG: 37026 {main_loop} select returned 1
14/3/6 at 17:30:42: DEBUG: 37026 {check_pipe} Got signal 17 (Child exited)
14/3/6 at 17:30:42: DEBUG: 37026 {child_exit} waitpid returned = 37407
14/3/6 at 17:30:42: DEBUG: 37026 {server_end} tftp server 37407 exited
14/3/6 at 17:30:42: DEBUG: 37026 {drain} UDP socket should be empty
14/3/6 at 17:30:42: DEBUG: 37026 {svc_resume} Resumed service tftp
14/3/6 at 17:30:42: DEBUG: 37026 {child_exit} waitpid returned = -1
14/3/6 at 17:30:42: DEBUG: 37026 {main_loop} active_services = 1

Any suggestion on how to troubleshoot this?

(In ubuntu, complled all tftp-hpa versions from 0.49 to 5.2 and when run
the above tftp
command it crashes)

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20140306/d58bee74/attachment.html>


More information about the ubuntu-server mailing list