LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-10-2011, 10:59 AM   #1
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
Openldap alock problem - permissions look good


I have a openldap replica running syncrep that became corrupted irrecoverably yesterday. Since it is running syncrep I just deleted the database files and restarted it.
Now I can run openldap with this command
Code:
slapd -u ldap -f /etc/openldap/slapd.conf
but not with
Code:
# service ldap start
Checking configuration files for slapd:  bdb_db_open: alock package is unstable
backend_startup_one: bi_db_open failed! (-1)
slap_startup failed (test would succeed using the -u switch)
                                                           [FAILED]
stale lock files may be present in /var/lib/ldap           [WARNING]

I have removed the alock file from /var/lib/ldap and then run slapd_db_recover but I still get the same result.

I have seen this error be caused by file permissions but I cannot find a permission problem this time.

I found this in the init script that makes me wonder if the __db.001 should not exist?

Code:
	# Check the configuration file.
	if ! action $"Checking configuration files for $prog: " /sbin/runuser -m -s "$slaptest" -- "$user" $slaptestflags; then
		if /sbin/runuser -m -s "$slaptest" -- "$user" "-u" > /dev/null 2> /dev/null ; then
			dirs=`LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' /etc/openldap/slapd.conf | awk '{print $2}'`
			for directory in $dirs ; do
				if test -r $directory/__db.001 ; then
					echo -n $"stale lock files may be present in $directory" ; warning ; echo
				fi
			done
		fi
		exit 1
	fi
Permissions in /var/lib/ldap

Code:
# ll /var/lib/ldap
total 158856
-rw-r--r-- 1 ldap ldap      2048 May  9 22:43 alock
-rw------- 1 ldap ldap    356352 May  9 17:18 cn.bdb
-rw------- 1 ldap ldap     24576 May  9 22:43 __db.001
-rw------- 1 ldap ldap 159842304 May 10 10:58 __db.002
-rw------- 1 ldap ldap 536870912 May 10 10:58 __db.003
-rw------- 1 ldap ldap   2359296 May 10 10:55 __db.004
-rw------- 1 ldap ldap    352256 May 10 10:58 __db.005
-rw------- 1 ldap ldap     24576 May 10 10:55 __db.006
-rw-r----- 1 ldap ldap       920 May  9 16:22 DB_CONFIG
-rw------- 1 ldap ldap    249856 May  9 15:42 dn2id.bdb
-rw------- 1 ldap ldap     40960 May  9 17:09 entryUUID.bdb
-rw------- 1 ldap ldap     36864 May  9 17:09 gidNumber.bdb
-rw------- 1 ldap ldap    114688 May  9 17:09 givenName.bdb
-rw------- 1 ldap ldap   1277952 May  9 17:55 id2entry.bdb
-rw------- 1 ldap ldap  10485760 May  9 15:42 log.0000000001
-rw------- 1 ldap ldap  10485760 May 10 10:55 log.0000000002
-rw------- 1 ldap ldap     28672 May  9 17:18 loginShell.bdb
-rw------- 1 ldap ldap    208896 May  9 17:09 mail.bdb
-rw------- 1 ldap ldap    253952 May  9 15:42 memberUid.bdb
-rw------- 1 ldap ldap      8192 May  9 15:42 nisMapEntry.bdb
-rw------- 1 ldap ldap      8192 May  9 15:42 nisMapName.bdb
-rw------- 1 ldap ldap    114688 May  9 17:09 objectClass.bdb
-rw------- 1 ldap ldap      8192 May  9 15:42 ou.bdb
-rw------- 1 ldap ldap    200704 May  9 17:55 sn.bdb
-rw------- 1 ldap ldap    237568 May  9 17:09 uid.bdb
-rw------- 1 ldap ldap     36864 May  9 17:09 uidNumber.bdb
RHEL 5.6
openldap-servers-2.3.43-12.el5_5.2
openldap-2.3.43-12.el5_5.2
openldap-clients-2.3.43-12.el5_5.2
openldap-servers-overlays-2.3.43-12.el5_5.2
openldap-devel-2.3.43-12.el5_5.2

Last edited by frndrfoe; 05-10-2011 at 11:02 AM.
 
Old 05-10-2011, 04:44 PM   #2
Medievalist
Member
 
Registered: Aug 2003
Distribution: Dead Rat
Posts: 191

Rep: Reputation: 56
check /var/lib/ldap itself - can user ldap see it?

Have you checked the permissions on the /var/lib/ldap folder? Your file permissions look fine.
 
Old 05-10-2011, 06:04 PM   #3
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Original Poster
Rep: Reputation: 38
/var/lib/ldap perms:

Code:
drwx------  2 ldap ldap 4096 May  9 22:43 ldap
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenLDAP and Windows and permissions crock Linux - Networking 4 09-14-2011 03:29 PM
nss_ldap, openldap and openldap-server ... what is openldap for? chakkerz Linux - Server 2 08-13-2009 08:16 PM
LXer: OpenLDAP Quick Tips: OpenLDAP Logfile analysis LXer Syndicated Linux News 0 12-01-2008 05:00 PM
LXer: OpenLDAP Quick Tips: Regularly upgrade OpenLDAP! LXer Syndicated Linux News 0 11-25-2008 03:00 PM
Samba, openLDAP, pam_mount - permissions accarlson Linux - Server 1 08-21-2007 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration