Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack (5) Thread Tools Display Modes
  #11 (permalink)  
Old 09-16-2008, 02:38 PM
Junior Member
 
Posts: 5
Default Addition

I have to add, that I can db_recover the oldish backup:
Code:
zimbra@zimbra:~$ tar xfj openldap-data-20080830.tbz 
zimbra@zimbra:~$ cd openldap-data
zimbra@zimbra:~/openldap-data$ /opt/zimbra/sleepycat/bin/db_recover -c
zimbra@zimbra:~/openldap-data$ /opt/zimbra/sleepycat/bin/db_recover   
zimbra@zimbra:~/openldap-data$ ls logs/
log.0000000228  log.0000000229
But after a while the ldap seems to write the next log file (log.0000000191) and chokes on that one afterwards. Maybe because of different versions of the BDB database.

However, I'm lost.

-jsl
Reply With Quote
  #12 (permalink)  
Old 09-16-2008, 03:43 PM
Zimbra Employee
 
Posts: 393
Default

Quote:
Originally Posted by jsilence View Post
Code:
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): Ignoring log file: /opt/zimbra/openldap-data/logs/log.0000000191: magic number 0, not 40988 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): Invalid log file: log.0000000191: Invalid argument 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): First log record not found 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): PANIC: Invalid argument 
Sep  8 09:06:02 zimbra slapd[4207]: bdb_db_open: Database cannot be recovered, err -30978. Restore from backup! 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): DB_ENV->lock_id_free interface requires an environment configured for the locking subsystem 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): txn_checkpoint interface requires an environment configured for the transaction subsystem 
Sep  8 09:06:02 zimbra slapd[4207]: bdb_db_close: txn_checkpoint failed: Invalid argument (22) 
Sep  8 09:06:02 zimbra slapd[4207]: backend_startup_one: bi_db_open failed! (-30978) 
Sep  8 09:06:02 zimbra slapd[4207]: bdb_db_close: alock_close failed 
Sep  8 09:06:02 zimbra slapd[4207]: slapd stopped.
Are you using a VM such as Xen instead of real hardware?

And yes, you must use
Code:
-b ''
as part of your slapadd command.
__________________
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
Reply With Quote
  #13 (permalink)  
Old 09-17-2008, 02:33 AM
Junior Member
 
Posts: 5
Default VMWare

Yes I am running Zimbra in a VMWare virtual Machine. Ubuntu JeOS on a VMWare Server 1.0.4. So far it was running pretty smooth.

I will try -b '' tonight and report.

Thanks,

-jsl
Reply With Quote
  #14 (permalink)  
Old 09-18-2008, 03:55 AM
Junior Member
 
Posts: 5
Default Maybe solved

Up until now, starting from my latest recuing attempt, the system is running smoothly.

After a restore from the oldish backup, including slapadd action with the latest ldif dump, I did a 'db_upgrade' in the openldap-data directory. It came back without any output, but I have the impression, that this did the trick for me.

Keeping my fingers crossed, thanks for helping...

-jsl
Reply With Quote
  #15 (permalink)  
Old 01-19-2009, 08:27 PM
Active Member
 
Posts: 31
Default Forums saved my ldap after power loss!

I just keep having customers do 'customer' stuff... and then I visit the forums to figure out what they have 'customer'd' up! This was also a power loss. I followed everything and this is what happened..

1. # su - zimbra
2. $ ldap stop
3. $ cd /opt/zimbra/openldap-data
4. $ /opt/zimbra/sleepycat/bin/db_recover
... Still get all the Panic stuff
Then...
1. # su - zimbra
2. $ ldap stop
3. $ exit
4. # mv /opt/zimbra/openldap-data /opt/zimbra/openldap-01-19-2009-crash
5. # mkdir /opt/zimbra/openldap-data
6. # cp /opt/zimbra/openldap-data-01-19-2009-crash/DB_CONFIG /opt/zimbra/openldap-data/DB_CONFIG
7. # chown -R zimbra:zimbra /opt/zimbra/openldap-data
8. # su - zimbra
9. $ ~/openldap/sbin/slapadd -w -q -f ~/conf/slapd.conf -l /opt/zimbra/backup/sessions/incr-20090118.xx.x.x.x.x./ldap.bak
10. $ ~/openldap/sbin/slapindex -f ~/conf/slapd.conf
11. $ ldap start

This still didn't work..

So, now that I know exactly where the backup stuff is (because of step 9) and thinking that I was not far away from having to copy that backup data and wipe this box, I copied the stuff in /opt/zimbra/backup/sessions/incr-20090118.xxx.xxx/ldap/ (file path was a little different from the example.. and I can't remember the version they were on). Basically, I copied the db directory (which was empty) from the crashed copy and I copied the logs dir from the crashed copy.. both went into the newly populated /opt/zimbra/openldap-data directory. I did number 7 again.. then I did the below

1. cd /opt/zimbra/openldap-data
2. e/opt/zimbra/sleepycat/bin/db_recover

Which is exactly what I did to begin with. Then...
zmcontrol start
.. and it worked...

So I basically made sure my old ldap-data directory was out of the way.. used these commands (lines 5-10) to get as much fresh.. get the rest from backups and it worked..

It was a little different than spelled out.. so I thought I would share.

Thanks to everyone that jumps in the forums and writes all this stuff down!

Last edited by ipguru99 : 02-14-2009 at 04:06 PM. Reason: sleep deprivation -- customer did it again and I had to look at this.. and I couldn't even figure out what I wrote..
Reply With Quote
  #16 (permalink)  
Old 01-19-2009, 08:35 PM
Partner (VAR/HSP)
 
Posts: 184
Default

Well done and a special blessing to all those customers (that keep us employed).
Reply With Quote
  #17 (permalink)  
Old 01-19-2009, 08:53 PM
Zimbra Employee
 
Posts: 393
Default

Was this a master server rather than a replica? What release?
__________________
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
Reply With Quote
  #18 (permalink)  
Old 01-19-2009, 09:03 PM
Active Member
 
Posts: 31
Default

Release 5.0.5_GA_2201.UBUNTU6 UBUNTU6 NETWORK edition

Just a single server...
Reply With Quote
  #19 (permalink)  
Old 05-14-2009, 06:40 AM
New Member
 
Posts: 3
Default db_recover not working.

Someone knows what to do if db_recover doesn't work.

The problem is that the server configuration cn=mx01.xxxxx.com,cn=servers,cn=zimbra registry is truncated. I tried to modify or delete it using ldapmodify but I'm getting the following error:

deleting entry "cn=mx01.xxxxx.com,cn=servers,cn=zimbra"
ldapmodify: Internal (implementation specific) error (80)
additional info: internal error

The database has corrupted after a power fail. Trying to cat ldap db I'm gettint:

Code:
openldap/sbin/slapcat -f /opt/zimbra/conf/slapd.conf
entry_header: attribute count was zero

I could cat (not everything) doing

Code:
ldapsearch -h localhost -x -D "uid=zimbra,cn=admins,cn=zimbra" -w password
I will appreciate any kind of idea.
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0