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 Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-10-2010, 02:31 PM
Active Member
 
Posts: 48
Default Zimbra service wont start after shutdown.

Server details.

OS: RHEL5.4 x64
version of zimbra: 6.0.7_GA_2473.RHEL5_64 RHE5_64 FOSS edition

This saturday night 10-09-2010 I powered off the server for a scheduled power outage. The next morning when I turned the server back on it would not get past the starting ldap. It puts up the following error.

[root@email ~]# service zimbra start
Host email.gat.com
Starting ldap...Done.
Failed.
Failed to start slapd. Attempting debug start to determine error.
bdb_db_close: database "": txn_checkpoint failed: Invalid argument (22).
backend_startup_one (type=hdb, suffix=""): bi_db_open failed! (22)
bdb_db_close: database "": alock_close failed

Here is what the /var/log/zimbra shows when attempting to start

Oct 10 14:04:32 email slapd[10384]: @(#) $OpenLDAP: slapd 2.4.22 (Jun 10 2010 14:02:07) $ build@build11.lab.zimbra.com:/home/build/p4/main/ThirdParty/openldap/openldap-2.4.22.3z/servers/slapd
Oct 10 14:04:32 email slapd[10384]: hdb_db_open: database "" cannot be opened, err 22. Restore from backup!
Oct 10 14:04:32 email slapd[10384]: bdb(): txn_checkpoint interface requires an environment configured for the transaction subsystem
Oct 10 14:04:32 email slapd[10384]: bdb_db_close: database "": txn_checkpoint failed: Invalid argument (22).
Oct 10 14:04:32 email slapd[10384]: backend_startup_one (type=hdb, suffix=""): bi_db_open failed! (22)
Oct 10 14:04:32 email slapd[10384]: bdb_db_close: database "": alock_close failed
Oct 10 14:04:32 email slapd[10384]: slapd stopped.


About backups. I make a nightly snapshot of the server @1:45AM. It is based off a method posted here in the forums. The way the snapshot works is that I have a script that does a /sbin/service zimbra stop. It then does an rsync of the /opt/zimbra to another computer. It also rsyncs the / partition minus /opt /proc /sys and /dev to the same computer under /opt/os-backup. So effectivly I have a complete snapshot of the the server in a working state. The night before the shutdown it stopped the processes synced and restarted them without issue.

I searched the zimbra forums for "bdb_db_close: database "": txn_checkpoint failed: Invalid argument (22)." but everything I find seems to be out of date as the solutions to do is posted. Can anyone help me out here?

My next step is to restore from the snapshot on the 8th.
Reply With Quote
  #2 (permalink)  
Old 10-10-2010, 11:10 PM
Zimbra Consultant & Moderator
 
Posts: 20,313
Default

The answers in the forums are valid for your problem: site:zimbra.com +solved +"txn_checkpoint failed: Invalid argument" - Yahoo! Search Results
__________________
Regards


Bill
Reply With Quote
  #3 (permalink)  
Old 10-10-2010, 11:49 PM
Active Member
 
Posts: 48
Default

All the solutions do not match the path structure for Zimbra 6.x. They all assume version 5.x or older. For example the solution in one of the solved threads say to do this.

Code:
 cd /opt/zimbra/openldap-data
/opt/zimbra/sleepycat/bin/db_recover
I don't have a "/opt/zimbra/sleepycat/bin/db_recover" Or "/opt/zimbra/openldap-data"

When I do a locate for db_recover I get..

/opt/zimbra/bdb-4.7.25.4/bin/db_recover

When I do a locate for openldap-data I get..

/opt/zimbra/openldap-2.4.22.3z/var/openldap-data

Should I do the following?

Code:
su - zimbra

cd /opt/zimbra/openldap-2.4.22.3z/var/openldap-data

/opt/zimbra/bdb-4.7.25.4/bin/db_recover
Reply With Quote
  #4 (permalink)  
Old 10-11-2010, 07:17 AM
Active Member
 
Posts: 48
Default

It appears that in version 6.x the ldap info is now stored in the following location.

/opt/zimbra/data/ldap/hdb/db

Do I need to move into that directory and then run the db_recover?

I have rsynced over the snapshot from the night before shutdown and I'm still getting the same error when trying to start Zimbra. I don't understand why the backup did not work. Assuming the database was corrupted before the backup I would expect Zimbra to have failed to start after the backup ran and the script started the Zimbra processes again. The data I rsynced over was what Zimbra successfully started with. So the only difference was the computers were shutdown about 15 hours later after the backup. I checked the dates of files on the backup and there is nothing older than the night it did the sync before the power shutdown.
Reply With Quote
  #5 (permalink)  
Old 10-11-2010, 08:30 AM
Active Member
 
Posts: 48
Default

OK, apparently that /opt/zimbra/data/ldap/hdb/db directory was it. My server is now back up and running. I think I removed about 10 years off my live this weekend. I hope this kicks management in the butt to actually pay for the supported version.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.