Page 2 of 3
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Tue Mar 28, 2017 2:32 pm
by avandemore
Like
@mcapra, this also works for me. I have attached a script file generated during the install. Here is a stripped out set of commands used:
Code: Select all
# cd /tmp
# wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.4.tar.gz
# apt-get install build-essential libssl-dev
# tar xzf nagios-plugins-2.1.4.tar.gz
# cd nagios-plugins-2.1.4
# ./configure
# make
# make install
# cd ..
# wget https://superb-sea2.dl.sourceforge.net/project/nagios/nrpe-3.x/nrpe-3.0.1.tar.gz
# tar xzf nrpe-3.0.1.tar.gz
# cd nrpe-3.0.1
# ./configure
# make all
# make install-groups-users
# make install
# make install-config
# make install-init
# service nrpe start
# service nrpe status
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Wed Mar 29, 2017 8:32 am
by cybergene
avandemore wrote:Like
@mcapra, this also works for me. I have attached a script file generated during the install. Here is a stripped out set of commands used:
Code: Select all
# cd /tmp
# wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.4.tar.gz
# apt-get install build-essential libssl-dev
# tar xzf nagios-plugins-2.1.4.tar.gz
# cd nagios-plugins-2.1.4
# ./configure
# make
# make install
# cd ..
# wget https://superb-sea2.dl.sourceforge.net/project/nagios/nrpe-3.x/nrpe-3.0.1.tar.gz
# tar xzf nrpe-3.0.1.tar.gz
# cd nrpe-3.0.1
# ./configure
# make all
# make install-groups-users
# make install
# make install-config
# make install-init
# service nrpe start
# service nrpe status
I tried the same steps and the result is the same:
Code: Select all
ubuntu@ip-xx-xx-xx-xx:~/nrpe-downloads/nrpe-3.0.1$ sudo make install-init
No init file to install
Makefile:93: recipe for target 'install-init' failed
make: *** [install-init] Error 1
ubuntu@ip-xxx-xx-xx-xx:~/nrpe-downloads/nrpe-3.0.1$ service nrpe start
nrpe: unrecognized service
ubuntu@ip-xxx-xx-xx-xx:~/nrpe-downloads/nrpe-3.0.1$
Is there a workaround for this?
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Wed Mar 29, 2017 3:54 pm
by avandemore
Can you generate a full script file as I did showing your commands?
You can start a script by running:
You can exit the script file by:
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Thu Mar 30, 2017 7:56 am
by cybergene
I attached the nrpe 3.0.1 install file.
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Thu Mar 30, 2017 4:50 pm
by avandemore
So there where a few things different in your method.
* Your script file is not very readable. This can happen when you enter into other mode changing applications like vi. There is enough interpolation and other issues that I'm not confident in what I'm reading.
* Your use of sudo. Please be root for this exercise.
* Your installation of additional packages.
* Your command line specs passed to configure may be causing issues.
Please remove these differences or use the commands I posted above exactly to do the install on a clean Ubuntu 16.04.
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Fri Mar 31, 2017 8:22 am
by cybergene
avandemore wrote:So there where a few things different in your method.
* Your script file is not very readable. This can happen when you enter into other mode changing applications like vi. There is enough interpolation and other issues that I'm not confident in what I'm reading.
* Your use of sudo. Please be root for this exercise.
* Your installation of additional packages.
* Your command line specs passed to configure may be causing issues.
Please remove these differences or use the commands I posted above exactly to do the install on a clean Ubuntu 16.04.
I ran your step as root and still got the same errors:
Code: Select all
root@ip-172-31-36-73:/tmp/nrpe-3.0.1# make install-init
No init file to install
Makefile:93: recipe for target 'install-init' failed
make: *** [install-init] Error 1
root@ip-172-31-36-73:/tmp/nrpe-3.0.1# service nrpe start
nrpe: unrecognized service
root@ip-172-31-36-73:/tmp/nrpe-3.0.1# service nrpe status
nrpe: unrecognized service
The nrpe install file is the same as before with all those characters.
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Fri Mar 31, 2017 8:59 am
by tgriep
I thing the error is when the configure script was ran on your system, it could not detect the init and the inetd type on your server.
Try running the configure like the example below and then run the make all and make install-init and see if that works for you.
Code: Select all
./configure --enable-command-args --with-ssl-lib=/usr/lib/x86_64-linux-gnu/ --with-init-type=systemd --with-inetd-type=systemd
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Fri Mar 31, 2017 1:02 pm
by cybergene
tgriep wrote:I thing the error is when the configure script was ran on your system, it could not detect the init and the inetd type on your server.
Try running the configure like the example below and then run the make all and make install-init and see if that works for you.
Code: Select all
./configure --enable-command-args --with-ssl-lib=/usr/lib/x86_64-linux-gnu/ --with-init-type=systemd --with-inetd-type=systemd
I tried that , I didn't get an error after make install-init :
Code: Select all
root@ip-xxx-xx-xx-xx:/tmp/nrpe-3.0.1# make install-init
/usr/bin/install -c -m 644 startup/default-service /lib/systemd/system/nrpe.service
But that didn't change the results:
Code: Select all
root@ip-xx-xx-xx-xx:/tmp/nrpe-3.0.1# /usr/local/nagios/libexec/check_nrpe -V
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 3.0.1
Last Modified: 09-08-2016
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: OpenSSL 0.9.6 or higher required
root@ip-xxx-xx-xx-xx:/tmp/nrpe-3.0.1# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
connect to address 127.0.0.1 port 5666: Connection refused
connect to host 127.0.0.1 port 5666: Connection refused
I don't this as a progress since I can't start nrpe and it is still showing as:
service nrpe start
nrpe: unrecognized service
@ tgriep this is the same error as the beginning other post:
https://support.nagios.com/forum/viewto ... =7&t=42894
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Fri Mar 31, 2017 1:19 pm
by dwhitfield
What is the output of
cat /etc/hosts?
Also, is the result the same if you use
/usr/local/nagios/libexec/check_nrpe -H localhost?
Lastly, from the Ubuntu machine, what's the output of the two following commands:
Code: Select all
nmap localhost -p 5666
netstat -l | grep 5666
Re: NRPE Install Fails on Ubuntu 16.04
Posted: Mon Apr 03, 2017 8:59 am
by cybergene
What is the output of
cat /etc/hosts?
Code: Select all
cat /etc/hosts
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Also, is the result the same if you use
/usr/local/nagios/libexec/check_nrpe -H localhost?
Code: Select all
/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
Output of nmap localhost -p 5666:
Code: Select all
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000082s latency).
PORT STATE SERVICE
5666/tcp closed nrpe
Output of netstat -l | grep 5666:
Give no result. Blank.
I checked security groups in AWS for this box and 5666 is open and I can ping my Nagios Server from this remote box and Vice Versa.