如何解决:错误创建SolrCore'gettingstarted':无法创建核心 [英] How to fix: Error CREATEing SolrCore 'gettingstarted': Unable to create core

查看:716
本文介绍了如何解决:错误创建SolrCore'gettingstarted':无法创建核心的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在solr中创建新内核时遇到此错误.

I'm getting this error when I try to create a new core in solr.

root@ubuntu:/opt/solr# bin/solr create -c gettingstarted -n data_driven_schema_configs

Setup new core instance directory:
/var/solr/data/gettingstarted

Creating new core 'gettingstarted' using command:
http://localhost:8983/solr/admin/cores?action=CREATE&name=gettingstarted&instanceDir=gettingstarted

Failed to create core 'gettingstarted' due to: Error CREATEing SolrCore 'gettingstarted': Unable to create core [gettingstarted] Caused by: /var/solr/data/gettingstarted/data

此外,如果我尝试创建替代项,则会出现相同的错误:

Also, if I try to create alternatively, It gives me same error:

root@ubuntu:/opt/solr# bin/solr create -c mycore

Setup new core instance directory:
/var/solr/data/mycore

Creating new core 'mycore' using command:
http://localhost:8983/solr/admin/cores?action=CREATE&name=mycore&instanceDir=mycore

Failed to create core 'mycore' due to: Error CREATEing SolrCore 'mycore': Unable to create core [mycore] Caused by: /var/solr/data/mycore/data

在浏览器中,当我尝试访问solr管理面板时,它显示如下通知:

In browser, when I try to access solr admin panel, it displays a notification like:

SolrCore Initialization Failures

opt/solr/example/exampledocs/*.xml: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: /var/solr/data/opt/solr/example/exampledocs/*.xml/data 

快照已附加.

推荐答案

由于它可能会对遇到相同问题的任何人有所帮助,因此,它确实是由

Since it might help anybody with the same issue, it's indeed caused by permission issues when using root. The script doesn't terminate quickly when executing the command as root and instead creates a piece of the core definition before failing.

因此,首先清理损坏的内核:

So first cleanup the broken core:

bin/solr delete -c mycore

确保mycore核心的/var/solr/data下没有文件夹徘徊.

Make sure that no folder(s) linger under /var/solr/data for your mycore core.

下一步,以solr用户身份创建核心

Next create the core as the solr user

su -u solr -c "/opt/solr/bin/solr create_core -c mycore"

这一次它应该成功

这篇关于如何解决:错误创建SolrCore'gettingstarted':无法创建核心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