check_ldap fails with "Could not bind to the ldap-server"
Posted: Wed Jun 12, 2013 2:59 pm
General Info:
This one has me stumped. I used the LDAP Server wizard to create an ldaps check on 6 AD servers.
The checks all fail with "Could not bind to the ldap-server". I used the 'Test Check Command' button in XI and the check passes:
OUTPUT: LDAP OK - 0.050 seconds response time|time=0.049582s;;;0.000000
I cut and pasted the command line from the Test Check Command output and ran that manually as root and as the nagios user from the user's home dir and from /usr/local/nagios/libexec and all passed. I've tried various parmeters from check_ldap -h but nothing seems to work when it's run by the scheduler, but I can't see any problems checking the service manually. I don't see anything useful in the nagios.log file:
(xxxxxxx = my server fqdn)
[1371059561] SERVICE ALERT: xxxxxxx;LDAP Server;CRITICAL;SOFT;1;Could not bind to the ldap-server
[1371059621] SERVICE ALERT: xxxxxxx;LDAP Server;CRITICAL;SOFT;2;Could not bind to the ldap-server
[1371059681] SERVICE ALERT: xxxxxxx;LDAP Server;CRITICAL;SOFT;3;Could not bind to the ldap-server
[1371059741] SERVICE ALERT: xxxxxxx;LDAP Server;CRITICAL;SOFT;4;Could not bind to the ldap-server
Looking at strings in check_ldap there is a blurb about "This plugin must be either run as root or setuid root.", but I don't see any mention of that in the help output.
Someone else has seen a similar problem, but there was no resolution posted:
http://permalink.gmane.org/gmane.networ ... ugins/5190
The person I need to ask about whether the servers support ssl, starttls, both, etc is out sick today so I can't provide that information, however from the command line I can use -S or -T, and -2 or -3 and
it just works. Forcing the port to 389 with -p 389 does give the 'Could not bind to the ldap-server' error
from the command line, but adding -p 636 to $ARG1$ in the XI config does not change the results from scheduled checks.
(replaced sensitive data with upper case letters)
[nagios@XXX libexec]$ /usr/local/nagios/libexec/check_ldap -H AAA -b "BBB" -D "CCC" -P "DDD" -2 -S
Version Info:
Nagios XI 2012R2.2 Copyright © 2008-2013 Nagios Enterprises, LLC.
check_ldap v1991 (nagios-plugins 1.4.13)
I've run out of things to check. Are there any logs that might shed some light on what is happening with these checks? (This is my first attempt to migrate ldap services to XI, so these are the only hosts using check_ldap currently.)
This one has me stumped. I used the LDAP Server wizard to create an ldaps check on 6 AD servers.
The checks all fail with "Could not bind to the ldap-server". I used the 'Test Check Command' button in XI and the check passes:
OUTPUT: LDAP OK - 0.050 seconds response time|time=0.049582s;;;0.000000
I cut and pasted the command line from the Test Check Command output and ran that manually as root and as the nagios user from the user's home dir and from /usr/local/nagios/libexec and all passed. I've tried various parmeters from check_ldap -h but nothing seems to work when it's run by the scheduler, but I can't see any problems checking the service manually. I don't see anything useful in the nagios.log file:
(xxxxxxx = my server fqdn)
[1371059561] SERVICE ALERT: xxxxxxx;LDAP Server;CRITICAL;SOFT;1;Could not bind to the ldap-server
[1371059621] SERVICE ALERT: xxxxxxx;LDAP Server;CRITICAL;SOFT;2;Could not bind to the ldap-server
[1371059681] SERVICE ALERT: xxxxxxx;LDAP Server;CRITICAL;SOFT;3;Could not bind to the ldap-server
[1371059741] SERVICE ALERT: xxxxxxx;LDAP Server;CRITICAL;SOFT;4;Could not bind to the ldap-server
Looking at strings in check_ldap there is a blurb about "This plugin must be either run as root or setuid root.", but I don't see any mention of that in the help output.
Someone else has seen a similar problem, but there was no resolution posted:
http://permalink.gmane.org/gmane.networ ... ugins/5190
The person I need to ask about whether the servers support ssl, starttls, both, etc is out sick today so I can't provide that information, however from the command line I can use -S or -T, and -2 or -3 and
it just works. Forcing the port to 389 with -p 389 does give the 'Could not bind to the ldap-server' error
from the command line, but adding -p 636 to $ARG1$ in the XI config does not change the results from scheduled checks.
(replaced sensitive data with upper case letters)
[nagios@XXX libexec]$ /usr/local/nagios/libexec/check_ldap -H AAA -b "BBB" -D "CCC" -P "DDD" -2 -S
Version Info:
Nagios XI 2012R2.2 Copyright © 2008-2013 Nagios Enterprises, LLC.
check_ldap v1991 (nagios-plugins 1.4.13)
I've run out of things to check. Are there any logs that might shed some light on what is happening with these checks? (This is my first attempt to migrate ldap services to XI, so these are the only hosts using check_ldap currently.)