Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSFT_SPSearchTopology: Issue with Set-TargetResource (Server name is null) #891

Closed
JoeAlanis opened this issue Sep 23, 2018 · 12 comments
Closed
Labels
question The issue is a question.

Comments

@JoeAlanis
Copy link

JoeAlanis commented Sep 23, 2018

ISSUE DESCRIPTION:
I am receiving the following error when pushing a Search topology configuration:

Failed to execute Set-TargetResource functionality with error message: Cannot bind argument to parameter 'SearchServiceInstance' because it is null.

Details of the scenario you tried and the problem that is occurring

I am using a Push configuration using Partial configuration for both SQL 2017 and SharePoint 2016 onto a single server farm configuration. Server name is SQL1-2016 (localhost). There is a check in the MSFT_SPSearchTopology resource that is causing the error.

Verbose logs showing the problem

VERBOSE: [Sql1-2016]: [[SPSearchTopology]FarmSearchTopology] Leaving ProcessRecord Method of Get-SPEnterpriseSearchServiceApplication.
VERBOSE: [Sql1-2016]: [[SPSearchTopology]FarmSearchTopology] Leaving EndProcessing Method of Get-SPEnterpriseSearchServiceApplication.
VERBOSE: [Sql1-2016]: [[SPSearchTopology]FarmSearchTopology] Leaving BeginProcessing Method of New-SPEnterpriseSearchTopology.
VERBOSE: [Sql1-2016]: [[SPSearchTopology]FarmSearchTopology] Leaving ProcessRecord Method of New-SPEnterpriseSearchTopology.
VERBOSE: [Sql1-2016]: [[SPSearchTopology]FarmSearchTopology] Leaving EndProcessing Method of New-SPEnterpriseSearchTopology.
VERBOSE: [Sql1-2016]: [[SPSearchTopology]FarmSearchTopology] Setting components for 'Admin' property
VERBOSE: [Sql1-2016]: LCM: [ End Set ] [[SPSearchTopology]FarmSearchTopology] in 0.4530 seconds.
PowerShell DSC resource MSFT_SPSearchTopology failed to execute Set-TargetResource functionality with error message: Cannot bind argument to parameter 'SearchServiceInstance' because it is null.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost

Suggested solution to the issue

There is something in the Set-TargetResource that is causing this.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# Data File 
#Search Topology
        Admin = @("SQL1-2016")
        Crawler  = @("SQL1-2016")
        ContentProcessing = @("SQL1-2016")
        AnalyticsProcessing = @("SQL1-2016")
        QueryProcessing = @("SQL1-2016")
        IndexPartition = @("SQL1-2016")
        SearchIndexLocation = "G:\SearchIndexes\0"

# From Configuration File
SPSearchTopology FarmSearchTopology
        {
            ServiceAppName          = "Search Service Application"
            Admin                   = $ConfigurationData.AppInfo.Admin
            Crawler                 = $ConfigurationData.AppInfo.Crawler
            ContentProcessing       = $ConfigurationData.AppInfo.ContentProcessing
            AnalyticsProcessing     = $ConfigurationData.AppInfo.AnalyticsProcessing
            QueryProcessing         = $ConfigurationData.AppInfo.QueryProcessing
            FirstPartitionDirectory = $ConfigurationData.AppInfo.SearchIndexLocation
            IndexPartition          = $ConfigurationData.AppInfo.IndexPartition
            PsDscRunAsCredential    = $SPSetupAccount
            DependsOn               = '[SPSearchServiceApp]SearchServiceApp'
        }

The operating system the target node is running

OsName : Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture : 64-bit
WindowsBuildLabEx : 14393.2430.amd64fre.rs1_release_inmarket_aim.180806-1810
OsLanguage : en-US
OsMuiLanguages : {en-US}

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

SharePoint 2016

Version and build of PowerShell the target node is running

Name Value


PSVersion 5.1.14393.2430
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.2430
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

Manifest 2.5.0.0 SharePointDSC

@johlju johlju added the question The issue is a question. label Sep 25, 2018
@ykuijs
Copy link
Member

ykuijs commented Oct 5, 2018

Hi @JoeAlanis You mention that there is a check in the code that is causing this. Have you been able to determine exactly which check that is? That would make troubleshooting a whole lot easier ;-)

@viguerre
Copy link

Good afternoon,

I am also getting this same error on a sharepoint server 2013 farm with one sharepoint server and one sql server. Thank You!

SPSearchTopology FarmSearchTopology{
ServiceAppName = 'Search Service Application'
Admin = 'sp-app-01'
Crawler = 'sp-app-01'
ContentProcessing = 'sp-app-01'
AnalyticsProcessing = 'sp-app-01'
QueryProcessing = 'sp-app-01'
IndexPartition = 'sp-app-01'
FirstPartitionDirectory = 'C:\SearchIndexes\0'
PsDscRunAsCredential = $spsetup
DependsOn = '[SPSearchServiceApp]SearchServiceApp'
}

SharePointDSC 2.5
Windows Server 2012 R2 Standard 64 bit
SharePoint Server 2013 with SP1 Enterprise

@JoeAlanis
Copy link
Author

Hi @ykuijs, I suspect that it's in the Set-TargetResource lines 258-265. I don't think it's catching that it is null.

@ykuijs
Copy link
Member

ykuijs commented Oct 23, 2018

Are you using both short names and FQDNs in the same config?

@stale
Copy link

stale bot commented Nov 22, 2018

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Nov 22, 2018
@ykuijs
Copy link
Member

ykuijs commented Nov 27, 2018

@JoeAlanis Do you have an answer to my previous question?

@stale stale bot removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Nov 27, 2018
@stale
Copy link

stale bot commented Dec 27, 2018

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Dec 27, 2018
@ykuijs
Copy link
Member

ykuijs commented Jan 3, 2019

@JoeAlanis Any update?

@ykuijs ykuijs removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Jan 3, 2019
@ykuijs
Copy link
Member

ykuijs commented Jan 3, 2019

And can you test with v3.1?

@stale
Copy link

stale bot commented Feb 4, 2019

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Feb 4, 2019
@nroure
Copy link

nroure commented Feb 6, 2019

I had the same issue. I confirm it works when using the FQDN instead of the short name.

@stale stale bot removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Feb 6, 2019
@JoeAlanis
Copy link
Author

Confirmed.... FQDN did the trick. Thank you @ykuijs !

@SteveL-MSFT SteveL-MSFT added this to Questions in powershell/dscresources May 14, 2019
@SteveL-MSFT SteveL-MSFT removed this from Questions in powershell/dscresources Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue is a question.
Projects
None yet
Development

No branches or pull requests

5 participants