Tftp file not found

Hello everyone,

I am currently using the latest release of PBX in a Flash. I would post on their forums but no one seems to want to activate my account over there…

Anyways, my office has been using Bria 3 and we just got in a few Polycom 301’s. I have been trying to configure them and I am going crazy trying to get them to work. The part I am stuck on is with tftp.

It seems that the tftp server is up and running but I can’t access it. I can’t access it from my computer or the server. Whenever I do “tftp -v 127.0.0.1 (or 192.168.1.111) -c get test.txt” I get:

Connected to 192.168.1.111 (192.168.1.111), port 69
getting from 192.168.1.111:test.txt to test.txt [netascii]
Error code 1: File not found

The file is there, but “apparently” it isn’t. I have been looking for similar instances of this and I just can’t find anything helpful.

Does anyone know what is wrong?

Thank you for your time,

-Alonzo

Anything in /var/log/messages on the server that would indicate the problem? Perhaps permissions on the file?

This is what I get:

root@pbx:/ $ tail /var/log/messages
Feb 1 17:27:11 pbx xinetd[1469]: START: tftp pid=4721 from=192.168.1.111
Feb 1 17:32:21 pbx ntpd[1477]: synchronized to 204.15.208.61, stratum 2
Feb 1 17:57:11 pbx xinetd[1469]: EXIT: tftp status=0 pid=4721 duration=1800(sec)
Feb 1 18:08:53 pbx ntpd[1477]: synchronized to 174.36.71.205, stratum 2
Feb 1 18:13:11 pbx ntpd[1477]: synchronized to 204.15.208.61, stratum 2
Feb 1 18:38:58 pbx ntpd[1477]: synchronized to 174.36.71.205, stratum 2
Feb 1 18:40:15 pbx kernel: ip_tables: © 2000-2006 Netfilter Core Team
Feb 1 18:40:21 pbx kernel: nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
Feb 1 18:41:53 pbx xinetd[1469]: START: tftp pid=6390 from=192.168.1.204
Feb 1 18:50:39 pbx ntpd[1477]: synchronized to 204.15.208.61, stratum 2

It seems that tftp is talking to my laptop, but I still get the “File can’t be found” I even made the file with 777 permissions. I get the same results when I try it from the server.

Thank you for responding.

