Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
How to configure SharePoint search on a 3-server SharePoint Farm - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2013-09-19

I have three servers for SharePoint FARM setup:

  1. mySPDb-SRV -> Database Server
  2. mySPAP-SRV  -> Application server as well as WFE1
  3. mySPWFE-SRV -> WFE2

I need to configure the search on the above FARM topology. My central admin is on my Application server.

So I have decided to configure Search on Application server and attach the instance WFE2.

For this we have only PowerShell cmdlet available.

So I have done it as follows (Please make sure search service must be started on both WFEs):

1- Created Search Service Application 1st on Application server (Where central admin available)

$SearchAppPoolName = "SearchServiceAppPool"


$SearchAppPoolAccountName = "Domain\DomainUser"

$SearchServiceName = "SharePoint Search Service"

$SearchServiceProxyName = "SharePoint Search Service Proxy"


$DatabaseServer = "(IP/MachineName)\DatabaseInstance Name"


$DatabaseName = "SP_Search_AdminDB"


Write-Host -ForegroundColor Red "Checking if Search Application Pool exists" 

$spAppPool = Get-SPServiceApplicationPool -Identity $SearchAppPoolName -ErrorAction SilentlyContinue

if (!$spAppPool)

{

    Write-Host -ForegroundColor Cyan "Creating Search Application Pool"

    $spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account $SearchAppPoolAccountName -Verbose

}


Write-Host -ForegroundColor Green "Checking if Search Service Application exists"

$ServiceApplication = Get-SPEnterpriseSearchServiceApplication -Identity $SearchServiceName -ErrorAction SilentlyContinue

if (!$ServiceApplication)

{

    Write-Host -ForegroundColor Yellow "Creating Search Service Application"

    $ServiceApplication = New-SPEnterpriseSearchServiceApplication -Name $SearchServiceName -ApplicationPool $spAppPool.Name -DatabaseServer  $DatabaseServer
-DatabaseName $DatabaseName

}

Write-Host -ForegroundColor Cyan "Checking if Search Service Application Proxy exists"

$Proxy = Get-SPEnterpriseSearchServiceApplicationProxy -Identity $SearchServiceProxyName
-ErrorAction SilentlyContinue

if (!$Proxy)

{

    Write-Host -ForegroundColor Yellow "Creating Search Service Application Proxy"

    New-SPEnterpriseSearchServiceApplicationProxy -Name $SearchServiceProxyName
-SearchApplication $SearchServiceName

}

Now We have Search Service application and proxy is created. We can find it from Central Admin

2-Configure Search service instances:

#Prepare the topology variables

$hostApp1 = Get-SPEnterpriseSearchServiceInstance -Identity "mySPAP-SRV"

$hostWF1 = Get-SPEnterpriseSearchServiceInstance -Identity "mySPWFE-SRV"


Start-SPEnterpriseSearchServiceInstance -Identity $hostApp1

Start-SPEnterpriseSearchServiceInstance -Identity $hostWF1 


#Get services status

Get-SPEnterpriseSearchServiceInstance -Identity $hostApp1

Get-SPEnterpriseSearchServiceInstance -Identity $hostWF1


(#Wait till SPEnterpriseSearchServiceInstance be online and then execute the below code)


#Setting up the topology

$ssa = Get-SPEnterpriseSearchServiceApplication

$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa

#mySPAP-SRV

#Enterprise Search Admin Component

New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1


 #Enterprise Search Crawl Component

New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1


#Enterprise Search Content Prosessing Conmponent

New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology
-SearchServiceInstance $hostApp1


#Enterprise Search AnalyticsProcessing Component

New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology
-SearchServiceInstance $hostApp1


#Enterprise Search Query Processing Component (As I declared that it will also work as WFE so this needs to be configured. It is not essential to configure on Application server)

New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology
-SearchServiceInstance $hostApp1


#Enterprise Search Index Component

New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1 -IndexPartition 0

#mySPWFE-SRV

#Enterprise Search Query Processing Component

New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology
-SearchServiceInstance $hostWF1

#Set Topology
Set-SPEnterpriseSearchTopology -Identity $newTopology


# Verify the Topology

Get-SPEnterpriseSearchTopology -SearchApplication $ssa

Now here is a catch. topology will throw following error:

Could not connect to the Host Controller service on server. Topology Activation could not be started……..

I have Googled almost 5-6 Hrs and tried each and every solutions. The ended up being with the firewall settings on the SharePoint servers. First, I tried with firewall “off mode” on both SharePoint servers.

I found that it is working fine now.  Then I have created Inbound rule in both SharePoint servers firewall for the above servers port so that they can by pass the servers firewall. And Its done. Working like a charm.

Now this post may save you 4-5 hrs 🙂

(Visited 395 times, 1 visits today)

About the author 

Ajeet Kumar Singh

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.