[Nagiosplug-help] check_ldap isn't working - fails with "Could not search/find objectclasses" message

Q L.D. qld at q.estips.com
Thu Aug 5 19:06:09 CEST 2004


I'm having some strange problem with check_ldap plugin. I'm running the 
patched version of 1.3.1 plugin (patch from: 

[nagios]$ ./check_ldap -V
check_ldap (nagios-plugins 1.3.1) 1.4
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

I'm running nagios on RedHat WS 3.0 with RedHat OpenLDAP versions:

[nagios]$ rpm -qa|grep openldap

And I also have OpenLDAP 2.1.30 installed from sources (this is the one 
that I'm actually using for most things. I keep the RedHat's version for 
testing only):

[nagios]$ /usr/local/bin/ldapsearch -VV
ldapsearch: @(#) $OpenLDAP: ldapsearch 2.1.30 (Jun  8 2004 18:57:08) $
         root at dev:/usr/local/src/openldap-2.1.30/clients/tools
         (LDAP library: OpenLDAP 20130)

Now, the problem is that when I try to run check_ldap from either 
command line or from within nagios, it fails with following message:

[nagios]$ ./check_ldap -H ldap.domain.com -b 
"dc=organization,dc=com,o=Organization Inc."
Could not search/find objectclasses in 
dc=organization,dc=com,o=Organization Inc.

[nagios]$ /usr/local/bin/ldapsearch -x -h ldap.domain.com -b 
'dc=organization,dc=com,o=Organization Inc.' '(objectclass=*)'
# extended LDIF
# LDAPv3
# base <dc=organization,dc=com,o=Organization Inc.> with scope sub
# filter: (objectclass=*)
# requesting: ALL
[rest of results snipped]

However, the standard RedHat ldapsearch (/usr/bin/ldapsearch) fails with 
"Segmentation fault" error.

So, I'm thinking that perhaps check_ldap doesn't work because it's being 
compiled and linked against the RedHat OpenLDAP library, and not the one 
I installed from source.

The question is, is there any way to adjust configuration pre- or post- 
"configure" so that check_ldap library is linked using include files 
from /usr/local/include and libraries from /usr/local/lib ?

Or perhaps there is much easier workaround?

Any help is appreciated,

Thanks in advance,


More information about the Help mailing list