Table of Content
    Exchange Server Recovery

    How to Fix Error – HR 0x80004005 EC 1142?


    Table of Content

      Summary: The error hr 0x80004005 ec 1142 may occur while adding a database copy or moving a mailbox from one database on a server to another database in a DAG setup. In this post, we’ve mentioned the solutions to resolve this error. We’ve also mentioned an Exchange repair tool that can help repair and recover the database in case it is corrupted.

      In an Exchange Server system with high availability, you need to make use of Database Availability Groups (DAG). In a DAG setup, two or more nodes replicate between each other to ensure high availability of data in case of issues with hardware, software, or during planned maintenance. The system offers automatic failover of services as well.

      You may encounter the “hr 0x80004005 ec 1142” error during the normal operation of the system when adding a database copy or moving a mailbox from one database on a server to another database on the secondary server.  

      The problem may occur if the server queue size is limited. You might get this error when implementing a multi-mailbox search with lots of search options.

      The event log would read the following error:

      The Microsoft Exchange Mailbox Replication service was unable to process jobs in a mailbox database.

      Database: DBX01
      Error: MapiExceptionRecoveryMDBMismatch: Unable to open message store. (hr=0x80004005, ec=1165)
      Diagnostic context:
          Lid: 55847   EMSMDBPOOL.EcPoolSessionDoRpc called [length=132]
          Lid: 43559   EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x0][length=248][latency=0]
      You might also encounter the below error:
      Probe: EdiscoveryDeepTestProbe/SRV-EXC-001
      Latency: 0ms
      Error: MapiExceptionMdbOffline: Multi Mailbox Keyword Stats Search failed. (hr=0x80004005, ec=1142)
      Diagnostic context:
          Lid: 49384 
          Lid: 51176   StoreEc: 0x476    
          Lid: 40680   StoreEc: 0x476    
          Lid: 46696   StoreEc: 0x476    
          Lid: 63080 
          Lid: 38504   StoreEc: 0x476    
          Lid: 58984 
          Lid: 34408   StoreEc: 0x476    
      Details:
      Log:
      -------------------------------------------------------------------------------
      States of all monitors within the health set:
      Note: Data may be stale. To get current data, run: Get-ServerHealth -Identity 'SRV-EXC-001' -HealthSet 'Ediscovery.Protocol'

      When creating a database copy and trying to add it to the Database Availability Group (DAG), you may get the following error during the seeding process.

      The seeding operation failed. Error: An error occurred while performing the seed operation. Error: Failed to open a log truncation context to source server 'EXSRV01.domain.com'. Hresult: 0xc7ff07d7. Error: Failed to open a log truncation context because the Microsoft Exchange Information Store service is not running. [Database: DB01, Server: EXSRV01.domain.com]

      To troubleshoot the issue, you can use the Test-MapiConnectivity command.

      test-mapiconnectivity cmdlet

      This command will verify the server’s functionality. It will verify that the MAPI server, Exchange Store, and Directory Service Access (DAccess) are working fine.

      unspaceId  : e8a087f1-6197-48df-b094-d5c93a7b6070
      Server      : SRV01
      Database    : DB01
      Mailbox     : SystemMailbox{123e8d54-4444-484a-a0a3-58f22d73236f}
      MailboxGuid :
      IsArchive   :
      Result      : *FAILURE*
      Latency     : 00:00:00
      Error       : [Microsoft.Exchange.Data.Storage.MailboxOfflineException]: Cannot open mailbox /o=First
      Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=SRV01/cn=Microsoft System Attendant. Inner error
      [Microsoft.Mapi.MapiExceptionMdbOffline]: MapiExceptionMdbOffline: Unable to make connection to the server. (hr=0x80004005, ec=1142)

      Solutions to Resolve the hr 0x80004005 ec 1142 Error

      • Communication is the key when having a failover system. If this is working fine, you can trace back changes in the network. A good network is crucial. Closing a port or a protocol could lead to such cases.
      • Apart from the network, you must investigate the firewall changes before the day of the issue. You must check the network firewall and Windows firewall as well.
      • If there were no changes to the network, you must check for any changes to the operating system of both servers. Any installation of third-party applications or changes in the configuration of already installed applications, such as backup or antivirus applications, can also cause such issues.
      • Another option is to try to test the move to another database on the same server or test the move to a new database on another server using the New-MoveRequest command.
      New-MoveRequest -Identity '<mailbox>' -TargetDatabase "<database name>"
      new move request cmdlet

      If the above solution does not work, you can try to reseed the content index catalog. This can be executed by using the Update-MailboxDatabaseCopy command.

      Update-MailboxDatabaseCopy -Identity <database>\<server> -CatalogOnly

      You can use a specific source server using the below command.

      Update-MailboxDatabaseCopy -Identity <database>\<server> -SourceServer <server> -CatalogOnly

      If the culprit database is the only copy of the mailbox database, you need to stop the following services using the commands below.

      Stop-Service MSExchangeFastSearch
      Stop-Service HostControllerService

      After the services are stopped, you need to delete, move, or rename the contents of the following folder.

      %ExchangeInstallPath%Mailbox\<name of mailbox database>_Catalog\<GUID>12.1.Single

      Once the files are deleted, moved, or the folder is renamed, you need to start the services.

      Start-Service MSExchangeFastSearch
      Start-Service HostControllerService

      To Conclude

      If the above solutions do not work, it indicates that the destination database is corrupt or not functioning well. In such a case, EseUtil could help in fixing small issues. But when it comes to recovering data from a damaged database, you will need a very good application, such as Stellar Repair for Exchange.

      With Stellar Repair for Exchange, you can open any version of the Exchange Server database (EDB) file. You can open a corrupt mailbox database or database which is in a Dirty Shutdown state. With this application, you can open multiple database files with no size restriction. After a quick scan or a deep scan of the database, you will be presented with an Outlook-style interface where you can browse through the datastore and all the user mailboxes. Apart from this, you can also browse archives, and disabled mailboxes, shared mailboxes, and public folders.  

      The application allows you to export multiple objects and public folders to PST, EML, MSG, HTML, and PDF formats. Apart from this, the application can be used as a tool to move the data to another Exchange Server or Office 365 tenant, without having to export and import it into the new system.

      Stellar Repair for Exchange is the best tool to keep in your essential tools to resolve issues as quickly as possible, limiting data loss, and reducing the time of recovery for the business.

      Was this article helpful?

      No NO

      About The Author

      Ravi Singh linkdin

      Ravi Singh is a Senior Writer at Stellar®. He is an expert Tech Explainer, IoT enthusiast, and a passionate nerd with over 7 years of experience in technical writing. He writes about Microsoft Exchange, Microsoft 365, Email Migration, Linux, Windows, Mac, DIY Tech, and Smart Home. Ravi spends most of his weekends working with IoT (DIY Smart Home) devices and playing Overwatch. He is also a solo traveler who loves hiking and exploring new trails.

      Leave a comment

      Your email address will not be published. Required fields are marked *

      Image Captcha
      Refresh Image Captcha

      Enter Captcha Here :

      Related Posts

      WHY STELLAR® IS GLOBAL LEADER

      Why Choose Stellar?

      • 0M+

        Customers

      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+

        Countries

      • 0+

        PARTNERS

      • 0+

        Awards Received