slapd hangs in nss configuration

Marcus I. Ryan marcus at riboflavin.net
Mon Jun 26 02:26:33 UTC 2006


I'm trying to set up NSS with an OpenLDAP backend on one server.  When  
I try to start slapd after I've enabled nss, slapd hangs and won't  
start.  It seems to relate directly to group nss because if I simply  
change the nsswitch.conf to be:

passwd: files ldap
groups: files

slapd starts fine.  As soon as I add ldap to the groups line, slapd  
won't start.  All involved groups I can think of (wheel, ldap, etc.)  
are in the local groups file.  I tried "groups: files [success=return]  
ldap" as well, but either way it still tries to go to ldap.

Truss shows it's not exactly hanging, but it's stuck in a loop -- the  
same truss output keeps repeating:

83287: poll({11 0x0|IN|PRI|NVAL|RDNORM|RDBAND|WRBAND },1,30000) = 0 (0x0)
83287: shutdown(0xb,0x2)                         = 0 (0x0)
83287: close(11)                                 = 0 (0x0)
83287: gettimeofday({1151263559 839848},0x0)     = 0 (0x0)
83287: getpid()                                  = 83287 (0x14557)
83287: sendto(0x3,0x7fffffffca50,0,0x0,NULL,0x0) = 118 (0x76)
83287: stat("/usr/local/etc/nss_ldap.conf",0x7fffffffce90) = 0 (0x0)
83287: getpid()                                  = 83287 (0x14557)
83287: geteuid()                                 = 0 (0x0)
83287: socket(0x1,0x1,0x0)                       = 11 (0xb)
83287: fcntl(11,F_GETFL,0x80122ebe4)             = 2 (0x2)
83287: fcntl(11,F_SETFL,0x6)                     = 0 (0x0)
83287: connect(0xb,{ AF_UNIX "/var/run/openldap/ldapi" },106) ERR#61  
'Connection refused'
83287: shutdown(0xb,0x2)                         = 0 (0x0)
83287: close(11)                                 = 0 (0x0)
83287: gettimeofday({1151263559 840968},0x0)     = 0 (0x0)
83287: getpid()                                  = 83287 (0x14557)
83287: sendto(0x3,0x7fffffffca50,0,0x0,NULL,0x0) = 142 (0x8e)
83287: gettimeofday({1151263559 841282},0x0)     = 0 (0x0)
83287: getpid()                                  = 83287 (0x14557)
83287: sendto(0x3,0x7fffffffca50,0,0x0,NULL,0x0) = 97 (0x61)
83287: nanosleep({16 0})                         = 0 (0x0)
83287: stat("/usr/local/etc/nss_ldap.conf",0x7fffffffce90) = 0 (0x0)
83287: getpid()                                  = 83287 (0x14557)
83287: geteuid()                                 = 0 (0x0)
83287: socket(0x2,0x1,0x0)                       = 11 (0xb)
83287: setsockopt(0xb,0x6,0x1,0x7fffffffd014,0x4) = 0 (0x0)
83287: fcntl(11,F_GETFL,0x80122ebe4)             = 2 (0x2)
83287: fcntl(11,F_SETFL,0x6)                     = 0 (0x0)
83287: connect(0xb,{ AF_INET 127.0.0.1:389 },16) ERR#36 'Operation now  
in progress'

I'm pretty well stumped at this point, except to update the slapd  
startup script to update nsswitch.conf...

-- 
Marcus I. Ryan, marcus at riboflavin.net
--------------------------------------------------------------------
Hanlon's Razor:  Never attribute to malice that which is adequately
explained by stupidity.
--------------------------------------------------------------------







More information about the freebsd-questions mailing list