%Error opening tftp://192.168.1.12/running-config (Undefined error)

Unanswered Question
Mar 2nd, 2005

Hi All,

I keep getting this error when attempting to copy running-config to tftp,

Switch#copy run tftp

Address or name of remote host []? 192.168.1.12

Destination filename [running-config]?

.....

%Error opening tftp://192.168.1.12/running-config (Undefined error)

I've confoirmed that tftp is running/connected,

tftp> status

Connected to localhost.localdomain.

Mode: netascii Verbose: off Tracing: off

Rexmt-interval: 5 seconds, Max-timeout: 25 seconds

I'm using Linux/Fedora3 and I've allowed access via port69 for the source in my firewall. I've made the dir, tftpboot, permissions write enabled for others. Anyone know what I may have forgotten..? Cheers.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
mhussein Wed, 03/02/2005 - 22:04

Is the tftp server listening on 192.168.1.12?

Does the tftp server need to permit the router's ip?

Can you copy from tftp to switch (other way around)?

Regards,

Mustafa

coolboarderguy Wed, 03/02/2005 - 22:12

HI All,

Mustafa, how do I dertermine what IP it's listening on, and how do I command it to do so if it's not listening on 192.168.1.12..? Cheers.

coolboarderguy...

kevin.dorrell Thu, 03/03/2005 - 02:14

I find I have to create (touch) the file on the TFTP server and allow write permissions on it. Even though I have set 777 permissions on the TFTP directory, my server will still not allow files to be created by the TFTP ananymous user.

It's a problem I should have addressed a long time ago, but I learned to live with it by creating the file manually each time.

Kevin Dorrell

Luxembourg

coolboarderguy Thu, 03/03/2005 - 23:29

Hi All,

ok, I did the following in Fedora3 in the tftpboot dir,

touch running-config

chmod 777 running-config

in tftp I did the following,

tftp> connect 192.168.2.12 69

tftp> status

Connected to 192.168.2.12.

Mode: netascii Verbose: off Tracing: off

Rexmt-interval: 5 seconds, Max-timeout: 25 seconds

but, still get the following,

Switch#copy run tftp

Address or name of remote host []? 192.168.2.12

Destination filename [running-config]?

.....

%Error opening tftp://192.168.2.12/running-config (Undefined error)

Cheers.

coolboarderguy...

mhussein Fri, 03/04/2005 - 00:03

Is there any tftpd syslog?

cat /var/log/messages | grep tftp

Are all the xinetd/tftp args configured properly (/etc/xinetd.d/tftp)?

coolboarderguy Fri, 03/04/2005 - 00:43

Hi All,

no, no logs for tftp. Nothing in xinetd.d dir either. Couldn't find anything on tftp for Fedora3 via Google. Anyone know a resource/tutorial page for tftp on Fedora3.? Cheers.

coolboarderguy...

alex.walker Fri, 03/04/2005 - 09:20

You could try the following:

* Is your TFTP directory in the right place? The default is /tftpboot - make sure it's got 777 permissions

* You must create (touch) a file with the right filename first, then give it 777 permissions (as mentioned in previous posts). The TFTP daemon won't ever "create" files. It will only overwrite existing files, and then only if there's world write access to the file and directory.

* Are you sure the server is listening on UDP 69? Try a "netstat -a" to see if you're "LISTENING" on the TFTP port

* Are you sure the TFTP package is installed (i.e. you've got an in.tftpd (I think that's the right name)? Even if you're listening on port 69, if the in.tftp doesn't exist or can't be run, you can't connect.

* You could test the TFTP from Windows. Windows XP and 2K has a tftp.exe installed by default. Try putting a file from there

I don't think the TFTP daemon writes to /var/log/messages. If I remember rightly (I don't have a Linux box I can get onto) it writes to /var/log/xferlog or something...

Hope this helps...

coolboarderguy Tue, 03/08/2005 - 00:59

Hi All,

thanx guys. Finally got some time to take another look at this. I found that the dir /var/tftpboot(have a soft link to /tftpboot) was owned by nobody in the nobody group. Changed it to root:root. Now, I'll double check the list above. Cheers.

* Is your TFTP directory in the right place? The default is /tftpboot - make sure it's got 777 permissions---correct

