Monday, 30 July 2012
Friday, 6 July 2012
Resolving issues with Search Query component when the server hosting the query component go off line and cannot be restored.
Resolving issues with Search Query component when the server hosting the query component go off line and cannot be restored.
I suspect that this is set to 2 (the default), which would cause problems if one of the Query Components were not available.
1. Verify the current value for MinimumReadyQueryComponentsPerPartition using the following shell command :
$ssa = Get-SPEnterpriseSearchServiceApplication "Your Search Service Application Name"
$ssa.MinimumReadyQueryComponentsPerPartition
$ssa.MinimumReadyQueryComponentsPerPartition
· This property defines the minimum number of the query components used in each index partition
· The value was currently set to 2 (the default value)
o When the query server in ATT-2 was taken offline, the farm only had 1 query component available for this index partition (e.g. which was below the ‘Minimum’ value)
o Secondly, during a crawl, the crawler will attempt to propagate to the query components
§ With only 1 query component available and a ‘Minimum’ of 2 required, the propagation could not complete – making the crawl appear hunged ( crawl stuck on running )
§ This will also apparently put the query in a state that prevented queries from completing
2. Updated the value for MinimumReadyQueryComponentsPerPartition using the following:
$ssa.MinimumReadyQueryComponentsPerPartition = 1
$ssa.MinimumReadyQueryComponentsPerPartition = 1
$ssa.update()
· Upon updating, the query component from the offline server was no longer present in the UI
3. We then removed the inactive query topology using:
$ssa | Get-SPEnterpriseSearchQueryTopology
$oldTopo = Get-SPEnterpriseSearchQueryTopology -identity [Id-GUID-value-for-inactive-qTopo] -SearchApplication $ssa
$oldTopo | Remove-SPEnterpriseSearchQueryTopology
4. When we attempted to remove the Query topology in ‘Deactivating’ state, it failed because it was not inactive
o We attempted to use $oldTopo.cancelActivate(), but this made no difference
o Attempting to stop the currently running crawl also made no difference
5. We overcame the pinned crawl and deactivating query component by resetting the index
o Afterwards, the ‘Deactivating’ Query topology went to an ‘Inactive’ state, which allowed it to then be removed
6. We were then able to start a full crawl
I also tested if having 4 query components (e.g. two index partitions with Query Components 1 & 2m on ServerA and Query Components 1m & 2 on ServerB) made any difference, but the crawl also “hung” waiting for query components in my test. Given the definition for this parameter (“This property defines the minimum number of the query components used in each index partition”), this is expected.
Also, in my test, the Query components on the server I took offline (e.g. I simply paused my VM hosting this component) were not marked as Offline or Disabled even after setting this ‘Minimum’ value. Therefore, when I started my crawl after pausing this server, the crawl appeared to hang. However, I was able to manually disable the Query components on this offline server by using the following PowerShell (it’s also worth noting that this took effect immediately – without cloning/activating a topology – and it also took affect during an active crawl):
$qTopo = $ssa | Get-SPEnterpriseSearchQueryTopology -active
$QCs = Get-SpEnterpriseSearchQueryComponent -QueryTopology $qTopo
$QCs | format-list
#using the IDs of the Query Components in this output
#i entered the Id to the shell identity below
$p2QC = Get-SpEnterpriseSearchQueryComponent -QueryTopology $qTopo -identity 111-111-111-111
$p2QC.setOffline()
#repeat for any Query Component in the now-offline data center
SharePoint 2010 internal SharePoint load balancer send traffic to a server offline? and it causes sharepoint end point failuires
When an end point fails, a user will get the “Internal Server Error” exception, and the topology service will mark the end point “bad” for a configurable period of time (BadListPeriod). This time period is 10 minutes by default.
After “BadListPeriod” time has elapsed, the end point that had failed is marked “good” again, and a user may get another “Internal Server Error” exception if the server is still down. At this time, the particular server is taken out of rotation for “BadListPeriod” amount of time.
You can increase the “BadListPeriod” to the number of hours it will take to bring the server back online. This can be done using the following script that has been created and tested :
Set-SPTopologyServiceApplicationProxy ( BadListPeriod ) SharePoint 2010 end point failuires :
To prevent sharepoint from constantly going to a bad server for requests run the following commends
Specifies the time period that a node is kept in a bad list.
The type must be a valid value between 1 and 480 (in minutes).
The default value is 10.
or use script that i created
After “BadListPeriod” time has elapsed, the end point that had failed is marked “good” again, and a user may get another “Internal Server Error” exception if the server is still down. At this time, the particular server is taken out of rotation for “BadListPeriod” amount of time.
You can increase the “BadListPeriod” to the number of hours it will take to bring the server back online. This can be done using the following script that has been created and tested :
The above script sets the “BadListPeriod” to 10 hours, which means that after a user gets an error, we will take the endpoint out of rotation for 10 hours.
Set-SPTopologyServiceApplicationProxy ( BadListPeriod ) SharePoint 2010 end point failuires :
To prevent sharepoint from constantly going to a bad server for requests run the following commends
------------------EXAMPLE-----------------------
Set-SPTopologyServiceApplicationProxy 67877d63-bff4-4521-867a-ef4979ba07ce –BadListPeriod 1234
Specifies the time period that a node is kept in a bad list.
The type must be a valid value between 1 and 480 (in minutes).
The default value is 10.
or use script that i created
$proxy = Get-SPTopologyServiceApplicationProxy
$proxy.ExpireFailedEndPointsInterval = [System.TimeSpan]::FromHours(10)
$proxy.Update()
I did some additional testing and found the following two parameters (I’ve provided additional details below):
· $topoProxy.ExpireFailedEndPointsInterval = [System.TimeSpan]::FromHours(10)
· $SSA.TimeBeforeAbandoningQueryComponent = 10
Tuesday, 3 July 2012
Remove or Delete Enterprise Search Query Component
Remove or Delete Enterprise Search Query Component
GET-SPEnterpriseSearchServiceApplication | GET-SPEnterpriseSearchQueryTopology | GET-SPEnterpriseSearchQueryComponent | where {$_.Name -eq “8464b697-04df-4cc7-a5b4-c5e1a4e38f51-query-1″} | Remove-SPEnterpriseSearchQueryComponent
Display your SharePoint Farm Topology via power shell
Display your SharePoint Farm Topology via power shell
run the commands below using sharepoint powershell console - copy and past it into the window
$searchApp = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
$InitialQueryTopology = $searchApp | Get-SPEnterpriseSearchQueryTopology -Active
$QueryTopology = $searchApp | New-SPEnterpriseSearchQueryTopology -Clone -QueryTopology $InitialQueryTopology
$qcomp = $QueryTopology | Get-SPEnterpriseSearchQueryComponent
$qcomp | Remove-SPEnterpriseSearchQueryComponent
Monday, 2 July 2012
List you entire SharePoint 2010 search Topology in your search farm
This Script will List your entire SharePoint 2010 / SharePoint 2013 Search Topology in your SharePoint Search farm.
You will get a detailed list of the search topology and configuration. Use the power shell command lines below to see everything in full detail :
You will get a detailed list of the search topology and configuration. Use the power shell command lines below to see everything in full detail :
function Get-SPSearchServiceAppInfo()
{
$searchapps = Get-SPEnterpriseSearchServiceApplication
foreach ($ssa in $searchapps) {
Write-Host ======================================================================================
Write-Host -foregroundcolor DarkCyan $ssa.Name
Write-Host ======================================================================================
$ssa
foreach ($ct in $ssa.CrawlTopologies){
Write-Host ----------------------------------------------------------------------------------
Write-Host -foregroundcolor DarkCyan "*** Crawl Topology - " $ssa.Name "***"
$ct
Write-Host ----------------------------------------------------------------------------------
Write-Host -foregroundcolor DarkCyan "*** Crawl Components - " $ssa.Name "***"
$ct.CrawlComponents
Write-Host ----------------------------------------------------------------------------------
}
foreach ($qt in $ssa.QueryTopologies){
Write-Host ----------------------------------------------------------------------------------
Write-Host
Write-Host -foregroundcolor DarkCyan "*** Query Topology - " $ssa.Name "***"
$qt
Write-Host -foregroundcolor DarkCyan "*** Query Components - " $ssa.Name "***"
$qt.QueryComponents
Write-Host
}
}
}
Get-SPSearchServiceAppInfo
SharePoint Web Services Round Robin Service Load Balancer Event: EndpointFailure Process Name: w3wp Process ID: 10720
SharePoint Web Services Round Robin Service Load Balancer Event: EndpointFailure Process Name: w3wp Process ID: 10720 AppDomain Name: /LM/W3SVC/994389949/ROOT-1-129855207409220439 AppDomain ID: 2 Service Application Uri: urn:schemas-microsoft-com:sharepoint:service:ae4bee41343344b8a2dc69cd2b41d7ba#authority=urn:uuid:4f9c761a93684405b938c2739ccb0cb9&authority=https://spplpb2sbp65212:32844/Topology/topology.svc Active Endpoints: 1 Failed Endpoints:1 Affected Endpoint: http://spplpb3abx25212:32843/ae4bee41343344b8a2dc69cd2b41d7ba/SearchService.svc
Subscribe to:
Posts (Atom)