unable to install nagios client on ubuntu 16.04.5 LTS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gornm565
Posts: 72
Joined: Tue Nov 15, 2016 6:11 pm

unable to install nagios client on ubuntu 16.04.5 LTS

Post by gornm565 »

I am getting an error below when installing the linux-nrpe-agent on Ubuntu. I am attaching the install.log as well - can you help me figure out why it's not installing?


cd ./src/; make
make[1]: Entering directory '/home/sysops/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
gcc -g -O2 -I/usr/include/openssl -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -L/usr/lib/x86_64-linux-gnu/ -lssl -lcrypto -lnsl
In file included from ./nrpe.c:45:0:
./../include/dh.h: In function ‘get_dh2048’:
./../include/dh.h:42:17: warning: implicit declaration of function ‘DH_set0_pqg’ [-Wimplicit-function-declaration]
|| !DH_set0_pqg(dh, p, NULL, g)) {
^
/tmp/ccujuJw7.o: In function `get_dh2048':
/home/sysops/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src/./../include/dh.h:42: undefined reference to `DH_set0_pqg'
collect2: error: ld returned 1 exit status
Makefile:48: recipe for target 'nrpe' failed
make[1]: *** [nrpe] Error 1
make[1]: Leaving directory '/home/sysops/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
Makefile:65: recipe for target 'all' failed
make: *** [all] Error 2
cd ./src/; make install
make[1]: Entering directory '/home/sysops/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
make install-plugin
make[2]: Entering directory '/home/sysops/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
/usr/bin/install -c -m 755 -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 ../uninstall /usr/local/nagios/bin/nrpe-uninstall
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/libexec
/usr/bin/install: cannot stat 'check_nrpe': No such file or directory
Makefile:58: recipe for target 'install-plugin' failed
make[2]: *** [install-plugin] Error 1
make[2]: Leaving directory '/home/sysops/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
Makefile:54: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/home/sysops/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
Makefile:89: recipe for target 'install' failed
make: *** [install] Error 2
NRPE-POST
sed: can't read /etc/xinetd.d/nrpe: No such file or directory
sed: can't read /etc/xinetd.d/nrpe: No such file or directory

real 0m20.737s
user 0m15.676s
sys 0m2.056s
INSTALLING EXTRA PLUGINS...

real 0m0.020s
user 0m0.000s
sys 0m0.004s
sed: can't read /etc/xinetd.d/nrpe: No such file or directory
Subcomponents installation failed - exiting
RESULT=1

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.

The script that failed was: './A-subcomponents'
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: unable to install nagios client on ubuntu 16.04.5 LTS

Post by benjaminsmith »

Hello @gornm565,

What instructions did you follow for installing NRPE?

Can you try again running the following commands as root:

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz
tar xzf linux-nrpe-agent.tar.gz
cd linux-nrpe-agent
./fullinstall
Let me know if that works.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
gornm565
Posts: 72
Joined: Tue Nov 15, 2016 6:11 pm

Re: unable to install nagios client on ubuntu 16.04.5 LTS

Post by gornm565 »

That's exactly what I did.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: unable to install nagios client on ubuntu 16.04.5 LTS

Post by benjaminsmith »

Hi @gornm565,

Ok. Some require packages maybe be missing. Please run the following to install prerequisites:

Code: Select all

sudo apt-get update
sudo apt-get install -y autoconf automake gcc libc6 libmcrypt-dev make libssl-dev wget openssl
Then try running the install script again. If it fails again, what is the output of sestatus?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
gornm565
Posts: 72
Joined: Tue Nov 15, 2016 6:11 pm

Re: unable to install nagios client on ubuntu 16.04.5 LTS

Post by gornm565 »

Looks like everything is already up-to-date

root@USLINUXABDEV02:/home/sysops# apt-get install -y autoconf automake gcc libc6 libmcrypt-dev make libssl-dev wget openssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
autoconf is already the newest version (2.69-9).
automake is already the newest version (1:1.15-4ubuntu1).
automake set to manually installed.
gcc is already the newest version (4:5.3.1-1ubuntu1).
make is already the newest version (4.1-6).
libmcrypt-dev is already the newest version (2.5.8-3.3).
libc6 is already the newest version (2.23-0ubuntu10).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.14).
openssl is already the newest version (1.0.2g-1ubuntu4.14).
openssl set to manually installed.
wget is already the newest version (1.17.1-1ubuntu1.4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@USLINUXABDEV02:/home/sysops# sestatus
The program 'sestatus' is currently not installed. You can install it by typing:
apt install policycoreutils
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: unable to install nagios client on ubuntu 16.04.5 LTS

Post by lmiltchev »

That's exactly what I did.
I am not sure then how to explain this:
cd ./src/; make
make[1]: Entering directory '/home/sysops/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
If you ran the same commands, you should've had this:
cd ./src/; make
make[1]: Entering directory '/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
It seems you didn't run the installer from the /tmp directory.

Run the following commands and show the output in code wraps:

Code: Select all

uname -a
cat /etc/*release
dpkg -l | grep ssl
cat /etc/apt/sources.list
Try installing xinetd manually:

Code: Select all

apt-get install xinetd
and rerun the fullinstall script:

Code: Select all

./fullinstall
Did the install finish successfully or at least went a bit further?
Be sure to check out our Knowledgebase for helpful articles and solutions!
gornm565
Posts: 72
Joined: Tue Nov 15, 2016 6:11 pm

Re: unable to install nagios client on ubuntu 16.04.5 LTS

Post by gornm565 »

Code: Select all

root@USLINUXABDEV02:/home/sysops# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
root@USLINUXABDEV02:/home/sysops# dpkg -l | grep ssl
ii  centrifydc-openssl                  5.5.2-578                                  amd64        Centrify DirectControl OpenSSL
ii  libgnutls-openssl27:amd64           3.4.10-4ubuntu1.4                          amd64        GNU TLS library - OpenSSL wrapper
ii  libssl-dev:amd64                    1.0.2g-1ubuntu4.14                         amd64        Secure Sockets Layer toolkit - development files
ii  libssl-doc                          1.0.2g-1ubuntu4.14                         all          Secure Sockets Layer toolkit - development documentation
ii  libssl1.0.0:amd64                   1.0.2g-1ubuntu4.14                         amd64        Secure Sockets Layer toolkit - shared libraries
ii  libxmlsec1-openssl                  1.2.20-2ubuntu4                            amd64        Openssl engine for the XML security library
ii  openssl                             1.0.2g-1ubuntu4.14                         amd64        Secure Sockets Layer toolkit - cryptographic utility
ii  python-openssl                      0.15.1-2ubuntu0.2                          all          Python 2 wrapper around the OpenSSL library
root@USLINUXABDEV02:/home/sysops# cat /etc/apt/sources.list
#

# deb cdrom:[Ubuntu-Server 16.04.4 LTS _Xenial Xerus_ - Release amd64 (20180228)]/ xenial main restricted

# deb cdrom:[Ubuntu-Server 16.04.4 LTS _Xenial Xerus_ - Release amd64 (20180228)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

root@USLINUXABDEV02:/home/sysops# apt-get install xinetd
Reading package lists... Done
Building dependency tree
Reading state information... Done
xinetd is already the newest version (1:2.3.15-6).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.


gornm565
Posts: 72
Joined: Tue Nov 15, 2016 6:11 pm

Re: unable to install nagios client on ubuntu 16.04.5 LTS

Post by gornm565 »

Previously I ran the install from my home directory. I just did it from /tmp but I got the same error:

Code: Select all

*** Configuration summary for nrpe 3.2.1 2017-09-01 ***:

 General Options:
 -------------------------
 NRPE port:    5666
 NRPE user:    nagios
 NRPE group:   nagios
 Nagios user:  nagios
 Nagios group: nagios


Review the options above for accuracy.  If they look okay,
type 'make all' to compile the NRPE daemon and client
or type 'make' to get a list of make options.

cd ./src/; make
make[1]: Entering directory '/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
gcc -g -O2 -I/usr/include/openssl -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -L/usr/lib/x86_64-linux-gnu/  -lssl -lcrypto -lnsl
In file included from ./nrpe.c:45:0:
./../include/dh.h: In function ‘get_dh2048’:
./../include/dh.h:42:17: warning: implicit declaration of function ‘DH_set0_pqg’ [-Wimplicit-function-declaration]
             || !DH_set0_pqg(dh, p, NULL, g)) {
                 ^
/tmp/ccx1kJ1p.o: In function `get_dh2048':
/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src/./../include/dh.h:42: undefined reference to `DH_set0_pqg'
collect2: error: ld returned 1 exit status
Makefile:48: recipe for target 'nrpe' failed
make[1]: *** [nrpe] Error 1
make[1]: Leaving directory '/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
Makefile:65: recipe for target 'all' failed
make: *** [all] Error 2
cd ./src/; make install
make[1]: Entering directory '/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
make install-plugin
make[2]: Entering directory '/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
/usr/bin/install -c -m 755 -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 ../uninstall /usr/local/nagios/bin/nrpe-uninstall
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/libexec
/usr/bin/install: cannot stat 'check_nrpe': No such file or directory
Makefile:58: recipe for target 'install-plugin' failed
make[2]: *** [install-plugin] Error 1
make[2]: Leaving directory '/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
Makefile:54: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src'
Makefile:89: recipe for target 'install' failed
make: *** [install] Error 2
NRPE-POST
sed: can't read /etc/xinetd.d/nrpe: No such file or directory
sed: can't read /etc/xinetd.d/nrpe: No such file or directory

real    1m45.599s
user    1m40.936s
sys     0m2.036s
INSTALLING EXTRA PLUGINS...

real    0m0.007s
user    0m0.004s
sys     0m0.000s
sed: can't read /etc/xinetd.d/nrpe: No such file or directory
Subcomponents installation failed - exiting
RESULT=1

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.

The script that failed was: './A-subcomponents'
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: unable to install nagios client on ubuntu 16.04.5 LTS

Post by lmiltchev »

The problem is with the custom openssl path that you have on your system. This is definitely NOT a "clean" (unmodified) Ubintu 16.04 box... In the log we see:
checking for openssl... /opt/anaconda2018.12/bin/openssl
You may want to try running:

Code: Select all

./configure --with-ssl-lib='/proper/path/to/latest/openssl'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked