You are not logged in.

#1 2022-11-07 16:07:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,446
Website

Unable to download a file from local tftp daemon (atftp) [solved]

I setup a simple tftp server on my workstation using atftp.  I placed a test file in /srv/atftp/ and started the service.  I am unable to download the file connecting from the same machine as a test.  Wondering what I am doing wrong.

% ls -lh /srv/atftp 
total 7.8M
-rw-r--r-- 1 atftp atftp 7.8M Nov  5 12:25 initramfs.bin
% atftp --trace --verbose -g -l initramfs.bin 10.9.8.245
Trace mode on.
Verbose mode on.
sent RRQ <file: , mode: octet <>>
received 1. DATA <block: 1, size 0>, update last received block: 0 → 1
sent ACK <block: 1>

That makes a 0-byte file named initramfs.bin

On the server:

% journalctl -f -u atftpd
Nov 07 11:05:47 workbench atftpd[1384]: socket may listen on any address, including broadcast
Nov 07 11:05:47 workbench atftpd[1384]: Serving  to 10.9.8.245:60760
Nov 07 11:05:47 workbench atftpd[1384]: recvmsg: Connection refused
Nov 07 11:05:47 workbench atftpd[1384]: tftpd_file.c: 1178: recvfrom: Connection refused
Nov 07 11:05:47 workbench atftpd[1384]: Server thread exiting
Nov 07 11:06:20 workbench atftpd[1384]: socket may listen on any address, including broadcast
Nov 07 11:06:20 workbench atftpd[1384]: Serving  to 10.9.8.245:39852
Nov 07 11:06:20 workbench atftpd[1384]: recvmsg: Connection refused
Nov 07 11:06:20 workbench atftpd[1384]: tftpd_file.c: 1178: recvfrom: Connection refused
Nov 07 11:06:20 workbench atftpd[1384]: Server thread exiting

EDIT: it works if I invoke it in interactive mode... must be bad syntax with the flags.

% % atftp --verbose 10.9.8.245 
Verbose mode on.
tftp> get initramfs.bin
###  the file is successfully downloaded
tftp> quit

Last edited by graysky (2022-11-13 19:17:20)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2022-11-10 05:00:46

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 6,840

Re: Unable to download a file from local tftp daemon (atftp) [solved]

Maybe a stupid suggestion, but don't you want -r rather than -l?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-11-13 19:17:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,446
Website

Re: Unable to download a file from local tftp daemon (atftp) [solved]

Good call, that was my problem, thanks!


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB