Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

xinetd starting a simple service - why doesn't it work?

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
bahadir
Tux's lil' helper
Tux's lil' helper
Posts: 81
Joined: Mon Aug 02, 2004 12:16 am

xinetd starting a simple service - why doesn't it work?

  • Quote

Post by bahadir » Wed May 11, 2005 3:53 pm

Hi,

I'm trying to run the simplest tftp daemon via xinetd and I couldn't get it to work so far. Could you please help.

here's my /etc/xinetd.d/tftp

Code: Select all

service tftp
{
    protocol    = udp
    socket_type = dgram
    wait        = yes
    user        = nobody
    group       = nobody
    server      = /usr/sbin/in.tftpd
    server_args = /tftpboot
    log_type        = SYSLOG authpriv info
    log_on_success  = HOST PID USERID
    log_on_failure  = HOST
    disable     = no
}
and here's my /etc/xinetd.conf

Code: Select all

defaults
{
	only_from       = localhost
	instances       = 60
	log_type        = SYSLOG authpriv info
#    log_type        = FILE /var/log/servicelog
    log_on_success  = HOST PID
	log_on_failure  = HOST
	cps             = 25 30
}

includedir /etc/xinetd.d
Here's /var/log/daemon.log when I start xinetd:

Code: Select all

May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/chargen-tcp [file=/etc/xinetd.conf] [line=18]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/chargen-udp [file=/etc/xinetd.d/chargen-udp] [line=13]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/cups-lpd [file=/etc/xinetd.d/cups-lpd] [line=14]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/cvspserver [file=/etc/xinetd.d/cvspserver] [line=13]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/daytime-tcp [file=/etc/xinetd.d/daytime-tcp] [line=14]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/daytime-udp [file=/etc/xinetd.d/daytime-udp] [line=13]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/echo-tcp [file=/etc/xinetd.d/echo-tcp] [line=14]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/echo-udp [file=/etc/xinetd.d/echo-udp] [line=13]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/swat [file=/etc/xinetd.d/swat] [line=14]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/tftp [file=/etc/xinetd.d/tftp] [line=17]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/time-tcp [file=/etc/xinetd.d/time-tcp] [line=14]
May 11 15:36:16 gentoo xinetd[7578]: Reading included configuration file: /etc/xinetd.d/time-udp [file=/etc/xinetd.d/time-udp] [line=13]
May 11 15:36:16 gentoo xinetd[7578]: removing chargen
May 11 15:36:16 gentoo xinetd[7578]: removing chargen
May 11 15:36:16 gentoo xinetd[7578]: removing printer
May 11 15:36:16 gentoo xinetd[7578]: removing cvspserver
May 11 15:36:16 gentoo xinetd[7578]: removing daytime
May 11 15:36:16 gentoo xinetd[7578]: removing daytime
May 11 15:36:16 gentoo xinetd[7578]: removing echo
May 11 15:36:16 gentoo xinetd[7578]: removing echo
May 11 15:36:16 gentoo xinetd[7578]: removing swat
May 11 15:36:16 gentoo xinetd[7578]: removing time
May 11 15:36:16 gentoo xinetd[7578]: removing time
May 11 15:36:16 gentoo xinetd[7578]: xinetd Version 2.3.13 started with libwrap loadavg options compiled in.
May 11 15:36:16 gentoo xinetd[7578]: Started working: 1 available service
I use netkit-tftp. xinetd starts ok. but when I do

Code: Select all

 
% ps aux 
tftp daemon doesn't show up (i.e. no name like tftp). Is each daemon started as connections are made? Don't they start as xinetd starts? What is the best way to get evidence that a daemon has started? I tried to use these log_on_success and log_on_failure in tftp configuration to see if they made any difference in terms of tftp-specific output in the logfile above. But nothing shows up for tftp. All I can see is this logfile, I tried using server_args=-d for debug/verbose output but it didn't work (it counts as a parse error in config file). How do I get verbose messages?

I also tried the commented out:

Code: Select all

#    log_type        = FILE /var/log/servicelog 
option in xinetd.conf, in that case only a /var/log/servicelog is created but when you cat it there's nothing in it.

I'm really out of ideas. Hope you can help.

Thanks,
Bahadir
Top
MrPyro
Tux's lil' helper
Tux's lil' helper
Posts: 121
Joined: Thu Aug 14, 2003 10:01 am
Location: Sheffield, England

  • Quote

Post by MrPyro » Wed May 11, 2005 4:54 pm

xinetd doesn't start a service until it recieves a connection on the port that service is supposed to run on. So you won't see an ftp service running unless you actually have an ftp client attached at the time.

From the log you've posted, I'd say that the ftp service was detected correctly by xinetd: I can see it closing down every service except the ftp one, then saying that it has one service running.

Have you tried telneting to the FTP port and seeing what error message you get?
Back off man, I'm a computer scientist
Top
bahadir
Tux's lil' helper
Tux's lil' helper
Posts: 81
Joined: Mon Aug 02, 2004 12:16 am

  • Quote

Post by bahadir » Thu May 12, 2005 10:30 am

OK. I got it working. I want to let people know, just in case anyone wants to use a simple tftp and doesn't want to go through the hassle I had. Use tftp-hpa. Very easy to use.

All I did was:

Code: Select all

 
% emerge tftp-hpa
% mkdir /tftpboot
% cp linux-image /tftpboot
% chown -R nobody:nobody /tftpboot
% /sbin/in.tftp -l -p /tftpboot
Thats it. Also to test it, as simple as the previous

Code: Select all

% tftp
% connect hostname
% get /tftpboot/linux-image
I think this is really how things should be.
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Thu May 12, 2005 10:49 am

No, it's not.
You're starting an xinetd service as a standalone, which is overkill for a service that gets called once every blue moon.
Also, you have never shown that xinetd doesn't work - although I can virtually guarantee you that it wouldn't have, because you have:

Code: Select all

only_from       = localhost 
set as the default in xinetd.conf.
Meaning it won't respond to network calls.

Read the xinetd(.conf) manpages to figure out what to do next time.
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Top
kashani
Advocate
Advocate
User avatar
Posts: 2030
Joined: Mon Sep 02, 2002 6:38 am
Location: San Francisco
Contact:
Contact kashani
Website

  • Quote

Post by kashani » Thu May 12, 2005 1:03 pm

adaptr wrote:No, it's not.
You're starting an xinetd service as a standalone, which is overkill for a service that gets called once every blue moon.
Running a 39k standalone binary, atftp in my case, instead of a 143k super daemon makes perfect sense to me. :) I never got xinetd to work properly with tftp so I ended installing atftp and running it standalone when I needed it.

kashani
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Thu May 12, 2005 1:51 pm

Sure - that's absolutely true if it's the only service you run through xinetd.
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Top
Post Reply

6 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic