CHECK_NRPE: Error – Could not complete SSL handshake nagios

During or post Nagios configuration, you might have encountered with this common problem “CHECK_NRPE: Error – Could not complete SSL handshake nagios“. Usually we see the error “CHECK_NRPE: Error – Could not complete SSL handshake” .It is because NRPE works with ssl and this error shows that NRPE is not able to communicate because there is some SSL issue.

Open tcp/5666 port for SSL

The nrpe uses the port no. 5666 to communicate . The same port no. must be opened in Nagios server as well as in nagios client.

Install OpenSSL

For resolving this issue. Install the ssl in both side Nagios server and Nagios client. Use the given below command to install openssl package.

Install OpenSSL on CentOS / Red Hat / AlmaLinux / Rocky Linux

dnf install openssl
## OR
yum install openssl

Install OpenSSL on Debian or Ubuntu

sudo apt-get install openssl

or

sudo apt install openssl

Restart NRPE service

Restart the nrpe in both system (Nagios server and Nagios client)

## In Red Hat 5,6 and CentOS 5,6
service nagios restart

## Red Hat 5,6 and CentOS 5,6
systemctl restart nagios.service

Now check with check_nrpe plugin.

Get the location where check_nrpe is installed. You will find where the check_nrpe is located by using given below command.

find / -name check_nrpe

Use the absolute path of check_nrpe and hit the below command.
In our system we have default path that is /usr/lib/nagios/plugins/check_nrpe, hence we are using same.

/usr/lib/nagios/plugins/check_nrpe -H remote_server_ip

Note: In above command, replace ‘remote_server_ip‘ with target host IP address or FQDN.

It will show the nrpe version. like this in below given command.
Remote server IP is 192.168.122.94

[root@localhost ~]# /usr/lib/nagios/plugins/check_nrpe -H 192.168.122.94
NRPE v2.13
[root@localhost ~]#

If you are able to get the NRPE version by using above command, it means problem is solved. Now we are able to make connection on SSL between source (Nagios server) to target (Nagios client) server.

Read Some More Articles

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.