Page 1 of 1

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

Posted: Tue Aug 18, 2015 1:29 pm
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

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

Posted: Tue Aug 18, 2015 1:38 pm
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

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

Posted: Tue Aug 18, 2015 2:15 pm
by westernuniv
Hi, Thanks for your response. Actually the ldap server farm is using Thawte singed certificate.

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

Posted: Tue Aug 18, 2015 2:42 pm
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?

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

Posted: Tue Aug 18, 2015 2:52 pm
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

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

Posted: Tue Aug 18, 2015 3:00 pm
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?

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

Posted: Tue Aug 18, 2015 3:04 pm
by westernuniv
I've created new service xi check for ldap secure query and pass the env variable.
Thanks

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

Posted: Tue Aug 18, 2015 3:12 pm
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?

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

Posted: Tue Aug 18, 2015 3:51 pm
by westernuniv
That's all I need. Thanks