首页 > 解决方案 > 创建 SolrCore 'sitecore_core_index' 时出错:缺少非传统模式 coreNodeName

问题描述

我目前正在尝试设置 Sitecore 9.1.0 rev。001564 XP1 与我的 Solr v. 7.2.1 集群,由 3 个运行 Zookeeper v. 3.4.13 的 Solr 服务器组成。

当我尝试使用Install-SitecoreConfigurationPowerShell 命令创建核心时出现问题:

Install-SitecoreConfiguration -Path sitecore-solr.json -v

它给出了一个错误,表明它coreNodeName丢失了。我检查了core.properties文件并且 coreNodeNames 设置正确。

我还检查了solrconfig.xmlproperty.update.autoCreateFields设置为 false。

错误如下所示:

[--------------------------------------------------------------------------------- CreateCores [1] : ManageSolrCore ----------------------------------------------------------------------------------]
VERBOSE: Tells Solr to create the new cores.
VERBOSE: Performing the operation "Requesting" on target "https://MYHOST:8983/solr".
[CreateCores [1]]:[Requesting] https://MYHOST:8983/solr
VERBOSE: GET https://MYHOST:8983/solr with 0-byte payload
VERBOSE: received 13377-byte response of content type text/html;charset=utf-8
VERBOSE: Performing the operation "Invoke-ManageSolrCoreTask -Address https://MYHOST:8983/solr -Action Create" on target "https://MYHOST:8983/solr".
[CreateCores [1]]:[SolrCore] Performing Create on https://MYHOST:8983/solr

VERBOSE: Updating Solr: Uri => 'https://MYHOST:8983/solr/admin/cores?action=Create&name=sitecore_core_index&property.update.autoCreateFields=false&wt=json'
VERBOSE: GET https://MYHOST:8983/solr/admin/cores?action=Create&name=sitecore_core_index&property.update.autoCreateFields=false&wt=json with 0-byte payload
Install-SitecoreConfiguration : Error CREATEing SolrCore 'sitecore_core_index': non legacy mode coreNodeName missing {update.autoCreateFields=false}
At line:1 char:1
+ Install-SitecoreConfiguration -Path C:\Users\admin\Documents\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:00:17
Invoke-ManageSolrCoreTask : Error CREATEing SolrCore 'sitecore_core_index': non legacy mode coreNodeName missing {update.autoCreateFields=false}
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.0.0\Public\Install-SitecoreConfiguration.ps1:641 char:25
+                         & $entry.Task.Command @paramSet | Out-Default
+                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-ManageSolrCoreTask

我也尝试过curl它发出的请求,但这给出了相同的结果:

PS C:\Windows\system32> curl 'https://MYHOST:8983/solr/admin/cores?action=Create&name=sitecore_core_index&property.update.autoCreateFields=false&wt=json'
curl : { "responseHeader":{ "status":400, "QTime":9}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"Er
ror CREATEing SolrCore 'sitecore_core_index': non legacy mode coreNodeName missing {update.autoCreateFields=false}", "code":400}}
At line:1 char:1

我究竟做错了什么?

标签: solrsitecore

解决方案


这个问题已经解决了。似乎这仅在未启用 Cloud 的情况下启动 Solr 时有效。当我在没有云的情况下启动 Solr 时,我可以毫无问题地运行脚本。所以我必须为 Solr Cloud 创建自己的集合来解决这个问题。


推荐阅读