Freigeben über


Pull Subscription request fails with error “The Mailbox database is temporarily unavailable” on Exchange 2010

This is the first time I ran into this issue with Exchange Web Services while sending out a Pull Subscription request! The confusing part was that apart from the subscribe request everything else was working as expected. We could connect to the mailbox using EWS Editor, browse the Inbox and other folders, Delete Items and so on…

Below is the Request that was sent out:

 <?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages" 
            xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010" />
  </soap:Header>
  <soap:Body>
    <m:Subscribe>
      <m:PullSubscriptionRequest>
        <t:FolderIds>
          <t:DistinguishedFolderId Id="inbox" />
        </t:FolderIds>
        <t:EventTypes>
          <t:EventType>CopiedEvent</t:EventType>
          <t:EventType>CreatedEvent</t:EventType>
          <t:EventType>DeletedEvent</t:EventType>
          <t:EventType>ModifiedEvent</t:EventType>
          <t:EventType>MovedEvent</t:EventType>
          <t:EventType>NewMailEvent</t:EventType>
        </t:EventTypes>
        <t:Timeout>90</t:Timeout>
      </m:PullSubscriptionRequest>
    </m:Subscribe>
  </soap:Body>
</soap:Envelope>

Below is the Response we got:

 <s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
        <h:ServerVersionInfo MajorVersion="14" MinorVersion="1" MajorBuildNumber="289" MinorBuildNumber="6" Version="Exchange2010_SP1" 
                xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" xmlns="https://schemas.microsoft.com/exchange/services/2006/types" 
                xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema"/>
    </s:Header>
    <s:Body xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema">
        <m:SubscribeResponse xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
            <m:ResponseMessages>
                <m:SubscribeResponseMessage ResponseClass="Error">
                    <m:MessageText>The mailbox database is temporarily unavailable.</m:MessageText>
                    <m:ResponseCode>ErrorMailboxStoreUnavailable</m:ResponseCode>
                    <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
                </m:SubscribeResponseMessage>
            </m:ResponseMessages>
        </m:SubscribeResponse>
    </s:Body>
</s:Envelope>

Looking at the ETL trace it was found that the underlying error was MAPI_E_NETWORK_ERROR (0x80040115) and we also got to the function that was failing. This helped in searching the Source Code for Exchange 2010, the intent was to find out if there was a way we could reproduce a similar error using the Exchange Management Shell. Luckily we discovered that Move-Mailbox cmd-let would also do something similar!  We discovered that the customer was unable to move mailboxes from one database to another on the same Mailbox Server and was getting the error MapiExceptionNetworkError: Unable to make connection to the server. (hr=0x800004005, ec=2423). Which server are we taking about?

In this case it turns out that the CAS was not able to contact the Mailbox Server via NetBIOS name. Pinging the Mailbox with the NetBIOS name failed! Pinging the Mailbox with the FQDN worked! What was done to fix the problem?

In this case a DNS suffix was added (DNS tab in the Advanced TCP/IP Settings) and now pinging the Mailbox with the NetBIOS name WORKED! Did the Move-Mailbox work? YES! Did the Subscribe Request work? YES!

Enjoy!