Page 1 of 3

NRPE Installation Error(make all)

Posted: Mon Jul 31, 2017 7:09 am
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

Re: NRPE Installation Error(make all)

Posted: Mon Jul 31, 2017 9:05 am
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

Re: NRPE Installation Error(make all)

Posted: Mon Jul 31, 2017 10:55 am
by bolson
Thank you for your input eloyd. And siriideepak, please let us know if this resolves your issue.

Thank you!

Re: NRPE Installation Error(make all)

Posted: Mon Jul 31, 2017 11:31 pm
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

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 6:30 am
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.

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 9:39 am
by siriideepak
Hi eloyd,

Iptables already in off on both nagios and client machines.

Regards,
Deepak.P

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 9:45 am
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.

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 9:50 am
by bolson
Run the following command and post your result:

cat /etc/xinetd.d/nrpe

Thank you!

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 10:55 am
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:~#

Re: NRPE Installation Error(make all)

Posted: Tue Aug 01, 2017 11:03 am
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!