One of the quarterly tasks that every Exchange administrator should do is to install new Cumulative Update for their Exchange 2013 server. While most of the time such upgrades are painless sometimes you reach a problem. In our case Microsoft.Exchange.Configuration.Tasks.ServiceDidNotReachStatusException: Service 'WMSVC' failed to reach status 'Running' on this server. was enough to stop us for even trying an upgrade.
Problem description
During Readiness Checks for Microsoft Exchange Server 2013 Cumulative Update 9 (CU9) installator decided that it cannot start a service.
Full error message looks like below:
The following error was generated when „$error.Clear();
$keyPath = „HKLM:\Software\Microsoft\WebManagement\Server”;
if (!(Get-Item $keyPath -ErrorAction SilentlyContinue))
{
New-Item $keyPath -Force
}
Set-ItemProperty -path $keyPath -name „EnableRemoteManagement” -value 0x1 -Type DWORD -Force;
if (Get-Service WMSVC* | ?{$_.Name -eq 'WMSVC'})
{
Set-Service WMSVC -StartupType Automatic
Stop-SetupService -ServiceName WMSVC;
Start-SetupService -ServiceName WMSVC
}
” was run: „Microsoft.Exchange.Configuration.Tasks.ServiceDidNotReachStatusException: Service 'WMSVC' failed to reach status 'Running' on this server.
at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object target, String helpUrl)
at Microsoft.Exchange.Configuration.Tasks.Task.WriteError(Exception exception, ErrorCategory category, Object target)
at Microsoft.Exchange.Management.Tasks.ManageSetupService.WaitForServiceStatus(ServiceController serviceController, ServiceControllerStatus status, Unlimited`1 maximumWaitTime, Boolean ignoreFailures, Boolean sendWatsonReportForHungService)
at Microsoft.Exchange.Management.Tasks.ManageSetupService.StartService(ServiceController serviceController, Boolean ignoreServiceStartTimeout, Boolean failIfServiceNotInstalled, Unlimited`1 maximumWaitTime, String[] serviceParameters)
at Microsoft.Exchange.Management.Tasks.ManageSetupService.StartService(String serviceName, Boolean ignoreServiceStartTimeout, Boolean failIfServiceNotInstalled, Unlimited`1 maximumWaitTime, String[] serviceParameters)
at Microsoft.Exchange.Management.Tasks.StartSetupService.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.b__b()
at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)”.
After a quick look at services console (services.msc) Web Management Service was indeed down.
Starting it up just brought another, a bit meaningless error
Checking Event Logs / Services shows Event ID 7024 from Service Control Manager with error message:
The Web Management Service service terminated with the following service-specific error: Unspecified error
So how to fix this error? It turns out the service requires an SSL Certificate to be available in IIS. Unfortunately one of the administrators setting up certificates wanted to have „clean” certificates Window, and since certificate in Exchange ECP looks unused there's nothing stopping you to delete it. Quick look at new installation of Exchange 2013 at certificates window shows WMSVC certificate.
And in comparison the supposedly cleaner version without the WMSVC certificate.
Even though the Assigned Services for this certificate are NONE Exchange Administrators should left this certificate as is. Fortunately if you've already deleted the certificate you can quickly fix it.
How to fix the problem
To resolve the problem, you must assign a new SSL certificate to the IIS Web Management Service.
Go to IIS – > Click on your Server -> Click on Management Service
Under SSL Certificate, select the new one. (You can use a existing certificate or recreate a new self-sign with IIS). As you can see on below screenshot it clearly states there's an error with the service.
After choosing proper SSL Certificate and clicking Apply everything goes back to normal
Service can be started
Readiness Checks go smoothly
And we're good to go!
If things didn't work
If things didn't went as smoothly you may want to go the long road, but it's a bit untested and risky territory so do it on your own risk.
Open command prompt as Administrator
dism /online /enable-feature /featurename:IIS-WebServer
dism /online /enable-feature /featurename:IIS-WebServer
dism /online /enable-feature /featurename:IIS-Managemen
Reg Add HKLM\Software\Microsoft\We
Those 4 commands essentially make sure that all IIS roles are installed properly. Then execute:
net start wmsvc
sc config wmsvc start=auto
Then open IIS Manager and do the steps from above again.