[root@pbx log]# grep tftp messages | perl -pe 's/\/00\S+\-/\/MAC_ADDR\-/g' Feb 1 18:18:59 pbx xinetd[2463]: START: tftp pid=2953 from=192.168.1.253 Feb 1 18:19:35 pbx in.tftpd[2968]: RRQ from 192.168.1.253 filename 2345-12450-001.bootrom.ld Feb 1 18:19:35 pbx in.tftpd[2969]: RRQ from 192.168.1.253 filename 0004f2338ea9.cfg Feb 1 18:19:35 pbx in.tftpd[2970]: RRQ from 192.168.1.253 filename 2345-12450-001.sip.ld Feb 1 18:19:35 pbx in.tftpd[2971]: RRQ from 192.168.1.253 filename sip.ld Feb 1 18:19:41 pbx in.tftpd[2972]: WRQ from 192.168.1.253 filename ./logs/MAC_ADDR-boot.log Feb 1 18:20:14 pbx in.tftpd[2990]: RRQ from 192.168.1.253 filename 2345-12450-001.bootrom.ld Feb 1 18:20:14 pbx in.tftpd[2991]: RRQ from 192.168.1.253 filename 0004f2338ea9.cfg Feb 1 18:20:14 pbx in.tftpd[2992]: RRQ from 192.168.1.253 filename 2345-12450-001.sip.ld Feb 1 18:20:14 pbx in.tftpd[2993]: RRQ from 192.168.1.253 filename sip.ld Feb 1 18:20:14 pbx in.tftpd[2994]: RRQ from 192.168.1.253 filename 0004f2338ea9_reg.cfg Feb 1 18:20:14 pbx in.tftpd[2995]: RRQ from 192.168.1.253 filename sip.cfg Feb 1 18:20:14 pbx in.tftpd[2996]: RRQ from 192.168.1.253 filename ./overrides/MAC_ADDR-phone.cfg Feb 1 18:20:14 pbx in.tftpd[2997]: RRQ from 192.168.1.253 filename ./overrides/MAC_ADDR-web.cfg Feb 1 18:20:15 pbx in.tftpd[2990]: tftpd: read(ack): Connection refused Feb 1 18:20:15 pbx in.tftpd[2998]: RRQ from 192.168.1.253 filename ./licenses/MAC_ADDR-license.cfg Feb 1 18:20:15 pbx in.tftpd[2999]: RRQ from 192.168.1.253 filename ./licenses/MAC_ADDR-license.cfg Feb 1 18:20:15 pbx in.tftpd[2993]: tftpd: read(ack): Connection refused Feb 1 18:20:15 pbx in.tftpd[3000]: RRQ from 192.168.1.253 filename ./contacts/MAC_ADDR-directory.xml Feb 1 18:20:19 pbx in.tftpd[3001]: WRQ from 192.168.1.253 filename ./logs/MAC_ADDR-app.log Feb 1 18:20:21 pbx in.tftpd[3002]: RRQ from 192.168.1.253 filename Leaf256x116.jpg Feb 1 18:20:21 pbx in.tftpd[3003]: RRQ from 192.168.1.253 filename Sailboat256x116.jpg Feb 1 18:20:21 pbx in.tftpd[3004]: RRQ from 192.168.1.253 filename Beach256x116.jpg Feb 1 18:20:21 pbx in.tftpd[3005]: RRQ from 192.168.1.253 filename Palm256x116.jpg Feb 1 18:20:21 pbx in.tftpd[3006]: RRQ from 192.168.1.253 filename Jellyfish256x116.jpg Feb 1 18:20:21 pbx in.tftpd[3007]: RRQ from 192.168.1.253 filename Mountain256x116.jpg

This is what I get:

