Getting “Connection timed out” on a tftp server though it seems everything is configured correctly, what could be the reason

centos6.5cobblerdhcptftp

I've just installed a cobbler (with tftp/dhcp) server on a CentOS 6.6 machine at work.
I've configured tftp to run under xinetd and the conf file looks like so:

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

When one of the client tftp machines (which are going to be installed using cobbler and kickstart) starts, it successfully receives an IP address from the dhcp server from the correct range as configured in the "range dynamic-bootp" directive of /etc/dhcp/dhcpd.conf but when it continues to the phase of loading the pxelinux.0 image it hangs and then times out with the following message:

tftp://10.13.0.1/pxelinux.0........... Connection timed out (0x4c126035)
Could not load tftp://10.13.0.1/pxelinux.0: Connection timed out (0x4c125035)

Troubleshooting steps I took:

  1. Verified that iptables is stopped.
  2. Verified that the permissions on /var/lib/tftpboot are 755.
  3. Verified that SELINUX is disabled.
  4. I ran tftp localhost and it connected successfully but when I tried to get file.txt I ended with the same "Connection timed out"
    error.

Edit #1:

[root@centolel tftpboot]# netstat -apn|grep -w 69
udp        0      0 0.0.0.0:69    0.0.0.0:*     13097/xinetd

I forgot to mention what's in the logs.. that's from running tftp localhost:

Jun 30 11:44:02 localhost xinetd[13097]: START: tftp pid=24348 from=127.0.0.1
Jun 30 11:44:02 localhost xinetd[13097]: EXIT: tftp status=1 pid=24348 duration=0(sec)
Jun 30 11:44:07 localhost xinetd[13097]: START: tftp pid=24383 from=127.0.0.1
Jun 30 11:44:07 localhost xinetd[13097]: EXIT: tftp status=1 pid=24383 duration=0(sec)

And from a remote tftp machine:

Jun 30 11:45:56 localhost xinetd[13097]: START: tftp pid=25099 from=10.13.0.101
Jun 30 11:45:56 localhost xinetd[13097]: EXIT: tftp status=1 pid=25099 duration=0(sec)
Jun 30 11:46:00 localhost xinetd[13097]: START: tftp pid=25112 from=10.13.0.101
Jun 30 11:46:00 localhost xinetd[13097]: EXIT: tftp status=1 pid=25112 duration=0(sec)

Any ideas what could be the reason for the time-out or how can it be fixed?

Best Answer

The daemon's dying unexpectedly on launch (status=1).

It looks like the arguments to tftpd that you have are inappropriate for your current tftp version. Running the daemon from the shell has brought this into view, you have made the server_args parameter make sense for the current daemon, and all is now well.