【问题标题】:Solr - ReplicationHandler - masterUrl error when defining it on core.properties for slaveSolr - ReplicationHandler - masterUrl 在 core.properties 上为从属定义时出错
【发布时间】:2020-01-23 20:34:15
【问题描述】:

我在向 solrconfig.xml 添加一些自定义时遇到了一些问题,我正在尝试为 ReplicationHandlerma​​sterUrl /strong> 使用 core.properties 文件。有趣的是,如果我手动将 url 粘贴到 solrconfig.xml 上,它就像一个魅力。我是否缺少 core.properties 上的一些配置?

这是文件:

solrconfig.xml

<requestHandler name="/replication" class="solr.ReplicationHandler" >
      <lst name="slave">

          <str name="masterUrl">${master_host}</str>

          <!--Interval in which the slave should poll master .Format is HH:mm:ss . If this is absent slave does not poll automatically.
           But a fetchindex can be triggered from the admin or the http API -->
          <str name="pollInterval">00:00:10</str>
          <str name="httpConnTimeout">5000</str>
          <str name="httpReadTimeout">10000</str>

       </lst>
  </requestHandler>

core.properties

name=locations
master_host=http://master:8983/solr/locations-master/replication

这是我得到的错误:

slave_1   | 2020-01-23 20:20:23.821 WARN  (indexFetcher-20-thread-1) [   ] o.a.s.h.IndexFetcher Master at: http://master:8983/solr/locations-master is not available. Index fetch failed by exception: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://master:8983/solr/locations-master: Expected mime type application/octet-stream but got text/html. <html>
slave_1   | <head>
slave_1   | <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
slave_1   | <title>Error 404 Not Found</title>
slave_1   | </head>
slave_1   | <body><h2>HTTP ERROR 404</h2>
slave_1   | <p>Problem accessing /solr/locations-master/replication. Reason:
slave_1   | <pre>    Not Found</pre></p>
slave_1   | </body>
slave_1   | </html>

谢谢!

编辑:我正在运行 solar 的 solr:8.4.1-slim image

【问题讨论】:

    标签: solr replication solrconfig


    【解决方案1】:

    在 core.properties 中,我将核心的名称设置为位置,而我在创建它时设置的名称是位置主机。我从 core.properties 中删除了 name=locations 并且它开始工作:^)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-05
      • 2019-06-02
      • 2012-02-11
      • 1970-01-01
      • 1970-01-01
      • 2016-10-06
      相关资源
      最近更新 更多