Xinetd not starting your service
March 20, 2012
Posted by on
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
/etc/xinetd.d I created a file
nsca put the following in it:
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nagios
server = /home/nagios/nsca.pl
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: Reading included configuration file: /etc/xinetd.d/nsca [file=/etc/xinetd.d/nsca] [line=26]
Mar 20 15:21:59 myserver xinetd: 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.