[solved] Allowing Connections to a Specific Port
I've come here as a last resort. I've been messing around with this for the last few days now and can't figure out
what is going on, and why it isn't working...
I have NRPE Running on a OpenSuSE 11.4 Virtual Machine on my Laptop for testing. The VM uses a "Bridged" Connection in
order to give it it's own IP Address on the network. I definitely have the nrpe.cfg Config File configured correctly
because I've setup NRPE on a TON of other servers on the network with no problems.
FYI: I'm running NRPE in Daemon mode...
I can see in the syslog that it says, it is LISTENING on port 5666 and that it is allowing from the correct server IP.
But when I try to run "check_nrpe" command from my Nagios Server I get "Connection Refused by Host".
Here's what's in "/var/log/messages":
*I've added some test commands to the config as well. I.e. to be run with "check_nrpe -H <ip_address> -t 10 -c "test_check_command"
Oct 10 12:42:10 Matt-suse-vm nrpe: INFO: SSL/TLS initialized. All network traffic will be encrypted. Oct 10 12:42:10 Matt-suse-vm nrpe: Starting up daemon Oct 10 12:42:10 Matt-suse-vm nrpe: Listening for connections on port 5666 Oct 10 12:42:10 Matt-suse-vm nrpe: Allowing connections from: 192.168.2.223,192.168.5.150 Oct 10 12:50:01 Matt-suse-vm nrpe: Added command[check_firefox]=/usr/local/nagios/libexec/check_process -p "/usr/lib/firefox/firefox-bin" -w 10 -c 20 -t cpu Oct 10 12:50:01 Matt-suse-vm nrpe: Added command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 Oct 10 12:50:01 Matt-suse-vm nrpe: Added command[check_Xorg]=/usr/local/nagios/libexec/check_process -w 5 -c 10 -t cpu Oct 10 12:50:01 Matt-suse-vm nrpe: Added command[check_checkNRPE]=/usr/local/nagios/libexec/check_nrpeDaemon --check Oct 10 12:50:01 Matt-suse-vm nrpe: Added command[check_killNRPE]=/usr/local/nagios/libexec/check_nrpeDaemon --kill-nrpe $ARG1$ Oct 10 12:50:01 Matt-suse-vm nrpe: Added command[check_users]=/usr/local/nagios/libexec/check_users -w 2 -c 5
Where it says "Allowing connections from...", the first one listed is the Nagios Server and the 2nd one
is MY local machine (i.e. not the "guest" VM's IP, but my "host" IP) so I could try testing from my machine as well...
I am able to SSH to the Virtual Machine from ANY computer on the local network so I know the machines
can talk to one another... I've tried adding "nrpe tcp/5666" to "/etc/services" but I don't think that means anything
since it's running as a Daemon and not with xinetd...
Here's the Output from 'netstat':
# netstat -tulpen | grep -i nrpe tcp 0 0 127.0.0.1:5666 0.0.0.0:* LISTEN 1002 87259 22347/nrpe # netstat -at | grep nrpe tcp 0 0 localhost:nrpe *:* LISTEN
I'm not positive but I don't think those netstat outputs are shwoing that it is setup correctly? I.e. in terms of what
'address' they are showing... i.e. I don't think it should be showing "127.0.0.1"???
Also, I've turned the Firewall Completely off and tried again and still nothing...
Lastly, here's the Output from 'check_nrpe': (* 192.168.5.196 is the address of the VM)
NagiosSrv:/usr/local/nagios/libexec # ./check_nrpe -H 192.168.5.196 Connection refused by host
Sorry for the LONG post, but I wanted to give as much detail as possible...
If anyone has ANY suggestions please feel free... I am at a loss here! --> EXACTLY HOW I FEEL haha
Thanks in Advance,
---------- Post updated at 03:08 PM ---------- Previous update was at 01:46 PM ----------
Ughhh...... Found the Problem!!!!
Boy do I feel dumb...
Basically in the nrpe.cfg file for the "server_address=..." directive apparently you can't use the "loopback" interface ip
which I thought was just another way of writing the Localhost's IP Address but I guess it's NOT??
I wanted to use that (i.e. 127.0.0.1), because everytime I boot up my Virtual Machine (almost everytime), I get a new
IP Address. Which is a real pain in the you know what because I would have to edit the Config file just about everytime
Maybe I'll write a little script to check "ifconfig" and change the IP Address in the nrpe.cfg file if it's different from the
one currently in the Config...
|Thread Tools||Search this Thread|
|More UNIX and Linux Forum Topics You Might Find Helpful|
|Thread||Thread Starter||Forum||Replies||Last Post|
|[Solved] How to open 6000 port for XDMCP?||purushottamaher||HP-UX||15||06-07-2012 06:53 AM|
|Server has more TIME_WAIT connections in Apache(port 80)||chandranjoy||UNIX for Dummies Questions & Answers||4||01-08-2011 02:24 AM|
|[Solved] Releasing a Port||kkeng808||AIX||2||05-31-2010 06:21 AM|
|How to check if a Port is accepting connections.||vikings.svnit||Shell Programming and Scripting||5||08-08-2009 12:14 PM|
|How can I find the number of connections from a specific IP address historically?||tkimber||Solaris||3||03-18-2008 11:38 AM|