tftp server failed

Discussion in 'HOWTO-Related Questions' started by hunter123, Jul 1, 2008.

  1. hunter123

    hunter123 New Member

    Problem solved http://wiki.systemimager.org/index.php/HOWTO_Net_Boot_with_SystemImager_3.4.1


    Hi, I'm stuck on this one error for the last 6 hours and I desperately need help. Help please!
    I've found one other thread and there was no solution posted. Here's what everything looks like

    [[root@localhost ~]# cat /etc/xinetd.d/tftp
    # default: off
    # description: The tftp server serves files using the trivial file transfer
    # protocol. The tftp protocol is often used to boot diskless
    # workstations, download configuration files to network-aware printers,
    # and to start the installation process for some operating systems.
    service tftp
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -s /var/lib/tftpboot -r blksize
    disable = no
    }

    [root@localhost ~]# si_mkbootserver
    WARNING: this script may modify the following files:
    --> /etc/services
    --> /etc/inetd.conf
    --> /etc/xinetd.d/tftp
    And can restart inetd, xinetd or tftp servers.
    Do you wish to continue (y/[n])? y
    Ok, continuing...
    /var/lib/tftpboot exists and is a symlink to /usr/share/systemimager/boot.
    Checking for a tftp server... found.
    Checking if tftp server is H. Peter Anvin's tftp server... yup - right on!
    Checking for a running inetd... Not found.
    Checking for a running xinetd... 4371.
    Looking for update-inetd... not found.
    Backing up /etc/xinetd.d/tftp...
    Moving /etc/xinetd.d/tftp to /etc/xinetd.d/tftp.si_mkbootserver.bak26...done.
    Restaring xinetd ...
    Stopping xinetd: [ OK ]
    Starting xinetd: [ OK ]
    done.
    Looking for a tftp client... found.
    Checking for loopback interface... up.
    Does tftp server work... no.
    I couldn't tftp a test file from localhost
    ERROR: tftp server test failed.
    [root@localhost ~]#


    So that's what's going on so far i've heard some things saying that its bugged and you have to hack it a bit. Please i'm lost!
     
    Last edited: Jul 11, 2008
  2. hunter123

    hunter123 New Member

    help

    i was told to start tftp manually and go through and make sure tftp was working but i think that there;s a bug with systemimager. Can someone help me ?
     
  3. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    netstat -tap
    ? Did you start xinetd?
     
  4. hunter123

    hunter123 New Member

    i did start xinetd

    heres the output

    Code:
     [root@localhost ~]# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
    tcp        0      0 *:rsync                     *:*                         LISTEN      5362/rsync          
    tcp        0      0 *:sunrpc                    *:*                         LISTEN      1714/rpcbind        
    tcp        0      0 *:ftp                       *:*                         LISTEN      2069/vsftpd         
    tcp        0      0 *:ssh                       *:*                         LISTEN      2050/sshd           
    tcp        0      0 localhost.localdomain:ipp   *:*                         LISTEN      2140/cupsd          
    tcp        0      0 localhost.localdomain:smtp  *:*                         LISTEN      2089/sendmail: acce 
    tcp        0      0 *:36510                     *:*                         LISTEN      1733/rpc.statd      
    tcp        0      0 10.0.0.63:60002             www.howtoforge.com:http     TIME_WAIT   -                   
    tcp        0      0 10.0.0.63:54781             204.2.241.160:http          ESTABLISHED 7461/firefox        
    tcp        0      0 10.0.0.63:38865             od-in-f164.google.com:http  ESTABLISHED 7461/firefox        
    tcp        0      0 10.0.0.63:37790             208.46.17.24:http           ESTABLISHED 7461/firefox        
    tcp        0      0 10.0.0.63:49392             kubrick.freenode.net:ircd   ESTABLISHED 2866/xchat          
    tcp        0      0 10.0.0.63:48991             204.2.241.146:http          ESTABLISHED 7461/firefox        
    tcp        0      0 10.0.0.63:59760             prodwebmail-mtc04.evip:http ESTABLISHED 7461/firefox        
    tcp        0      0 *:rsync                     *:*                         LISTEN      5362/rsync          
    tcp        0      0 *:ssh                       *:*                         LISTEN      2050/sshd           
    [root@localhost ~]#
    
    
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Can you also post the output of
    Code:
    netstat -uap
    ?
     
  6. hunter123

    hunter123 New Member

    [root@localhost ~]# netstat -uap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    udp 0 0 *:703 *:* 1733/rpc.statd
    udp 0 0 *:bootpc *:* 9085/dhclient
    udp 0 0 *:60136 *:* 1733/rpc.statd
    udp 0 0 *:mdns *:* 2131/avahi-daemon:
    udp 0 0 *:compaq-evm *:* 19100/rpcbind
    udp 0 0 *:sunrpc *:* 19100/rpcbind
    udp 0 0 *:60529 *:* 2131/avahi-daemon:
    udp 0 0 *:ipp *:* 2140/cupsd
    udp 0 0 *:tftp *:* 6327/xinetd
     
  7. falko

    falko Super Moderator Howtoforge Staff

    It's running. What's the output of
    Code:
    iptables -L
    ?
     
  8. hunter123

    hunter123 New Member

    [root@localhost ~]# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
     
  9. hunter123

    hunter123 New Member

    right now im trying to get the tftp server to connect to the localhost. I've done

    chkconfig tftp on ; service xinetd start ; cp /etc/services /var/lib/tftpboot ; cd /tmp ; tftp localhost ; get services

    and it's timing out!

    so anyways i need some help ive disabled the firewall using /etc/init.d/iptables stop and setenforce0 to no avail please help!
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What happens when you stop vsftpd and set protocol = tcp in /etc/xinetd.d/tftp and restart xinetd?
     
  11. hunter123

    hunter123 New Member

    falko, I've just done about everything i can be told to do... Had a linux system admin walk me through it today and after 4 hours still couldn't find the problem. when I do tftp -v localhost -c get test, I get

    [root@localhost ~]# tftp -v localhost -c get test
    Connected to localhost.localdomain (127.0.0.1), port 69
    getting from localhost.localdomain:test to test [netascii]
    Transfer timed out.
    [root@localhost ~]#


    And my system logs say

    Jul 9 07:53:51 localhost xinetd[9350]: FAIL: tftp address from=127.0.0.1
    Jul 9 07:53:51 localhost xinetd[9175]: START: tftp pid=9350 from=127.0.0.1
    Jul 9 07:53:51 localhost xinetd[9175]: EXIT: tftp status=0 pid=9350 duration=0(sec)

    So i've edited just about everything and anything I can do. BTW your message before didnt do anything and the system admin told me to change it back to udp. Here's what my tftp file looks like

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

    Any help?
     
    Last edited: Jul 9, 2008
  12. hunter123

    hunter123 New Member

    So Falko here's an update ive made a little but of progress. The Tftp server finally works but this time when i run si_mkbootserver instead of in the system logs saying that the connection was refused it now says

    Code:
    Jul 10 01:45:41 localhost xinetd[4672]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
    Jul 10 01:45:41 localhost xinetd[4672]: Started working: 1 available service
    Jul 10 01:45:41 localhost in.tftpd[4682]: RRQ from 127.0.0.1 filename test9
    
     
  13. hunter123

    hunter123 New Member

    ok so falko heres probably my last post about this and it includes all the data ull probably need
    Code:
    [root@localhost ~]# /etc/init.d/iptables stop
    [root@localhost ~]# setenforce 0
    setenforce: SELinux is disabled
    [root@localhost ~]# tftp -v localhost -c get test
    Connected to localhost.localdomain (127.0.0.1), port 69
    getting from localhost.localdomain:test to test [netascii]
    ^Z
    [1]+  Stopped                 tftp -v localhost -c get test
    [root@localhost ~]# nano /etc/xinetd.d/tftp
    [root@localhost ~]# tftp -v localhost -c get test
    Connected to localhost.localdomain (127.0.0.1), port 69
    getting from localhost.localdomain:test to test [netascii]
    ^Z
    [2]+  Stopped                 tftp -v localhost -c get test
    [root@localhost ~]# /etc/init.d/xinetd reload
    Reloading configuration:                                   [  OK  ]
    [root@localhost ~]# /etc/init.d/xinetd restart
    Stopping xinetd:                                           [  OK  ]
    Starting xinetd:                                           [  OK  ]
    [root@localhost ~]# tftp -v localhost -c get test
    Connected to localhost.localdomain (127.0.0.1), port 69
    getting from localhost.localdomain:test to test [netascii]
    [root@localhost ~]# si_mkbootserver
    WARNING: this script may modify the following files:
      --> /etc/services
      --> /etc/inetd.conf
      --> /etc/xinetd.d/tftp
    And can restart inetd, xinetd or tftp servers.
    Do you wish to continue (y/[n])? y
    Ok, continuing...
    /var/lib/tftpboot exists and is a symlink to /usr/share/systemimager/boot.
    Checking for a tftp server... found.
    Checking if tftp server is H. Peter Anvin's tftp server... yup - right on!
    Checking for a running inetd... Not found.
    Checking for a running xinetd... 4938.
    Looking for update-inetd... not found.
    Backing up /etc/xinetd.d/tftp...
    Moving /etc/xinetd.d/tftp to /etc/xinetd.d/tftp.si_mkbootserver.bak11...done.
    Restaring xinetd ...
    Stopping xinetd:                                           [  OK  ]
    Starting xinetd:                                           [  OK  ]
    done.
    Looking for a tftp client... found.
    Checking for loopback interface... up.
    Does tftp server work... no.
    I couldn't tftp a test file from localhost
    ERROR: tftp server test failed.
    [root@localhost ~]# tftp -v localhost -c get test9
    Connected to localhost.localdomain (127.0.0.1), port 69
    getting from localhost.localdomain:test9 to test9 [netascii]
    [root@localhost ~]# ls la .
    ls: cannot access la: No such file or directory
    .:
    anaconda-ks.cfg                           perl-XML-Parser-2.34-8.i386.rpm
    Desktop                                   perl-XML-Simple-2.18-3.fc9.noarch.rpm
    Documents                                 Pictures
    Download                                  Public
    expat-2.0.1-2.i386.rpm                    systemimager
    flamethrower-0.1.8-1.noarch.rpm           Templates
    install.log                               test
    install.log.syslog                        test9
    Music                                     tftpboot
    openssl-0.9.8b-12.fc7.i386.rpm            Videos
    openssl-0.9.8b-17.fc8.i386.rpm            work
    openssl-0.9.8b-17.fc8.i386.rpm.1          xchat-2.8.2-0.i686.rpm
    perl-XML-Parser-2.34-1.1.fc3.rf.i386.rpm  xchat-2.8.4-0.i586.rpm
    [root@localhost ~]# 
    
    
     
  14. hunter123

    hunter123 New Member

    for anyone who has this problem... I thought it's been solved however its the same thing again... the problem ive found out is that the script is making the file in tftpboot and tftping it to a local folder. Then its checking to see if the file it created is the same as the one in the local folder and its returning that its not.... maybe i should just remove the check, because i currently already know that the tftp works...
     
    Last edited: Jul 14, 2008

Share This Page