I find Exchange’s installation process a little fragile, so I carefully followed the instructions to install Exchange Server 2016 using Cumulative Update 12. And it seemed to work. I got as far as logging in as Administrator in the web portal and noticing there were expected things on the screen.
Then some automatic updates were applied, and, well, oh dear. There was a conflict between the Windows 2016 cumulative update for April 2019 and update KB4487563 for Exchange CU12. In consequence, both failed to install.
After their failure, I could log in to the Exchange web portal, but got HTTP error 500. Something had gone badly wrong.
I went online to find out what people had reported, and discovered that a frequent cause of my problems was that updates turn exchange services off, but, if they fail, they don’t turn them back on. That was the case for my server, so I turned them back on, mostly.
Great, I thought, and then logged on, and got the same error 500. That was not a moment of joy.
Beyond the services’ reticence, what was said on the web about this problem — a fresh install followed by an http 500 error — was vocal and expansive but arbitrary and useless to me. There were lots of causes and lots of solutions, but few had anything in common with each other. Everyone had their own opinion and their own way out. Clearly the problem could have many causes.
I tried a couple of things suggested, and nothing worked. This was not encouraging.
In the end, I realised I’d have to diagnose the problem myself. I was trying to avoid this mostly because I’m a bash man, I dislike the wasteful verbosity of powershell. Still, it is powerful, so I loaded up the Exchange Management Shell.
I ran the command to get a list of exchange scripts, and found there are lots of them, including some test scripts. I ran these test scripts, and some information scripts, and eventually discovered something had badly borked the installation: I had no mailbox database. A mail server without mailboxes?! WTF?!
I’m pretty sure the failed update must have broken the existing, rather empty, mailbox database, because I logged in (once) before the update charged into its valley of death. I suspect it either interrupted and borked a post installation task, or it had to upgrade the mailbox database but couldn’t handle an empty one. Whatever, it’s not worth my time to identify the exact problem, given that nice Mr. Gates isn’t paying me, and I have other things to do.
Anyway, the solution was to run Mount-Database. If it cannot mount a database because it isn’t there, it creates one. Normally, that’d be a disaster, which is why it asks and warns before it does so — but that’s exactly what I wanted, so I told it to go ahead. It worked! Phew!
So I tried to log in again and, yay, I could log in! There was no error 500.
I’ve now got a lot of work to configure things, but at least I can do so!! Yay!