Page 1 of 3

Error getting NRPE to install on Redhat 8

Posted: Thu Jun 17, 2021 4:33 am
by HIINNS
All, I am trying to install a NRPE agent on a Redhat 8 server. I get the following error messages when I run the install :

cd ./src/; make
make[1]: Entering directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src'
gcc -g -O2 -I/usr/include/krb5 -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -lssl -lcrypto
./nrpe.c: In function ‘init_ssl’:
./nrpe.c:474:8: warning: implicit declaration of function ‘get_dh2048’ [-Wimplicit-function-declaration]
dh = get_dh2048();
^~~~~~~~~~
./nrpe.c:474:6: warning: assignment to ‘DH *’ {aka ‘struct dh_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
dh = get_dh2048();
^
/tmp/ccbgUYnQ.o: In function `init_ssl':
/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src/./nrpe.c:474: undefined reference to `get_dh2048'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:48: nrpe] Error 1
make[1]: Leaving directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src'
make: *** [Makefile:65: all] Error 2
cd ./src/; make install
make[1]: Entering directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src'
make install-plugin
make[2]: Entering directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/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
make[2]: *** [Makefile:60: install-plugin] Error 1
make[2]: Leaving directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src'
make[1]: *** [Makefile:54: install] Error 2
make[1]: Leaving directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src'
make: *** [Makefile:89: install] Error 2
NRPE-POST

Please provide direction to resolve problem. Thank you.

Re: Error getting NRPE to install on Redhat 8

Posted: Thu Jun 17, 2021 7:18 am
by HIINNS
Sorry, this is the 1st error encountered -> 139967465985856:error:050C90CA:Diffie-Hellman routines:DH_generate_parameters_ex:non FIPS method:crypto/dh/dh_gen.c:31:

Re: Error getting NRPE to install on Redhat 8

Posted: Thu Jun 17, 2021 10:32 am
by dchurch
What were the arguments you passed to "./configure"?

What was the output from when you ran "./configure"?

Re: Error getting NRPE to install on Redhat 8

Posted: Fri Jun 18, 2021 4:28 am
by HIINNS
./configure --enable-command-args --with-piddir=/var/run/nrpe --libexecdir=/usr/local/nagios/libexec $libssldir $EXTRACFG

*** Generating DH Parameters for SSL/TLS ***
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
139967465985856:error:050C90CA:Diffie-Hellman routines:DH_generate_parameters_ex:non FIPS method:crypto/dh/dh_gen.c:31:
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating nrpe.spec
config.status: creating uninstall
config.status: creating sample-config/nrpe.cfg
config.status: creating startup/bsd-init
config.status: creating startup/debian-init
config.status: creating startup/default-init
config.status: creating startup/default-inetd
config.status: creating startup/default-service
config.status: creating startup/default-socket
config.status: creating startup/default-socket-svc
config.status: creating startup/default-xinetd
config.status: creating startup/mac-init.plist
config.status: creating startup/mac-inetd.plist
config.status: creating startup/newbsd-init
config.status: creating startup/openbsd-init
config.status: creating startup/openrc-conf
config.status: creating startup/openrc-init
config.status: creating startup/solaris-init.xml
config.status: creating startup/solaris-inetd.xml
config.status: creating startup/tmpfile.conf
config.status: creating startup/upstart-init
config.status: creating startup/rh-upstart-init
config.status: creating include/common.h
config.status: creating include/config.h


*** Configuration summary for nrpe 4.0.2 2020-03-09 ***:

-------------------------
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 '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src'
gcc -g -O2 -I/usr/include/krb5 -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -lssl -lcrypto
./nrpe.c: In function ‘init_ssl’:
./nrpe.c:474:8: warning: implicit declaration of function ‘get_dh2048’ [-Wimplicit-function-declaration]
dh = get_dh2048();
^~~~~~~~~~
./nrpe.c:474:6: warning: assignment to ‘DH *’ {aka ‘struct dh_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
dh = get_dh2048();
^
/tmp/ccbgUYnQ.o: In function `init_ssl':
/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src/./nrpe.c:474: undefined reference to `get_dh2048'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:48: nrpe] Error 1
make[1]: Leaving directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src'
make: *** [Makefile:65: all] Error 2
cd ./src/; make install
make[1]: Entering directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/src'
make install-plugin
make[2]: Entering directory '/tc/tcsoftware/Nagios/subcomponents/nrpe/nrpe-4.0.2/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
make[2]: *** [Makefile:60: install-plugin] Error 1

Re: Error getting NRPE to install on Redhat 8

Posted: Fri Jun 18, 2021 9:28 am
by dchurch
What is EXTRACFG[/code] set to? Can you run this command and post the output?

Code: Select all

echo $libssldir $EXTRACFG
Is this running as part of an automated script?

Re: Error getting NRPE to install on Redhat 8

Posted: Tue Jun 22, 2021 4:59 am
by HIINNS
echo $libssldir $EXTRACFG. Both were blank. Sorry for not getting back sooner. I was off yesterday.

Re: Error getting NRPE to install on Redhat 8

Posted: Tue Jun 22, 2021 12:16 pm
by dchurch
Can you try install nrpe from the package repo using the instructions at repo.nagios.com?

Code: Select all

rpm -Uvh https://repo.nagios.com/nagios/8/nagios-repo-8-1.el8.noarch.rpm
yum install nrpe

Re: Error getting NRPE to install on Redhat 8

Posted: Wed Jun 23, 2021 8:13 am
by HIINNS
Can't install this way. I have no internet access on any of my servers.

Re: Error getting NRPE to install on Redhat 8

Posted: Wed Jun 23, 2021 2:06 pm
by gsmith
Hi,

I attached a tarball of nrpe and its dependencies. Can you "sneakernet" it over to
the network your servers are on?

Thanks

Re: Error getting NRPE to install on Redhat 8

Posted: Thu Jun 24, 2021 4:33 am
by HIINNS
I was able to download the tar ball, and successfully installed nrpe. The data collection is now working. Thank you all for helping me. Feel free to close out the case.