check_ldap ssl fails with "Could not bind to the LDAP server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
westernuniv
Posts: 120
Joined: Tue Aug 21, 2012 9:29 am

check_ldap ssl fails with "Could not bind to the LDAP server

Post by westernuniv »

I've tried to monitor the ldap server farm secure connection with check_ldap plugin. I'm getting the following error
[root@naggy libexec]# ./check_ldap -H abc.uwo.ca -p 636 -b "ou=people,o=uwo,dc=xyz" -v
ldap_bind: Can't contact LDAP server (-1)
additional info: TLS error -8179:Peer's Certificate issuer is not recognized.
Could not bind to the LDAP server


Thanks
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_ldap ssl failed with "Could not bind to the LDAP s

Post by ssax »

Look like it's a self signed certificate, is that correct?

If so, you need to import the CA cert into the system, you can follow this guide to do so:
*** I know it says it's for the AD component but it's still valid for the issue you're experiencing.
*** Note: You would run the openssl s_client command against your certificate authority.

https://assets.nagios.com/downloads/nag ... ponent.pdf
westernuniv
Posts: 120
Joined: Tue Aug 21, 2012 9:29 am

Re: check_ldap ssl fails with "Could not bind to the LDAP se

Post by westernuniv »

Hi, Thanks for your response. Actually the ldap server farm is using Thawte singed certificate.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_ldap ssl fails with "Could not bind to the LDAP se

Post by ssax »

The error "Peer's Certificate issuer is not recognized" is saying that at least something in the certificate chain is not trusted by the server.

It's not an RSA-PSS (Alternative Signature Format) certificate is it?
westernuniv
Posts: 120
Joined: Tue Aug 21, 2012 9:29 am

Re: check_ldap ssl fails with "Could not bind to the LDAP se

Post by westernuniv »

Hi, After googling found that If I set the env variable LDAPTLS_CACERT=/etc/pki/tls/certs/ca-bundle.crt in the nagios server cmd line before executing the check, it worked
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_ldap ssl fails with "Could not bind to the LDAP se

Post by hsmith »

westernuniv wrote:Hi, After googling found that If I set the env variable LDAPTLS_CACERT=/etc/pki/tls/certs/ca-bundle.crt in the nagios server cmd line before executing the check, it worked
Glad to hear it worked, does that solve this issue for you?
Former Nagios Employee.
me.
westernuniv
Posts: 120
Joined: Tue Aug 21, 2012 9:29 am

Re: check_ldap ssl fails with "Could not bind to the LDAP se

Post by westernuniv »

I've created new service xi check for ldap secure query and pass the env variable.
Thanks
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_ldap ssl fails with "Could not bind to the LDAP se

Post by hsmith »

westernuniv wrote:I've created new service xi check for ldap secure query and pass the env variable.
Thanks
Are we all right to close this thread, or is there anything else we can assist you with?
Former Nagios Employee.
me.
westernuniv
Posts: 120
Joined: Tue Aug 21, 2012 9:29 am

Re: check_ldap ssl fails with "Could not bind to the LDAP se

Post by westernuniv »

That's all I need. Thanks
Locked