Sitecore 9安装错误无法启动“ Sitecore XConnect搜索索引器”

时间:2019-10-11 17:42:07

标签: service solr sitecore9

嗨,我正在尝试使用SIF和ELearning Sitecore 9开发人员基金会提供的powershell脚本安装sitecore 9。在此期间,我遇到了很多问题,包括获取SOLR 6.6.2设置。我似乎已经克服了这些问题,但是最近几天困扰我的一个问题是:

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

到目前为止,我在这里找到一些线程来解释它们如何解决并从日志中给出错误消息。我尝试了一些方法,尽管由于不同的原因它们似乎会出现此问题。例如,造成这种情况的常见原因似乎是其许可证已过期或不包括xConnect。我不相信这是我的问题,因为我正在使用另一个使用有效的XConnect的sitecore 9项目的许可证。

此外,我的xconnect日志中的错误消息似乎不同于这种情况:

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.<op_Implicit>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.<op_Implicit>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

我确实找到了a blog post mentioning the error

但是我不确定他的解决方案是什么。当我尝试使用URL运行脚本时,他建议然后无法与SOLR建立连接。

我也无法通过服务器管理器手动启动服务器。我在窗口事件日志中收到相同的错误。

下面是我从Sitecore 9设置指南中运行的脚本。

    #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

只是想知道是否有人在那里,尤其是浏览Stack Overflow的Sitecore MVP是否了解为什么会发生这种情况。

1 个答案:

答案 0 :(得分:1)

Sitecore SIF安装中的SolrUrl应该没有#

$SolrUrl = "https://localhost:8983/solr"