No System Manager Locations Set, Search Application Might Not Be Ready Yet

You might encounter this error when you are doing a pretty routine operation; resetting your search index.

The exact error is:

System.InvalidOperationException: No system manager locations set, search application might not be ready yet.
at Microsoft.Office.Server.Search.Administration.SearchApi.ResetCeres()
at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.<>c__DisplayClass49.<Reset>b__48()
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at Microsoft.Office.Server.Search.Internal.UI.SearchReset.OnClickReset(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

The stack trace unfortunately does not give you a lot to go on, just saying its resetting Ceres. The InvalidOperationException message is not really helpful because the service app could already be properly stood up.

After looking at it for a while, it is because of a time skew between the VM server and the host machine. Do’h! So make sure that the time is synced between the two environments!