NRPE Installation Error(make all)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
siriideepak
Posts: 78
Joined: Tue Feb 28, 2012 7:21 am

NRPE Installation Error(make all)

Post by siriideepak »

Hi Team

While trying to install nrpe plugin and running the command make all i am getting the following error. Kindly update on this. Thanks!!

cd ./src/; make ; cd ..
make[1]: Entering directory '/opt/nrpe-2.15/src'
gcc -g -O2 -I/usr/include/openssl -I/usr/include -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:34:0:
./../include/dh.h: In function ‘get_dh512’:
./../include/dh.h:20:4: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’
dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL);
^
./nrpe.c: In function ‘main’:
./nrpe.c:118:2: warning: implicit declaration of function ‘asprintf’ [-Wimplicit-function-declaration]
asprintf(&env_string,"NRPE_MULTILINESUPPORT=1");
^
./nrpe.c:204:3: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
getcwd(config_file,sizeof(config_file));
^
./nrpe.c:309:3: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
chdir("/");
^
./nrpe.c:379:3: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
chdir("/");
^
./nrpe.c: In function ‘my_system’:
./nrpe.c:1491:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
pipe(fd);
^
./nrpe.c:1544:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fd[1],buffer,strlen(buffer)+1);
^
./nrpe.c:1554:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fd[1],buffer,bytes_read);
^
./nrpe.c: In function ‘write_pid_file’:
./nrpe.c:1766:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fd,pbuf,strlen(pbuf));
^
./utils.c: In function ‘my_connect’:
./utils.c:151:10: warning: implicit declaration of function ‘my_create_socket’ [-Wimplicit-function-declaration]
sock = my_create_socket(ai, bind_address);
^
Makefile:39: recipe for target 'nrpe' failed
make[1]: *** [nrpe] Error 1
make[1]: Leaving directory '/opt/nrpe-2.15/src'

Regards,
Deepak.P
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRPE Installation Error(make all)

Post by eloyd »

It looks like the SSL libraries might not be installed on your machine. What's the output of:

Code: Select all

yum list openssl openssl-devel
Last edited by eloyd on Mon Jul 31, 2017 11:37 am, edited 1 time in total.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
bolson

Re: NRPE Installation Error(make all)

Post by bolson »

Thank you for your input eloyd. And siriideepak, please let us know if this resolves your issue.

Thank you!
siriideepak
Posts: 78
Joined: Tue Feb 28, 2012 7:21 am

Re: NRPE Installation Error(make all)

Post by siriideepak »

Hi eloyd

Thanks for the reply it worked. But after installing i am getting the following error in nagiosxi client machine.

root@ip-172-16-1-108:/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 refusedroot

Regards,
Deepak.P
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRPE Installation Error(make all)

Post by eloyd »

That looks like a firewall/iptables issue. Make sure port 5666 is open and allowed to connect from your Nagios host to your remote host.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
siriideepak
Posts: 78
Joined: Tue Feb 28, 2012 7:21 am

Re: NRPE Installation Error(make all)

Post by siriideepak »

Hi eloyd,

Iptables already in off on both nagios and client machines.

Regards,
Deepak.P
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRPE Installation Error(make all)

Post by eloyd »

This next part is just a guess, because I'm too lazy to look, but can you check the following

Look at /etc/xinetd.d/nrpe

See if the "only_from" line includes your nagios server.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
bolson

Re: NRPE Installation Error(make all)

Post by bolson »

Run the following command and post your result:

cat /etc/xinetd.d/nrpe

Thank you!
siriideepak
Posts: 78
Joined: Tue Feb 28, 2012 7:21 am

Re: NRPE Installation Error(make all)

Post by siriideepak »

Please find below results:
root@ip-172-16-1-108:~# cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 172.16.3.14
}
root@ip-172-16-1-108:~#
bolson

Re: NRPE Installation Error(make all)

Post by bolson »

Edit the following line in /etc/xinetd.d/nrpe to read:

Code: Select all

only_from = 172.16.3.14 localhost
Then execute these commands:

Code: Select all

service xinetd restart
/usr/local/nagios/libexec/check_nrpe -H localhost
tail /var/log/messages
And post your results.

Thank you!
Locked