I have have installed xinetd, and I wrote a script:

echo "Some text"
touch /home/somefile

I made a service configuration under /etc/xinetd.d/ and basically it works when I connect to localhost under the configured port, because: The file somefile gets generated by the touch command on connection to the service. I connect with telnet:

telnet localhost someport

What I don't understand is that telnet does not output the string "Some text". What can I do to make this work?

Heres the xinetd service configuration file in /etc/xinetd.d/:

# This is the configuration for the tcp/stream echo service.

service my_service_name #not in /etc/services
# This is for quick on or off of the service
        disable         = no

# The next attributes are mandatory for all services
        id              = my_custom_id
        type            = UNLISTED
        wait            = yes
        socket_type     = stream
        protocol        = tcp

# External services must fill out the following
        user            = root
#       group           =
        server          = /usr/bin/program_name_here
#       server_args     =

# External services not listed in /etc/services must fill out the next one
        port            = 60001
  • Can you include your xinetd service configuration? Your script works fine for me.
    – Steven D
    Commented Sep 23, 2014 at 8:34
  • Thanks for your reply. I added the configuration file content. Commented Sep 24, 2014 at 19:34

1 Answer 1


Changing wait to no will likely solve your problem. From the man page:

If its value is yes, the service is single-threaded; this means that xinetd will start the server and then it will stop handling requests for the service until the server dies and that the server software will accept the connection.

The key bit there is that when wait is set to yes, the server software is expected to accept the connection, which your script does not do.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .