# Annoying nss_ldap error message



## erikf154 (May 26, 2010)

This message repeats every minute in the messages logfile. I've can't figure out what it is. The server is setup with ldap and ldap works logging into the server just fine. The setup is exactly like 10 other servers we have and I don't get the message on those servers, very strange.

Have anyone seen anything like it. I've searched the web, but found no solution yet.


```
10:22:00 www004 cron[37507]: nss_ldap: could not search LDAP server - Server is unavailable
```


----------



## SirDice (May 26, 2010)

So, what's getting started by cron?

But it's likely you're missing net/nss_ldap.


----------



## erikf154 (May 26, 2010)

The crontab file is just like on the other servers (nothing out of the ordinary):

```
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.32.34.1 2009/04/15 03:14:26 kensmith Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute hour    mday    month   wday    who     command
#
*/5     *       *       *       *       root    /usr/libexec/atrun
#
# Save some entropy so that /dev/random can re-seed on boot.
*/11    *       *       *       *       operator /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0       *       *       *       *       root    newsyslog
#
# Perform daily/weekly/monthly maintenance.
1       3       *       *       *       root    periodic daily
15      4       *       *       6       root    periodic weekly
30      5       1       *       *       root    periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
1,31    0-5     *       *       *       root    adjkerntz -a
```

I ran all the commands in the crontab manually and that didn't replicate the error message...

I also ran "crontab -l -u $USER" for all the users in the passwd file to see if any of them have any cron jobs, but they don't. That's what makes this error message so strange!

nss_ldap is there:

```
# pkg_info | grep ldap
nss_ldap-1.265_3    RFC 2307 NSS module
openldap-client-2.4.21 Open source LDAP client implementation
pam_ldap-1.8.5      A pam module for authenticating with LDAP
```


----------



## SirDice (May 26, 2010)

Perhaps the host or uri isn't correctly specified in ldap.conf?


----------



## erikf154 (May 26, 2010)

Thanks for our reply. 

But like I said, the setup is exactly the same as on 10 other servers (we use puppet to deploy the ldap setup). Logging in through ldap works perfectly so the uri has to be right, otherwise we wouldn't be able to login to the server... I have also verify that by checking to log on the ldap server.


----------



## SirDice (May 26, 2010)

This shows something similar, there are a few options mentioned you could try.

http://www.liquidx.net/blog/2006/04/03/nss_ldap-undocumented-nss_reconnect_tries/


----------

