Completely stuck getting TFTP to work

  • After banging my head against the wall for two days, I was hoping maybe someone might have a clue for me.


    I am trying to set up a TFTP-server, however whatever I do I get the following behaviour:

    TFTP server starts and is connectable.

    Any file PUT or GET returns:

    Code
    Error code 1: File not found

    Here is some diagnostic data:

    Code
    sudo cat /etc/default/tftpd-hpa:
    
    # This file is auto-generated by openmediavault (https://www.openmediavault.org)
    # WARNING: Do not edit this file, your changes will get lost.
    TFTP_USERNAME="tftp"
    TFTP_DIRECTORY="/srv/mergerfs/storage/media/tftp/"
    TFTP_ADDRESS="0.0.0.0:69"
    TFTP_OPTIONS="--secure --blocksize 512 --retransmit 1000000 --create -vvv"
    Code
    ls -lAh /srv/mergerfs/storage/media/tftp/:
    
    total 0
    -rwxrwxrwx+ 1 preben users 0 Jul 18 12:48 test.txt
    Code
    Output from journalctl -u tftpd-hpa.service:
    
    Jul 18 13:12:17 krokodille in.tftpd[77174]: RRQ from 10.0.0.10 filename test.txt
    Jul 18 13:12:17 krokodille in.tftpd[77174]: sending NAK (1, File not found) to 10.0.0.10
    
    Jul 18 13:15:16 krokodille in.tftpd[83642]: WRQ from 10.0.0.10 filename newtest.txt
    Jul 18 13:15:16 krokodille in.tftpd[83642]: sending NAK (1, File not found) to 10.0.0.10

    The file clearly exists in the configured folder, the server is connectable, and the share permissions seem to be OK. Nevertheless, I cannot find the file, and I cannot put files.


    Does anyone have any ideas?



    Best regards,

    Preben

  • Thanks for trying though:) I've tested some more using dockerized TFTP-servers, but the same error persists. I suspect the server itself is working well enough, but there's something else mucking it up. I did figure out that TFTP seems to use ephemeral ports for the data transfer, so maybe there's something there, however weirdly it doesn't even work using 127.0.0.1.

  • Finally, success! Ok, so it seems my problem was that my TFTP share was on MergerFS, this does not seem to work. I figured maybe I'd done something wrong with ACL, but after setting every file to 777, and giving ACL access to both the tftp user/group and nobody user/group, it still would not work from MergerFS. Moving the ftfp root to my system drive finally lets me use TFTP:)

  • Off hand not sure why that would be. If you have time could you strace tftp server when using wit with mergerfs? Or show details of your setup (tftp server in particular) and a simple way to test if possible and I can look into it.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!