Exchange Server 2013 setup fails creating Mailbox role

Posted: February 28, 2013 in Exchange, Solved
Tags: , , ,

There I was installing Exchange Server 2013 on a brand new Windows 2012 Server. All the pre-reqs went on fine, AD Schema extended, no problems, how simple could it be?

And yet, the setup itself fails!?!? I can’t even begin to understand how a vanilla setups on a clean fresh server could fail.

So, during the setup, it gets to :Step 7 of 14: Mailbox Role: Transport Service” and then fails with

Error:

The following error was generated when “$error.Clear();

          if ( ($server -eq $null) -and ($RoleIsDatacenter -ne $true) )

          {

            Update-RmsSharedIdentity -ServerName $RoleNetBIOSName

          }

        ” was run: “Database is mandatory on UserMailbox. Property Name: Database”.

Looks like Microsoft *still* haven’t been able to work out how to provide actual useful error messages.

At least it appears to be a known error, and there’s a KB article describing it. Although for Exchange 2010 I figured it should be close enough.
http://support.microsoft.com/kb/978776

So off to ADSIEDIT, delete the user as suggested. I can’t “recreate” the account because the powershell doesn’t work because Exchange isn’t installed yet! Next step is to rerun the  Mailbox role setup application… huh? What “application” would that be?

I tried just running the Setup again. It starts, tells me the previous setup failed and that it will try to continue. No choice if I want to either. Once it starts, it then seems to just stop at 0%. There’s no further activity I can detect. Any attempts to start the setup again result in the same, just stopping at 0%

SOLUTION:

So, technically this is partly my bad, however it is a similar problem that might be encountered if someone has an Exchange install fail part-way for whatever reason. In my case it was due to residual objects still being present in Active Directory from a previous Exchange 2010 install. The problem relates to the permissions on those old user objects where the new Exchange server doesn’t have the required permissions due to the old installation “owning” those objects.

  1. So, from here the fix was to Uninstall Exchange 2013 (or what little there actually was of it), reboot the server
  2. In AD Users and Computers, find and delete *all* those old Exchange mailbox type system accounts (Federatedemail, DiscoverySearchMailbox, HealthMailbox, Migration, SystemMailbox, etc.)
  3. Run the Exchange ADPrep again to recreate those accounts. This is instead of the step mentioned in the article to re-create the accounts as the ADPrep will take care of that
  4. Start Exchange setup again and it should complete correctly
Comments
  1. Siddhesh says:

    Thank you It save my time as well as solved my issue

  2. MS says:

    Thank you very much,
    you saved my day!

    works with cu2 too

  3. Philsson says:

    Thank you so much for this hint! I´ve been looking for a working solution for the whole day!

  4. Shredded_Brah says:

    Thank you – This works for cu3 too🙂

  5. mohamed says:

    how to clear exchange server 2013 error

    Error:
    The following error was generated when “$error.Clear();
    Install-ExchangeCertificate -WebSiteName “Exchange Back End” -services “IIS, POP, IMAP” -DomainController $RoleDomainController -InstallInTrustedRootCAIfSelfSigned $true
    if ($RoleIsDatacenter -ne $true -And $RoleIsPartnerHosted -ne $true)
    {
    Install-AuthCertificate -DomainController $RoleDomainController
    }
    ” was run: “Could not grant Network Service access to the certificate with thumbprint F9629D1AA0890E810D2E96270F63F889731BDD3B because a cryptographic exception was thrown.”.

    • Scott says:

      I don’t know the answer for that particular issue. A couple of thoughts come to mind though. Check your certificate services are working correctly and check if there is an expired certificate on the exchange server that needs to be renewed or removed.
      Is this a problem on an existing server, or something you are trying to upgrade? Maybe check the IIS config for old certificates also.

  6. John says:

    I’m having the exact same issue. Migrating from Exchange 2010 to 2013 and this very same thing happened to me. When I try to uninstall though I’m getting an error that the mailbox database has users in it. However I can’t get into ECP to see what’s it talking about. Any idea’s on how to empty the database so I can try this fix?

    • Scott says:

      I recall having something similar happen. From memory they are “hidden” system mailboxes or deleted user mailboxes that it still thinks are present. I can’t remember now but if I find some info about it again I’ll let you know.
      If you are sure you have migrated all users then you should be able to just force the uninstall, but there are probably people better suited than myself to advise on that.

      Maybe this link will help? http://exchangemaster.wordpress.com/2010/03/24/cannot-remove-a-mailbox-database-in-exchange-2010/

      • John says:

        Thanks for your reply. I appreciate it. All of my users are still on 2010. This is the very first 2013 server we are trying to install. It failed just like mentioned above so I’m trying to uninstall it, not the 2010 yet. Once it’s uninstalled I’ll delete those system mailboxes and try it again. The install process of 2013 must put a hidden mailbox in there that’s it’s complaining about during the uninstall.

  7. Anoop R says:

    I’m also having the exact same issue .We have exchange 2010 which is running on another machine. On a diffrent machine we are trying to install exch2013 on windows2012 to achieve coexistence

    But we are stuck on above error “Database is mandatory on UserMailbox.”.

    if we perform the below steps will it impact Exch2010 operation ?

    “1. “In AD Users and Computers, find and delete *all* those old Exchange mailbox type system accounts (Federatedemail, DiscoverySearchMailbox, HealthMailbox, Migration, SystemMailbox, etc.)”

    • Scott says:

      My instructions are more for doing a brute-force uninstall assuming there is no other exchange stuff you are trying to keep or co-exist with.

      In your case I’d say you probably wouldn’t want to do that. You could probably look at the properties of the accounts to see which ones were created recently when the 2013 install was attempted to see which are the ones created for each environment.

      I would advise extreme caution here. You may be better off asking this on the Exchange TechNet forums as you will find people who have a much better understanding of Exchange things like this than I do. Someone there may be able to help you work out exactly which entries belong to which environment.

  8. Anoop R says:

    Thanks Scott. Let me us know when you have a solution for this scenario

    • Scott says:

      I don’t work with Exchange regularly so it is unlikely I will be looking into this situation again. as such, I doubt there’s anything more I could help.

      To keep your co-existence working, you will really need to ask someone with more Exchange experience than me.

  9. Mike says:

    Let’s say it is your very first exchange 2013 server in coexistence and it fails as noted above…

    You go ahead and uninstall it. Then you go ahead and delete all the arbitration mailboxes using AD console.

    Won’t recreating the arbitration mailboxes using exchange 2013 “setup /prepareAD” fail because its version is newer???????? Afterall all you have is just exchange 2010 and no 2013

  10. Mike says:

    What I am trying is that “just before introducing the first exchange 2013 to the environment that already has 2010; can you run “setup /prepareAD” command from 2013 to recreate ALL the arbitration mailboxes.?”

    Thanks

    • Scott says:

      Yes, as per standard Exchange install you will need to prep AD for 2013.
      The problem I has was that the mailboxes were left over from an exchange 2010 install/uninstall gone bad and so the permissions on the prevented the 2013 prepare action working correctly. Manually removing those old objects resolved that issue.
      Just to repeat, the mailboxes were no longer in use as the old exchange did not exist. PrepareAD will recreate them again.

  11. Newb Hunter says:

    Thanks for taking the time to write this! Defitnetly saved me some time

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s