LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-22-2006, 08:17 PM   #1
wslyhbb
Member
 
Registered: Apr 2002
Location: Chicago, IL
Distribution: Mandriva 2009.0 PowerPack x86_64
Posts: 150

Rep: Reputation: 15
Need Help, LDAP + BDB issue


My Linux computer was working great, then it flipped out and I could do nothing but reset. When it rebooted, LDAP refused to start. The error in the log says, "unable to join the environment" and "bdb_db_open: dbenv_open failed: Resource temporarily unavailable (11)".

Can anyone tell me what is wrong and how I can fix it and get my LDAP server back up?
 
Old 04-22-2006, 08:41 PM   #2
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
Most likely, your BDB needs to be recovered. This is like "fsck" for filesystems.

Stop LDAP if it's up, and run "db_recover -h <wherever-your-bdb-is>". It will probably take a long time. After it's done:

If it doesn't complain, run "db_archive -d -h <wherever-your-bdb-is>". This will make recovery quicker for the next time, and should be run periodically as part of general maintanence.

If it DOES complain, try "db_recover -c -h <wherever-your-bdb-is>". This will take a REALLY long time but it might save your bacon.

Your db_* tools might be called something like db4.4_* instead - look around for them.
 
Old 04-22-2006, 09:01 PM   #3
wslyhbb
Member
 
Registered: Apr 2002
Location: Chicago, IL
Distribution: Mandriva 2009.0 PowerPack x86_64
Posts: 150

Original Poster
Rep: Reputation: 15
Thanks for the reply. I did db_recover -c -h /var/lib/ldap but I am still getting the same error. Actually after I do db_recover, it screws up the permissions and when I try to start ldap the log says permission denied to __db.001, I fix the permissions and try starting ldap again, then I am back to the unable to join environment error.
 
Old 04-22-2006, 09:12 PM   #4
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
Does db_recover produce any output at all?
 
Old 04-22-2006, 09:15 PM   #5
wslyhbb
Member
 
Registered: Apr 2002
Location: Chicago, IL
Distribution: Mandriva 2009.0 PowerPack x86_64
Posts: 150

Original Poster
Rep: Reputation: 15
Yeah. db_recover -c -h /var/lib/ldap -v
db_recover: unable to join the environment
db_recover: Finding last valid log LSN: file: 1 offset 681621
db_recover: Recovery starting from [1][28]
db_recover: Recovery complete at Sat Apr 22 21:14:46 2006
db_recover: Maximum transaction ID 8000019b Recovery checkpoint [1][681621]
 
Old 04-22-2006, 09:34 PM   #6
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
That "unable to join the environment" is your problem. db_recover can't open the DB either. All I could dig up on that error was dead ends, especially on Red Hat 9.
 
Old 04-23-2006, 11:14 AM   #7
wslyhbb
Member
 
Registered: Apr 2002
Location: Chicago, IL
Distribution: Mandriva 2009.0 PowerPack x86_64
Posts: 150

Original Poster
Rep: Reputation: 15
Alright. Can you tell me how I can start over :-(? What do I need to delete to get LDAP start again with an empty directory?
 
Old 04-25-2006, 08:23 PM   #8
wslyhbb
Member
 
Registered: Apr 2002
Location: Chicago, IL
Distribution: Mandriva 2009.0 PowerPack x86_64
Posts: 150

Original Poster
Rep: Reputation: 15
Ok, so I did not feel like rebuilding my directory and was quite unmotivated about it, as starting from scratch can do to you. Then tonight I got motivated enough that I decided to backup the db files, uninstall the openldap-server RPM, reinstall it, and start the server. Everything worked fine at that point, but obviously bare directory. So I copied my configs back in and restarted the server, still working, ok, what would happen if I copied the db files back to the directory. I restarted it, uh ok it is running, so if I do an LDAP search will it find the entries, in fact it did. I was so excited to find I was back in business with no data loss :-). But I think from now on, I will keep a backup ;-).
 
  


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
ldap nfs login issue berrance Linux - Software 1 12-09-2006 05:46 PM
bdb install procfs Linux - Software 3 03-27-2006 03:27 PM
XsIM on Slackware 9.1 BDB? mifrai Linux - Software 1 01-25-2004 11:32 PM
OpenLDAP and BDB (long) GAVollink Linux - Software 1 07-24-2003 08:28 AM
Mysql-BDB Data Base driver rwelch Linux - General 1 03-19-2003 06:46 AM


All times are GMT -5. The time now is 01:52 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration