Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-26-2011, 07:41 PM   #1
Registered: Nov 2005
Posts: 34

Rep: Reputation: 15
Trying to launch a C-server using xinetd

Hello folks,

I have a small stats program that I am using to get some sys stats. I am trying to launch this program on a particular port, using the xinetd system deamon.

Here is what I am doing ...

1. Added an entry here ...

root@aj-laptop:/etc/xinetd.d# cat /etc/services | grep 4040
hello 4040/tcp #my implementation

2. Added an entry here ...

root@aj-laptop:/etc/xinetd.d# cat hello
# default: on
# description: Hello World socket server
service hello
port = 4040
socket_type = stream
wait = no
user = aj
server = /home/aj/Desktop/eclipse/s/sysinfo/src/sysinfo.c
log_on_success += USERID
log_on_failure += USERID
disable = no

3. When I try and connect, I get the following error ...

root@aj-laptop:/etc# telnet localhost 4040
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

Please note that I did restart the xinetd services, after adding my hello module. I also tried using the root user in the user=aj location. Is there anything I am missing here?

My C-program simply writes to the stdout using the printf() function.

Please guide me.



Last edited by jacques83; 06-26-2011 at 08:55 PM.
Old 06-27-2011, 01:17 PM   #2
Registered: Aug 2002
Posts: 14,754

Rep: Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476Reputation: 1476
server = /home/aj/Desktop/eclipse/s/sysinfo/src/sysinfo.c
The c extension assumes source code and not an executable.
Did you compile the program?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
start tftp server, xinetd restart adetheheat Linux - Software 2 09-20-2010 09:07 AM
can't connect to VNC server started by xinetd andymadigan Linux - Networking 4 02-21-2006 04:18 PM
What is the function of the canna server in xinetd.d? jdruin Linux - Software 1 11-19-2003 07:14 PM
Should I run samba server from xinetd or standalone? system Linux - Networking 0 12-19-2001 07:54 AM

All times are GMT -5. The time now is 03:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration