2

Hi I am trying to install Sitecore 9 using SIF and a PowerShell script provided with the ELearning Sitecore 9 developer foundations. I've had quite a few issue during this including getting Solr 6.6.2 setup. I seem to have over come these problems, however one that has stumped me over the last few day is this exception:

Install-SitecoreConfiguration : Failed to start service 'Sitecore XConnect Search Indexer - local.xconnect-IndexWorker (local.xconnect-IndexWorker)'. At C:\sitecore\install\install.ps1:43 char:1 + Install-SitecoreConfiguration @xconnectParams + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:02:50 Start-Service : Failed to start service 'Sitecore XConnect Search Indexer - local.xconnect-IndexWorker (local.xconnect-IndexWorker)'. At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.1.0\Public\Tasks\Invoke-ManageServiceTask.ps1:40 char:33 + $instance | Start-Service + ~~~~~~~~~~~~~ + CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

So far I found some threads on here explaining how they fixed it and giving the error messages from the logs. I have tried a few things although they would appear to have this issue for different reason. For example a common cause of this seems to be that their license has expired or does not include xConnect. I don't believe this is my issue because I am using a license from a another Sitecore 9 project that uses xConnect that works.

Also the error message in my xConnect logs seems to be different to when this is the case:

2019-10-11 18:00:29.419 +01:00 [Information] Starting Xdb Indexer App Domain, Machine: LAPTOP-171, InstanceName: XConnectIndexer_AppDomain 
2019-10-11 18:00:30.223 +01:00 [Information] SystemPerformanceCounters Constructor, Instance:XConnectIndexer, Path: App_Data\Diagnostics, CounterFilePattern: *.json 
2019-10-11 18:00:31.376 +01:00 [Error] Exception occurred during instantiating of IndexerHost. System.UriFormatException: Invalid URI: The Authority/Host could not be parsed. 
    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at Sitecore.Xdb.Collection.Search.Solr.SolrCoreUri.ReplaceCoreName(String newCoreName) at Sitecore.Xdb.Collection.Search.Solr.SolrWriterSettings..ctor(SolrCoreUri coreUri, Int32 maximumUpdateBatchSize, Int32 maximumDeleteBatchSize, Int32 maximumCommitMilliseconds, Int32 parallelizationDegree, Int32 retryCount, Int32 maximumRetryDelayMilliseconds, Encoding encoding, IndexerSettings indexerSettings) at Sitecore.Xdb.Collection.Search.Solr.RebuildSolrWriterSettings..ctor(String rebuildCoreName, SolrWriterSettings solrWriterSettings, Uri rebuildCoreWriteUrl, Uri rebuildCoreCleanUri, Uri rebuildCoreStatusPath, Uri swapCoresUri, Uri coreAdminUrl, Uri rebuildCoreCommitUrl) 
    at Sitecore.Xdb.Collection.Search.Solr.RebuildSolrWriterSettings..ctor(SolrWriterSettings settings, String rebuildCoreName) 
    at Sitecore.Xdb.Collection.Search.Solr.SolrIndexRebuilder.GetRebuildSolrWriterSettings(SolrWriterSettings settings) 
    at Sitecore.Xdb.Collection.Search.Solr.SolrIndexRebuilder..ctor(SolrWriterSettings writerSettings, XdbModel xdbModel) 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) 
    at Microsoft.Extensions.Configuration.ConfigurationServiceType.c__DisplayClass24_0.b__0(IServiceProvider sp) 
    at Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider) 
    at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) 
    at Microsoft.Extensions.Configuration.ConfigurationServiceType.c__DisplayClass24_0.b__0(IServiceProvider sp) 
    at Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider) 
    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) 
    at Sitecore.XConnect.Search.Indexer.IndexerHost..ctor(IConfigurationRoot config) in C:\BA\147b0adf6c2580c7\code\Sitecore.XConnect.Search.Indexer\IndexerHost.cs:line 46 
    at Sitecore.XConnect.Search.Indexer.IndexerAppDomainHost.IndexerHostAppDomainBridge..ctor() in C:\BA\147b0adf6c2580c7\code\Sitecore.XConnect.Search.Indexer\IndexerAppDomainHost.cs:line 149

I did find a blog post mentioning the error here https://tothecore.sk/2018/08/09/sitecore-xconnect-search-indexer-windows-service-throwing-exception-the-authority-host-could-not-be-parsed/

But I'm not sure really what his fix is. When I try to run the script with the URL he suggests it then can't establish a connection with SOLR.

I also can't start the server manually through the server manager. I get the same error in the Window event logs.

Below is the script I'm running from the sitecore 9 set up guide.

#define parameters 
$prefix = "local" 
$PSScriptRoot = "C:\sitecore\install" 
$XConnectCollectionService = "$prefix.xconnect" 
$sitecoreSiteName = "$prefix.sc" 
$SolrUrl = "https://localhost:8983/solr/#" 
$SolrRoot = "C:\sitecore\install\Solr-6.6.2" 
$SolrService = "Solr-6.6.2" 
$SqlServer = "(local)" 
$SqlAdminUser = "sa" 
$SqlAdminPassword="kagoolpass01" 
#install client certificate for xconnect 
$certParams = @{     
    Path = "$PSScriptRoot\xconnect-createcert.json"     
    CertificateName = "$prefix.xconnect_client" 
}  
Install-SitecoreConfiguration @certParams -Verbose 

#install solr cores for xdb 
$solrParams = @{     
    Path = "$PSScriptRoot\xconnect-solr.json"     
    SolrUrl = $SolrUrl     
    SolrRoot = $SolrRoot     
    SolrService = $SolrService     
    CorePrefix = $prefix 
}
Install-SitecoreConfiguration @solrParams 

#deploy xconnect instance 
$xconnectParams = @{     
    Path = "$PSScriptRoot\xconnect-xp0.json"     
    Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002 (OnPrem)_xp0xconnect.scwdp.zip"     
    LicenseFile = "$PSScriptRoot\license.xml"     
    Sitename = $XConnectCollectionService     
    XConnectCert = $certParams.CertificateName     
    SqlDbPrefix = $prefix  
    SqlServer = $SqlServer  
    SqlAdminUser = $SqlAdminUser     
    SqlAdminPassword = $SqlAdminPassword     
    SolrCorePrefix = $prefix     
    SolrURL = $SolrUrl      
} 
Install-SitecoreConfiguration @xconnectParams 

#install solr cores for sitecore 
$solrParams = @{     
    Path = "$PSScriptRoot\sitecore-solr.json"     
    SolrUrl = $SolrUrl     
    SolrRoot = $SolrRoot     
    SolrService = $SolrService     
    CorePrefix = $prefix 
} 
Install-SitecoreConfiguration @solrParams 

#install sitecore instance 
$xconnectHostName = "$prefix.xconnect" 
$sitecoreParams = @{    
    Path = "$PSScriptRoot\sitecore-XP0.json"      
    `enter code here`Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002 
    (OnPrem)_single.scwdp.zip" 
    LicenseFile = "$PSScriptRoot\license.xml"     
    SqlDbPrefix = $prefix  
    SqlServer = $SqlServer  
    SqlAdminUser = $SqlAdminUser     
    SqlAdminPassword = $SqlAdminPassword     
    SolrCorePrefix = $prefix  
    SolrUrl = $SolrUrl     
    XConnectCert = $certParams.CertificateName     
    Sitename = $sitecoreSiteName         
    XConnectCollectionService = "https://$XConnectCollectionService"    
}

Install-SitecoreConfiguration @sitecoreParams

Just wondering if anyone out there might have any insight into why this could be happening.

  • Normally, the service has already been installed. So, from the services, can you start the XConnect Service manually? Also, you need to make sure that Solr is running under https – Hishaam Namooya Oct 11 at 19:26
  • Hi Hishaam, No I can't when I attempt to start manually I get 'Error 1064: An exception occurred in the service when handling the control request'. The Windows event logs state the same thing. When I try to start it through cmd I get the same error as stated previously. – Shaun1810 Oct 11 at 19:29
  • Hi @Shaun1810, Which version of Sitecore 9? I had faced few hiccups during Sitecore installation with SIF. For Sitecore 9 initial release, the SIF Framework to use would 1.2 and for Sitecore 9.1 and above, it is recommended to use SIF 2 and above. – Sumit Upadhyay Oct 11 at 19:50
  • Hi I was using 2.0, it is site core 9.0. I've switched to 1.2 and it's still the same issue. It doesn't want to start manually either. Cheers – Shaun1810 Oct 11 at 21:03
1

Thanks for the editing and for the comments. It looks like the issue was with my SOLR url in the script. That extra /# on the SOLR address seemed to break the url it was generating for the xconnect connection string.

So instead of https://localhost:8983/solr/# it should be https://localhost:8983/solr. Looks like the post I read was correct(https://tothecore.sk/2018/08/09/sitecore-xconnect-search-indexer-windows-service-throwing-exception-the-authority-host-could-not-be-parsed/). It's annoying I've been stuck for a few days for something that simple. I am new Sitecore though.The guide actually isn't very clear about this. It has it with a slash at the end. And someone who is a beginner at the stage the tutorial is aimed at wouldn't necessarily see anything wrong with it.

Thanks again.

  • If you are still having installation issues, I would recommend you to follow the installation steps mentioned here: buoctrenmay.com/2018/11/29/… The steps given here are clear and easy to replicate. I have used this link personally for installing Sitecore on my instance. – Sumit Upadhyay Oct 12 at 5:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.