Koozali.org: home of the SME Server

TFTP server help

Offline JoshuaR

  • ****
  • 125
  • +0/-0
    • Tech-Eze
TFTP server help
« on: November 30, 2009, 12:33:03 PM »
Hi,
I was wondering if I could get some assistance with setting up a tftp server on SME 7. I've tried installing both the tftp and atftp contribs (not at the same time :P ), but I've been unable to get it working. (backing up cisco config to the tftp dir)
If I run "netstat -l -u | grep tftp" I get nothing returned.
If I run " ps -aux" I get "root      2663  0.0  0.0    20   20 ?        Ss   Nov29   0:09 runsv tftpd"
I also changed the permissions on the tftpboot dir to 777
In /etc/xinetd.d I have two files, "tftp" and "tftp.rpmsave"
The content of both is :
----------------
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
}
-----------------

I'm not sure what I can do to troubleshoot it, does anyone have any ideas?

Much appreciated,
Josh
« Last Edit: November 30, 2009, 12:37:47 PM by JoshuaR »
Life's tragedy is that we get old too soon, and wise too late...

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: TFTP server help
« Reply #1 on: November 30, 2009, 03:47:15 PM »
Did you follow this Howto http://wiki.contribs.org/Tftp_server ?

I have a TFTP server running just following it.
Right now I´m without external access to my server ... so I cannot copy info to you... but I can post any info you need... if we start from begining following same install instructions!

...

Offline JoshuaR

  • ****
  • 125
  • +0/-0
    • Tech-Eze
Re: TFTP server help
« Reply #2 on: November 30, 2009, 11:45:43 PM »
I believe I followed them exactly, but I'll uninstall the contrib and start again...
I'm not using it for PXE, so I tried it without the Thin Client contrib at first, then installed it as well just in case...
1. I ran "yum --enablerepo=smecontribs --enablerepo=base install smeserver-tftp-server"
2. I ran signal-event post-upgrade and signal-event reboot
3. I ran config setprop tftpd status enabled to make sure the tftp service was enabled
4. I ran /etc/init.d/supervise/tftpd restart for good measure, and it says restarting tftp [ok]
5. I changed the following properties:
config setprop tftpd access public
config setprop tftpd privelege rw

But I cannot get tftp read or write access

--Josh
Life's tragedy is that we get old too soon, and wise too late...

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: TFTP server help
« Reply #3 on: November 30, 2009, 11:55:27 PM »
What your answer to:
Code: [Select]
service tftpd status
I got:
Code: [Select]
[root@lobo ~]# service tftpd status
run: /service/tftpd: (pid 10248) 125693s; run: log: (pid 2881) 126497s
[root@lobo ~]#

maybe you just need:
Code: [Select]
service tftpd start
I'm not sure you can see it at netstat... try:
Code: [Select]
ps gaux |grep tftto see something like:
Code: [Select]
[root@lobo ~]# ps gaux |grep tft
root      2860  0.0  0.0    20   20 ?        Ss   Nov29   0:00 runsv tftpd
[root@lobo ~]#

Hope this helps... if not... I'm here in Brazil ... so my time is GMT-0200 (summer time... used to be GMT-0300)

Jáder

...

Offline JoshuaR

  • ****
  • 125
  • +0/-0
    • Tech-Eze
Re: TFTP server help
« Reply #4 on: December 01, 2009, 12:06:12 AM »
When I ran "service tftp status" I got
down: /service/tftpd: 1s, normally up, want up; down: log: 50023s, normally up
so I ran "service tftpd start"
Then ran "service tftpd status" and got
run: /service/tftpd: (pid 13158) 1s; down: log: 1s, normally up, want up
I appreciate the help, I'm in Australia, GMT +10
Life's tragedy is that we get old too soon, and wise too late...

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: TFTP server help
« Reply #5 on: December 01, 2009, 03:47:41 PM »
Please verify (and if necessary post here) your logs... there are a reason why your TFTP is not up!
Please, after you/we solve your problem:
1) change subject line to [Solved]
2) explain here what you did... so next one can have a clue about this.

