Tuesday, May 13, 2014

SharePoint Search Error Message - There are no addresses available for this application

I had just recently set up a SharePoint 2013 installation using the SharePoint Configuration Wizard.  Of course, by default, the SharePoint Configuration Wizard will install and configure the Search Service Application.

Of course, when we began actually testing the Search on the SharePoint site, we received this error message:

"There are no addresses available for this application"

Of course, when I went into Central Administration and examined the Search Service Application, I got the additional error message:






"The search service is not able to connect to the machine that hosts the administration component.  Verify that the administration component '<GUID>' in search application 'Search Service Application' is in a good state and try again"

After doing a bit of digging around on the Internet for article, most of the articles recommended removing the existing Search Service Application and reinstalling it.

Therefore, I went into the Search Service Application and proceeded to Delete the existing Search Service Application:




 

Once I had deleted the Search Service Application, I needed to reliably re-create the Search Service Application, so I executed the following PowerShell script:
 
 
$searchServiceAccount = "sp2013\sp2013_service"
$saAppPoolName = new-spserviceapplicationpool –name "Search Service Application" –account $searchServiceAccount
$searchServerName = (Get-ChildItem env:computername).value
$serviceAppName = "Search Service Application"
$searchDBName = "SharePoint_Search"
$saAppPool = Get-SPServiceApplicationPool $saAppPoolName
Write-Host "Starting Search Service Instances..."
Start-SPEnterpriseSearchServiceInstance $searchServerName
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $searchServerName
Write-Host "Creating Search Service Application and Proxy..."
$searchServiceApp = New-SPEnterpriseSearchServiceApplication -Name $serviceAppName -ApplicationPool $saAppPoolName -DatabaseName $searchDBName
$searchProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name "$serviceAppName Proxy" -SearchApplication $searchServiceApp
Write-Host "Configuring Search Component Topology..."
$clone = $searchServiceApp.ActiveTopology.Clone()
$searchServiceInstance = Get-SPEnterpriseSearchServiceInstance
New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance
New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance
New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance 
New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance 
New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance
New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance
$clone.Activate()

After executing this PowerShell script, I was able to execute searches without any error messages!

No comments:

Post a Comment