PDA

View Full Version : slapd became too slow to start ... all of a sudden



rdcampos_br
8th September 2006, 03:51 AM
Hi.

I'm new to the forum, so forgive me if this is the wrong place to post this question.

I began to use Fedora 5 recently and I have to install openLDAP and all sort of related software that need authentication (samba, postfix, imap, etc). I installed the LDAP service and I begun to play with the basic clients (I mean ldapadd, ldapmodify, and so on).

I thought I had done a good job, until I had to restart openLDAP today morning. After I issued a "service ldap restart" command, it took more than 8 minutes to accomplish the start of the service:

[root@rdc init.d]# date
Qui Set 7 23:17:59 BRT 2006
[root@rdc init.d]# service ldap start
Conferindo arquivos de configuraçãoo para slapd:
WARNING: No dynamic config support for database ldbm.
config file testing succeeded
[ OK ]
Iniciando slapd: date
[ OK ]
[root@rdc init.d]# date
Qui Set 7 23:26:17 BRT 2006

After some of investigation, I tried to start slapd directly from a shell window, using strace to log what was going on. From this log I saw that slapd, after reading a lot of files, got a socket and bound it to port 389, from where it could begin to listen to clients. The curious thing is that even after this binding I could not see the listening port using netstat -a. I could not find any accept system call, either, what seems to be necessary for the completion of the binding.

Just after the bind system call, slapd enters a loop where it tries to connect to itself, if I understood the log. It is only after this loop that it finally ends the start process. It looks like it was waiting for the port be listening.

This is what I get when I try to start the service directly from the shell, with the debug option, but with no strace:

[root@rdc init.d]# /usr/sbin/slapd -4 -d 255 -h ldap:/// -u ldap
@(#) $OpenLDAP: slapd 2.3.19 (Feb 13 2006 11:19:24) $
root@ls20-bc1-14.build.redhat.com:/usr/src/build/708086-i386/BUILD/openldap-2.3.19/openldap-2.3.19/build-servers/servers/slapd
daemon_init: ldap:///
daemon_init: listen on ldap:///
daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap:///)
daemon: listener initialized ldap:///
daemon_init: 1 listeners opened

At this point it stops and begins to wait.

Does anyone have any idea about what could be happening? Did anyone got the same kind of problem?

I didn't post the strace log messages to save space. If someone needs to have it, just ask.

Thank you.

Ricardo