Documenting Problems That Were Difficult To Find The Answer To

Xinetd not starting your service

I came across a silly problem when trying to create a service for xinetd.

I was implementing NSCA for Nagios (the passive listener) – actually a custom-written Perl NSCA – but that is beside the point – which listened to STDIN and wrote to STDOUT for interfacing with xinetd.

Of course I edited /etc/services and created a service named nsca.

In /etc/xinetd.d I created a file nsca put the following in it:

service nsca
  disable = no
  socket_type = stream
  protocol = tcp
  wait = no
  user = nagios
  server = /home/nagios/
  server_args =

But when I restarted xinetd (/etc/init.d/xinetd restart) my port wasn’t being listened to.

I looked in the logs (of my Ubuntu server): /var/log/daemon.log and found the following lines:

Mar 20 15:21:59 myserver xinetd[12796]: Reading included configuration file: /etc/xinetd.d/nsca [file=/etc/xinetd.d/nsca] [line=26]
Mar 20 15:21:59 myserver xinetd[12796]: attribute server_args expects at least 1 value and none were given. [file=/etc/xinetd.d/nsca] [line=10]

Ah.. it appears that xinetd throws a wobbly when an argument is not provided to a key (in this case server_args did not have a value assigned). How stupid. Removed server_args from the configuration, restarted xinetd, and now working fine.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: