1
回答
solr集群启动上传到zookeeper的两份配置被覆盖
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

JAVA_OPTS="$JAVA_OPTS -Dbootstrap_confdir=/root/zmf/solrcloud/solr_base_1080/solr_home/programSerial/conf -Dcollection.configName=programSerial -DzkHost=localhost:2181 -DnumShards=2"

tomcat2080启动参数:

JAVA_OPTS="$JAVA_OPTS -Dbootstrap_confdir=/root/zmf/solrcloud/solr_base_2080/solr_home/aspectprogramSerial/conf -Dcollection.configName=aspectprogramSerial -DzkHost=localhost:2181"

两个目录下的配置文件分别为:(一个是schema.xml ,一个是managed-schema 

[root@hadoop15 conf]# ls /root/zmf/solrcloud/solr_base_1080/solr_home/programSerial/conf
admin-extra.html              admin-extra.menu-top.html  elevate.xml  protwords.txt  schema.xml.bak  stopwords.txt
admin-extra.menu-bottom.html  currency.xml               lang         schema.xml     solrconfig.xml  synonyms.txt

[root@hadoop15 conf]# ls /root/zmf/solrcloud/solr_base_2080/solr_home/aspectprogramSerial/conf
admin-extra.html              admin-extra.menu-top.html  elevate.xml  managed-schema  schema.xml.bak  stopwords.txt
admin-extra.menu-bottom.html  currency.xml               lang         protwords.txt   solrconfig.xml  synonyms.txt

先启动zookeeper,在启动tomcat1080,tomcat2080

查看zookeeper中的配置文件为:

[zk: localhost:2181(CONNECTED) 10] ls /configs/aspectprogramSerial
[admin-extra.menu-top.html, admin-extra.html, currency.xml, protwords.txt, synonyms.txt, elevate.xml, solrconfig.xml, admin-extra.menu-bottom.html, schema.xml.bak, lang, stopwords.txt, managed-schema]

[zk: localhost:2181(CONNECTED) 11] ls /configs/programSerial      
[admin-extra.menu-top.html, currency.xml, protwords.txt, solrconfig.xml, stopwords.txt, lang, schema.xml.bak, admin-extra.html, synonyms.txt, elevate.xml, admin-extra.menu-bottom.html, managed-schema]

现在问题是zookeeper中这两个都是managed-schema,预期情况应该是ls /configs/programSerial下应该是schemal.xml,所以请教一下!谢谢杰哥了

solr.xml配置如下

<solr>
<cores adminPath="/admin/cores" host="${host:}" hostPort="${hostport:1080}" hostContext="${hostContext:solr}" zkHost="${zkHost:localhost:2181}"  zkClientTimeout="${zkClientTimeout:15000}" genericCoreNodeNames="${genericCoreNodeNames:true}">
  <shardHandlerFactory name="shardHandlerFactory"
    class="HttpShardHandlerFactory">
    <int name="socketTimeout">${socketTimeout:0}</int>
    <int name="connTimeout">${connTimeout:0}</int>
    <str name="urlScheme">${urlScheme:}</str>
  </shardHandlerFactory>
<core name="programSerial" instanceDir="programSerial" />
<core name="aspectprogramSerial" instanceDir="aspectprogramSerial" />
</cores>
</solr>

举报
zmf
发帖于3年前 1回/2K+阅
顶部