question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SPSearchTopology doesn't work when NodeName is fully-qualified

See original GitHub issue

Details of the scenario you try and problem that is occurring: Creating a search topology does not work when NodeName is a fully-qualified domain name (e.g. server.domain.com instead of simply server)

In MSFT_SearchTopology.psm1, lines 250-257:

$searchService = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer `
                                                       -ErrorAction SilentlyContinue
if ($null -eq $searchService)
{
    $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain
    $searchServer = "$searchServer.$domain"
    $searchService = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer
}

Can we add a check for FQDN somewhere here? Something like… (edit: had the wrong operator)

if($searchServer -like '*.*') {
  $searchServer = $searchServer.Split('.')[0]
}

The DSC configuration that is using the resource: The resource, when called:

SPSearchTopology SearchTopology {
      PsDscRunAsCredential    = $Node.SetupAccount
      ServiceAppName          = 'Global Search'
      Admin                   = $AllNodes.Where({ 'Admin'               -in $_.SearchRoles }).NodeName
      Crawler                 = $AllNodes.Where({ 'Crawler'             -in $_.SearchRoles }).NodeName
      ContentProcessing       = $AllNodes.Where({ 'ContentProcessing'   -in $_.SearchRoles }).NodeName
      AnalyticsProcessing     = $AllNodes.Where({ 'AnalyticsProcessing' -in $_.SearchRoles }).NodeName
      QueryProcessing         = $AllNodes.Where({ 'QueryProcessing'     -in $_.SearchRoles }).NodeName
      IndexPartition          = $AllNodes.Where({ 'Index' -in $_.SearchRoles -and $_.IndexPartition -eq 0 }).NodeName
      FirstPartitionDirectory = Join-Path -Path $Node.SearchIndexFolder -ChildPath '0'
      DependsOn               = @('[SPSearchServiceApp]SearchServiceApp','[SPMinRoleCompliance]MinRoleCompliance')
  }

Sanitized sample of my PSD1:

@{
  AllNodes = @(

    @{
      NodeName          = '*'
      SearchIndexFolder = 'D:\Data\Index'
    },

    @{
      NodeName        = 'server.subdomain.domain.com'
      ServerRole      = 'ApplicationWithSearch'
      RunCentralAdmin = $true
      SearchRoles     = @('Admin','Crawler','ContentProcessing','AnalyticsProcessing','QueryProcessing','Index')
      IndexPartition  = 0
    },
}

Version of the Operating System and PowerShell the DSC Target Node is running: Server 2012 R2, Windows PowerShell 5.1

Version of SharePoint that is used (e.g. SharePoint 2016): SharePoint 2016, FP2

Version of the DSC module you’re using: 2.3.0.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ykuijscommented, Aug 16, 2018

Great suggestion. Have implemented this fix, will be included in my next PR

0reactions
ykuijscommented, Aug 25, 2018

Closed via PR #850

Read more comments on GitHub >

github_iconTop Results From Across the Web

2013 - Search Topology Issues
Verify that all components of the new search topology are running correctly. At the Windows PowerShell command prompt, type the following ...
Read more >
Get-SPEnterpriseSearchTopology (sharepoint-server)
This cmdlet retrieves a given search topology, the active search topology, or all search topologies that belong to a given search service application....
Read more >
Applications Manager Issues Fixed
Applications Manager Issues Fixed. This page lists the issues resolved and minor feature enhancements made in the following releases: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found