hey all, seems i can’t get the client to talk to the daemon… on client side when trying to write i get:
connection refused or timed out
weeor: coutl not connect to host x.x.x.x on port 5667
i’m suspecting it’s a problem on my nagios server with how i’m setting up and running the daemon. i’m running the daemon with this command:
./nsca -c nsca.cfg
and i get no output of it starting, running, successfully running, etc… i don’ t even know if it ran. i’m not a linux savy person, so that probably doesn’t help.
the README seems to be good, but doesn’t tell you anything about how to test your setup if it’s working and what are all the configuration files and settings necessary…
in your /etc/xinetd.d/nsca file, what do you have for this part:
only_from=???
Is the IP of your remote host in there? If not, then connection refused should be expected. Only ips in there can connect.
i was under the impression that i did not need to worry about inetd or xinetd stuff if i ran it with the --single or --daemon switch. do i need to follow all the inetd and xinetd setup instructions in the README? if so, how do i know which i follow–inetd or xinetd?
depends on which one your linux system uses.
If you have /etc/inetd.conf then you might be using that, but if you have /etc/rc.d/init.d/xinetd then that is the startup script for xinetd and the config file is /etc/xinetd.conf.
yes, you should follow the README file and perform the steps given. That’s why it’s there. So either use inetd or xinetd
mdroz8, you can run nsca manually as you show above ‘nsca -c nsca.cfg’, and you can verify that the daemon is running by doing a ‘ps ax’, perhaps ‘ps ax | grep nsca’.
You should verify that you have nsca.cfg set to listen on port 5667, and (assuming the nsca process is indeed running) you can check to make sure that the system is listening on that port:
netstat -an | grep LISTEN
You should see something similar to (I’m on freebsd, but works on most *nix’s):
tcp4 0 0 1.2.3.4.5667 . LISTEN
Perhaps you have a firewall running that is blocking the connection attempts?