You must create (touch) a file with the right filename first, then give it 777 permissions (as mentioned in previous posts). The TFTP daemon won't ever "create" files. It will only overwrite existing files, and then only if there's world write access to the file and directory.---correct

* Are you sure the server is listening on UDP 69? Try a "netstat -a" to see if you're "LISTENING" on the TFTP port---correct

udp 0 0 *:tftp *:*

* Are you sure the TFTP package is installed (i.e. you've got an in.tftpd (I think that's the right name)? Even if you're listening on port 69, if the in.tftp doesn't exist or can't be run, you can't connect.---installed

* You could test the TFTP from Windows. Windows XP and 2K has a tftp.exe installed by default. Try putting a file from there---yes, has been done numerous times...would rather steer clear, if possible.

I now get this error with the attempt after correcting the ownership of the dir /var/tftpboot,

Switch#copy run tftp

Address or name of remote host []? 192.168.2.12

Destination filename [running-config]?

%Error opening tftp://192.168.2.12/running-config (Socket error)

instead of the original error in above posts.

Cheers, again.

coolboarderguy...

coolboarderguy Thu, 03/10/2005 - 21:54

Hi All,

I'm back to the original error message. I've set the permissions corectly on both the tftpboot dir and the file I'm wishing to write to. I've confirmed that tftp is listening on port 69 on the correct nic(192.168.2.12). I've confirmed that the switch is definitely attempting to contact the tftp deamon. I've successfully pinged from both the PC ande the switch to alleviate a possible network problem. I'm ata loss with this. Anyone..? Cheers.

coolboarerguy...

mhussein Thu, 03/10/2005 - 23:29

Try to connect from a different pc to your tftpd:

telnet 192.168.2.12 69

and see if you get a prompt. If the connection is refused, then check your iptables rules.

Also check for iptable and tftpd error messages in /var/log/messages, or

egrep -ir "( tftp )|(switch ip address goes here)" /var/log/*

if you have to.

Regards,

Mustafa

alex.walker Fri, 03/11/2005 - 01:52

Telnet won't work since TFTP is UDP not TCP based.

Sorry coolboarderguy, don't know what else to suggest...

mhussein Fri, 03/11/2005 - 02:50

Alex, you are right, "vanilla" telnet won't work.

Anyway, I still think it is a firewall problem. For instance, the infamous "error opening tftp://255.255.255.255/net-conf(socket error)" syslog message, indicates that (socket error) means no response. "Similar" to a firewall silently dropping packets. Again, this can be confirmed by attempting to connect from a different pc (linux or XP-Pro).

coolboarderguy Mon, 03/14/2005 - 20:22

Hi All,

guys, I'm using firestarter as my linux firewall. I have allowed access from the switches IP to this machine on port 69. Can't see it being that. Below is what I'm doing when starting tftp, perhaps I'm doing something wrong.?

[root@localhost ~]# tftp connect 192.168.2.12 69

Usage: tftp [-v][-m mode] [host [port]] [-c command]

[root@localhost ~]# tftp [192.168.2.12 [69]]

[192.168.2.12: unknown host

tftp> tftp 192.168.2.12 69

?Invalid command

tftp> tftp connect 192.168.2.12 69

?Invalid command

tftp> status

Not connected.

Mode: netascii Verbose: off Tracing: off

Rexmt-interval: 5 seconds, Max-timeout: 25 seconds

tftp> connect 192.168.2.12 [69]

[69]: bad port number

tftp> connect 192.168.2.12 69

tftp> status

Connected to 192.168.2.12.

Mode: netascii Verbose: off Tracing: off

Rexmt-interval: 5 seconds, Max-timeout: 25 seconds

natstat -nutlp results for tftp:

udp 0 0 0.0.0.0:32782 0.0.0.0:* 6169/tftp

I don't know guys, something not right..? Cheers.

Mark Sargent.

alex.walker Tue, 03/15/2005 - 00:33

Might be worth trying to uninstall/reinstall the TFTP package. You could try testing with you firewall disabled too?

Actions

Login or Register to take actions

This Discussion

Posted March 2, 2005 at 8:28 PM
Stats:
Replies:15 Avg. Rating:
Views:3854 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard

Rank Username Points
1 2,069
2 1,732
3 1,675
4 1,624
5 1,529