root@pbx:/var/log $ grep tftp messages | perl -pe 's/\/00\S+\-/\/MAC_ADDR\-/g'
Feb  1 14:01:24 pbx xinetd[1478]: START: tftp pid=3501 from=192.168.1.116
Feb  1 15:00:16 pbx xinetd[1478]: readjusting service tftp
Feb  1 15:46:04 pbx xinetd[1478]: EXIT: tftp status=0 pid=3501 duration=6280(sec                )
Feb  1 15:53:42 pbx xinetd[1478]: START: tftp pid=7247 from=192.168.1.204
Feb  1 15:57:55 pbx xinetd[1478]: readjusting service tftp
Feb  1 16:08:30 pbx xinetd[1478]: readjusting service tftp
Feb  1 16:27:17 pbx xinetd[1469]: START: tftp pid=2488 from=192.168.1.204
Feb  1 16:50:19 pbx yum[3848]: Installed: tftp-0.49-7.el6.i686
Feb  1 17:01:30 pbx xinetd[1469]: EXIT: tftp status=0 pid=2488 duration=2053(sec                )
Feb  1 17:27:11 pbx xinetd[1469]: START: tftp pid=4721 from=192.168.1.111
Feb  1 17:57:11 pbx xinetd[1469]: EXIT: tftp status=0 pid=4721 duration=1800(sec                )
Feb  1 18:41:53 pbx xinetd[1469]: START: tftp pid=6390 from=192.168.1.204
Feb  1 19:09:06 pbx xinetd[1469]: readjusting service tftp
Feb  1 19:09:37 pbx xinetd[7098]: START: tftp pid=7103 from=192.168.1.204
Feb  1 19:26:28 pbx xinetd[7098]: EXIT: tftp status=0 pid=7103 duration=1011(sec  

I am up to trying what ever you suggest. I have made no additions to the PIAF distro other than installing the tftp client package to diagnose the problem I am having.

I appreciate your help immensely.

Does /tftpboot exist? IS the file there? What are the permissions of the directory and file.

/tftpboot exists with the following permissions:

drwxrwxrwx 7 root asterisk 4096 Feb 1 19:12 tftpboot

This is what is inside it:

root@pbx:/tftpboot $ ls -la
total 372
drwxrwxrwx   7 root     asterisk   4096 Feb  1 19:12 .
dr-xr-xr-x. 25 root     root       4096 Feb  1 19:11 ..
-rw-rw-rw-   1 asterisk asterisk   2466 Feb  1 14:10 000000000000.cfg
-rw-rw-rw-   1 asterisk asterisk   2119 Feb  1 14:10 0004f205cf2f.cfg
-rw-rw-rw-   1 asterisk asterisk   4403 Feb  1 14:10 0004f205cf2f_reg.cfg
drwxr-xr-x   2 asterisk asterisk   4096 Feb  1 14:08 contacts
drwxr-xr-x   2 asterisk asterisk   4096 Feb  1 14:07 licenses
drwxr-xr-x   2 asterisk asterisk   4096 Feb  1 14:08 logs
drwxr-xr-x   2 asterisk asterisk   4096 Feb  1 14:07 overrides
-rw-rw-rw-   1 asterisk asterisk  12422 Feb  1 14:10 phone1_317.cfg
-rw-rw-rw-   1 asterisk asterisk  10595 Feb  1 14:10 server_317.cfg
-rw-rw-rw-   1 asterisk asterisk 192287 Feb  1 14:10 sip_317.cfg
drw-r--r--   2 asterisk asterisk   4096 Feb  1 14:07 SoundPointIPLocalization
-rw-rw-rw-   1 asterisk asterisk  95926 Feb  1 14:10 SoundPointIPWelcome.wav
-rwxrwxrwx   1 root     root          6 Feb  1 19:10 test.txt

I added the test.txt and I have been trying to download, but it keeps saying it does not exist…

Are there any files in the logs directory.

What does the the following command show?

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 /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4

Also - update server_args line to include -v

    server_args             = -v -s /tftpboot

Not sure how you restart it though to take the new options, I don’t remember exactly. This will show more of what the server is doing while processing the files. That is why my messages log is showing file names, etc.

There are 2 files in the /tftpboot/logs directory:

root@pbx:/tftpboot/logs $ ls
0004f205cf2f-app.log 0004f205cf2f-boot.log
root@pbx:/tftpboot/logs $ cat 0004f205cf2f-app.log
root@pbx:/tftpboot/logs $ cat 0004f205cf2f-boot.log

They are empty, however. Those files reflect the phone I am trying to setup.

As for xinetd.d/tftp:


root@pbx:/tftpboot/logs $ 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
{
        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
}

I made sure to check that disable = no was set…

I added the -v though. Is there anything I should do now?

Here is the problem,

This

server_args = -s /var/lib/tftpboot

should be this

server_args = -s /tftpboot

Well, that did the trick… Do you have any clue why it would be like that? I didn’t change anything to the config file, at least that I know of. I’ve been making as few adjustments to this server as possible because I want it to remain stable, ha ha.

Thank you for that. A BIG thank you to everyone who gave their advice, I REALLY appreciate it.

Edit

The funny thing is that I saw /var/lib/tftpboot referenced in other threads as if that is how it is supposed to be. Like in this one: http://pbxinaflash.com/forum/showpost.php?p=75497&postcount=30

I actually can’t wait to get to work tomorrow and try this now, ha ha.

Your welcome.

I could not tell you why it is set that way on PBX in a flash. Maybe the post was a typo.

I am happy to hear it is working for you.

Glad you got it working! Looks like somewhere along the line things got out of sync on file locations with the distro you were using. Perhaps a OS bug fix changed a file location or it simply was just never tested.

I have learned to expect that with the distros. They make it really easy to get going, but if you end up with a problem either expect to roll up your sleeves or pay for support. Compared to what you would pay for an out of the box phone system it is still a great value and a fun technical challenge :slight_smile: They systems they have created are really very complex!