Page 3 of 3

Re: NRPE Install Fails on Ubuntu 16.04

Posted: Mon Apr 03, 2017 2:43 pm
by dwhitfield
Please run the followin on ubuntu and provide output.

Code: Select all

iptables -A INPUT -p tcp -m tcp --dport 5666 -m state --state NEW,ESTABLISHED -j ACCEPT
nmap localhost -p 5666
netstat -l | grep 5666
/usr/local/nagios/libexec/check_nrpe -H localhost

Re: NRPE Install Fails on Ubuntu 16.04

Posted: Tue Apr 04, 2017 7:37 am
by cybergene
dwhitfield wrote:Please run the followin on ubuntu and provide output.

Code: Select all

iptables -A INPUT -p tcp -m tcp --dport 5666 -m state --state NEW,ESTABLISHED -j ACCEPT
nmap localhost -p 5666
netstat -l | grep 5666
/usr/local/nagios/libexec/check_nrpe -H localhost

Here are the results:

Code: Select all

root@ip-:~# iptables -A INPUT -p tcp -m tcp --dport 5666 -m state --state NEW,ESTABLISHED -j ACCEPT

root@ip-:~# nmap localhost -p 5666

Starting Nmap 7.01 ( https://nmap.org ) at 2017-04-04 12:33 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000040s latency).
PORT     STATE  SERVICE
5666/tcp closed nrpe

Nmap done: 1 IP address (1 host up) scanned in 0.26 seconds

root@ip-:~# netstat -l | grep 5666

root@ip-:~# /usr/local/nagios/libexec/check_nrpe -H localhost
connect to address 127.0.0.1 port 5666: Connection refused
connect to host localhost port 5666: Connection refused

Re: NRPE Install Fails on Ubuntu 16.04

Posted: Tue Apr 04, 2017 1:06 pm
by mcapra
Can we see the full iptables ruleset? You can PM it if you have security concerns. This should provide it:

iptables -S

You could also try disabling iptables completely, running those commands again, then re-enabling iptables. Though I know nothing about this machine so i'm not sure if that's a completely good idea.

Do you have any additional services running on this Ubuntu machine that could be filtering in-bound tcp/udp traffic?

Re: NRPE Install Fails on Ubuntu 16.04

Posted: Tue Apr 04, 2017 1:21 pm
by cybergene
No, I don't have any services filtering tcp ports. I made sure I have 5666 open for NRPE.


See PM for Iptables

Mod Edit: Output received and shared with techs.

Re: NRPE Install Fails on Ubuntu 16.04

Posted: Tue Apr 04, 2017 4:36 pm
by dwhitfield
I set up an AWS account to test this. Are you using "Ubuntu Server 16.04 LTS (HVM), SSD Volume Type - ami-a58d0dc5" from the marketplace, something else from the marketplace, or something you built from scratch? Thanks!

Re: NRPE Install Fails on Ubuntu 16.04

Posted: Wed Apr 05, 2017 7:20 am
by cybergene
dwhitfield wrote:I set up an AWS account to test this. Are you using "Ubuntu Server 16.04 LTS (HVM), SSD Volume Type - ami-a58d0dc5" from the marketplace, something else from the marketplace, or something you built from scratch? Thanks!
It the "Ubuntu Server 16.04 LTS (HVM), SSD Volume Type - ami-f4cc1de2".

Re: NRPE Install Fails on Ubuntu 16.04

Posted: Wed Apr 05, 2017 4:20 pm
by tgriep
It looks like the NRPE Agent is not running on that system so lets run is manually in daemon mode by running the following.

Code: Select all

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
Then to test it, run this and see if it responds with the version number of the agent.

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H localhost

Re: NRPE Install Fails on Ubuntu 16.04

Posted: Mon Apr 10, 2017 10:19 am
by cybergene
tgriep wrote:It looks like the NRPE Agent is not running on that system so lets run is manually in daemon mode by running the following.

Code: Select all

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
Then to test it, run this and see if it responds with the version number of the agent.

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H localhost
That fixed for Ubuntu 16.04 too.

This thread can be closed. Thanks again!