Thanks

Jáder
...

Offline JoshuaR

  • ****
  • 125
  • +0/-0
    • Tech-Eze
Re: TFTP server help
« Reply #6 on: December 02, 2009, 10:37:51 AM »
from /etc/xinetd.d/tftp I changed
server_args = -s /tftpboot
to
server_args = -c -s /tftpboot

The services starts

ok, looking through the logs says:
2009-12-02 18:56:50.058478500 udpsvd: fatal: unable to look up local hostname: network unreachable
2009-12-02 19:02:37.133861500 udpsvd: info: listening on 0.0.0.0:69, uid 0, gid 0, starting.
2009-12-02 19:15:53.559294500 udpsvd: info: pid 10797 from 192.168.1.2
2009-12-02 19:15:53.559748500 udpsvd: info: start 10797 :0.0.0.0 :cisco.smedomain.dyndns.org:192.168.1.2:56750
2009-12-02 19:15:53.565470500 udpsvd: info: end 10797

« Last Edit: December 02, 2009, 10:46:32 AM by JoshuaR »
Life's tragedy is that we get old too soon, and wise too late...

Offline JoshuaR

  • ****
  • 125
  • +0/-0
    • Tech-Eze
Re: TFTP server help
« Reply #7 on: December 03, 2009, 02:06:08 PM »
The service is now running, but along with the other errors I'm now getting
2009-12-03 22:56:34.627383500 udpsvd: drop: unable to read from socket: temporary failure
2009-12-03 22:56:34.627391500 udpsvd: info: end 16327
and I'm still unable to use tftp

any ideas?

Thanks again,
Josh
Life's tragedy is that we get old too soon, and wise too late...

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: TFTP server help
« Reply #8 on: December 04, 2009, 02:12:32 PM »
So far I know you shouldn´t have to change a option (add -c) to get it working.
I think you should step back and fix it using logs.

Jáder
...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: TFTP server help
« Reply #9 on: December 04, 2009, 07:52:55 PM »
When I ran "service tftp status" I got
down: /service/tftpd: 1s, normally up, want up; down: log: 50023s, normally up
so I ran "service tftpd start"
Then ran "service tftpd status" and got
run: /service/tftpd: (pid 13158) 1s; down: log: 1s, normally up, want up

To diagnose such problems, do:

cd /service/tftpd
sv d .
./run
# read error messages here
^C
sv u .


Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: TFTP server help
« Reply #10 on: December 04, 2009, 07:55:26 PM »
from /etc/xinetd.d/tftp I changed
server_args = -s /tftpboot
to
server_args = -c -s /tftpboot

The services starts

ok, looking through the logs says:
2009-12-02 18:56:50.058478500 udpsvd: fatal: unable to look up local hostname: network unreachable
2009-12-02 19:02:37.133861500 udpsvd: info: listening on 0.0.0.0:69, uid 0, gid 0, starting.
2009-12-02 19:15:53.559294500 udpsvd: info: pid 10797 from 192.168.1.2
2009-12-02 19:15:53.559748500 udpsvd: info: start 10797 :0.0.0.0 :cisco.smedomain.dyndns.org:192.168.1.2:56750
2009-12-02 19:15:53.565470500 udpsvd: info: end 10797

You are running a supervised instance of udpsvd as well as trying to start tftpd via xinetd. You need to do one or the other, not both.

I suggest that you remove xinetd and the xinetd configuration.

Offline JoshuaR

  • ****
  • 125
  • +0/-0
    • Tech-Eze
Re: TFTP server help
« Reply #11 on: December 05, 2009, 02:07:05 AM »
When I run those commands I get:
udpsvd: info: listening on 0.0.0.0:69, uid 99, gid 99, starting.
after I hit ^C
[1]+  Stopped                 ./run

-------
You are running a supervised instance of udpsvd as well as trying to start tftpd via xinetd. You need to do one or the other, not both.

I suggest that you remove xinetd and the xinetd configuration.
-------
I don't know how to change that sorry?
Life's tragedy is that we get old too soon, and wise too late...