ldap crashes

Issues related to applications and software problems
Post Reply
leof
Posts: 4
Joined: 2012/06/04 19:53:54

ldap crashes

Post by leof » 2014/04/21 17:00:51

Hello,
I have the following problem with using ldapadd:
I have to add an employee.ldif file to ldap. That's what I'm doing:

Code: Select all

#Ldap-Verzeichnis löschen
/etc/init.d/slapd stop
rm -f /var/lib/ldap/*
/etc/init.d/slapd start

# ldapadd data_structure.ldif
ldapadd -x -D "cn=admin,dc=company,dc=de" -f data_structure.ldif -w mypassword -c >> /etc/Skripte/logs/import-openLDAP.log 2>> /etc/Skripte/logs/import-openLDAP_ERRORS.log

# ldapadd generated_entrys.ldif
ldapadd -x -D "cn=admin,dc=company,dc=de" -f import.UTF8.employee.ldif -w mypassword -c >> /etc/Skripte/logs/import-openLDAP.log 2>> /etc/Skripte/logs/import-openLDAP_ERRORS.log

# slapindex
/etc/init.d/slapd stop
slapindex 2>> /etc/Skripte/logs/import-openLDAP_ERRORS.log
/etc/init.d/slapd start
Unfortunately, after a random time the ldap crashes and its service is no longer available. It appers the error Message:

Code: Select all

ldap_result: Can't contact LDAP server (-1)
ldapadd: update failed: cn=xxx,ou=people1,dc=company,dc=de
The employee.ldif-file is ok. There is enough space on disk.
Why is ist that the process is crashing? How do I figuere out, why this happens?
Thanks and sorry for my terrible english ;-)

Leo

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: ldap crashes

Post by avij » 2014/04/21 17:34:04

Does /var/log/messages have any interesting entries related to ldap?

leof
Posts: 4
Joined: 2012/06/04 19:53:54

Re: ldap crashes

Post by leof » 2014/04/22 20:36:01

Hi avij,
sorry for my late reply.
Here is the ldap.log of one ldapadd-command:

Code: Select all

Apr 22 22:10:41 intranet slapd[17319]: conn=2065 fd=19 ACCEPT from IP=127.0.0.1:55024 (IP=0.0.0.0:389)
Apr 22 22:10:41 intranet slapd[17319]: conn=2065 op=0 BIND dn="cn=admin,dc=company,dc=de" method=128
Apr 22 22:10:41 intranet slapd[17319]: conn=2065 op=0 BIND dn="cn=admin,dc=company,dc=de" mech=SIMPLE ssf=0
Apr 22 22:10:41 intranet slapd[17319]: conn=2065 op=0 RESULT tag=97 err=0 text=
Apr 22 22:10:41 intranet slapd[17319]: conn=2065 op=1 ADD dn="cn=lorem ipsum,ou=people1,dc=company,dc=de"
Apr 22 22:10:41 intranet slapd[17319]: conn=2065 op=2 ADD dn="cn=lorem ipsum,ou=people1,dc=company,dc=de"
Apr 22 22:10:41 intranet slapd[17319]: conn=2065 op=1 RESULT tag=105 err=0 text=
[...]
Apr 22 22:18:54 intranet slapd[17319]: conn=2065 op=3088 ADD dn="cn=lorem ipsum,ou=people1,dc=company,dc=de"
Apr 22 22:18:54 intranet slapd[17319]: conn=2065 op=3087 RESULT tag=105 err=0 text=
Apr 22 22:18:54 intranet slapd[17319]: conn=2065 op=3089 ADD dn="cn=lorem ipsum,ou=people1,dc=company,dc=de"
Apr 22 22:18:54 intranet slapd[17319]: conn=2065 op=3088 RESULT tag=105 err=0 text=
Apr 22 22:18:54 intranet slapd[17319]: conn=2065 op=3090 ADD dn="cn=lorem ipsum,ou=people1,dc=company,dc=de"
Apr 22 22:18:54 intranet slapd[17319]: conn=2065 op=3089 RESULT tag=105 err=0 text=
Apr 22 22:18:54 intranet slapd[17319]: conn=2065 op=3091 ADD dn="cn=LAST ADDED PERSON,ou=people1,dc=company,dc=de"
Apr 22 22:18:54 intranet slapd[17319]: conn=2065 op=3090 RESULT tag=105 err=0 text=
Apr 22 22:19:32 intranet slapd[17319]: conn=2065 op=3091 RESULT tag=105 err=0 text=
Apr 22 22:19:32 intranet slapd[17319]: conn=2065 fd=19 closed (idletimeout)
Apr 22 22:19:32 intranet slapd[17319]: connection_read(19): no connection!
The terminal displays after the "LAST ADDED PERSON" the errormessage:

Code: Select all

ldap_result: Can't contact LDAP server (-1)
ldapadd: update failed: cn=LAST ADDED PERSON,ou=people1,dc=company,dc=de
That goes on for the next 40000 contacts...

It is normal, that the op-numbers are so messed up?
Why ist there an idletimeout?
Goog night,
Leo

Post Reply