I got this this error after setting up Search Service Application with Powershell.
The search service is not able to connect to the machine that hosts the
administration component. Verify that the administration component
'a23fd668-f823- 4ab2-b0fc-b0baebfd4af2' in search application
'SharePoint_Search_Service' is in a good state and try again.
The Sharepoint Search Service was showing error when I visited
Central Administration->Application Management->Service Applications-> Manage Service Applications
Here is the powershell script used
$App1 = "APP-Server-01"
$APP2 = "APP-Server-02"
$SearchAppPoolName = "SharePoint_SearchApp"
$SearchAppPoolAccountName = "EXSERV\Administrator"
$SearchServiceName = "SharePoint_Search_Service"
$SearchServiceProxyName = "SharePoint_Search_Proxy"
$DatabaseName = "SharePoint_Search_AdminDB"
Create a Search Service Application Pool
$spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account
$SearchAppPoolAccountName -Verbose
Start Search Service Instance on all Application Servers
Start-SPEnterpriseSearchServiceInstance $App1 -ErrorAction SilentlyContinue
Start-SPEnterpriseSearchServiceInstance $App2 -ErrorAction SilentlyContinue
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $App1 -ErrorAction
SilentlyContinue
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $App2 -ErrorAction
SilentlyContinue
Create Search Service Application
$ServiceApplication = New-SPEnterpriseSearchServiceApplication -Partitioned -Name
$SearchServiceName -ApplicationPool $spAppPool.Name -DatabaseName $DatabaseName
Create Search Service Proxy
New-SPEnterpriseSearchServiceApplicationProxy -Partitioned -Name
$SearchServiceProxyName -SearchApplication $ServiceApplication