SSL Problems - Error: could not use CA certificate file

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.
Locked
konffi
Posts: 1
Joined: Thu Oct 29, 2020 2:16 pm

SSL Problems - Error: could not use CA certificate file

Post by konffi »

Hello everybody,

i am currently trying to encrypt the nrpe checks via ssl. I have followed the following instructions: https://support.nagios.com/kb/article.php?id=519
I have created all necessary certificates and stored them on my Nagios server and client.
First function tests have already been passed. Using the following command:

Code: Select all

root@nagios_server:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_nrpe -A /usr/local/nagios/etc/ssl/ca/ca_cert.pem -C /usr/local/nagios/etc/ssl/nagios_server_certs/nagios_server.pem -K /usr/local/nagios/etc/ssl/nagios_server_certs/nagios_server.key -H xxxxxxxx
NRPE v4.0.3
The errors occur when I want to set the nrpe client to require SSL. I do this by making the following change in nrpe.cfg:

Code: Select all

ssl_client_certs=2
When I restart the service the following error message is shown:

Code: Select all

Oct 29 19:12:51 client nrpe[11796]: Error: could not use CA certificate file '/usr/local/nagios/etc/ssl/ca-cert.pem #: No such file or directory
The directory in which the files are located has the correct permissions in my opinion

Code: Select all

-rw-r--r-- 1 nagios nagios 2.1K Oct 28 20:23 ca_cert.pem
-rw------- 1 nagios nagios 1.7K Oct 28 20:22 client_nrpe_cert.key
-rw-r--r-- 1 nagios nagios 1.8K Oct 28 20:22 client_nrpe_cert.pem

Did anyone have a similar problem or a solution ?
Many thanks in advance!

Best regards
Konffi
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: SSL Problems - Error: could not use CA certificate file

Post by gormank »

Maybe the dir isn't readable by the nagios user? As the nagios user:

ls -l /usr/local/nagios/etc/ssl/ca-cert.pem
Locked