Solr - ReplicationHandler - ошибка masterUrl при определении его в core.properties для подчиненного - PullRequest
0 голосов
/ 23 января 2020

У меня проблемы с добавлением настроек в solrconfig. xml, я пытаюсь установить masterUrl для ReplicationHandler с использованием файла 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

И вот эта ошибка, которую я получаю:

<code>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
slave_1 | раб_1 |

Спасибо!

РЕДАКТИРОВАТЬ : Я использую солнечное фото: 8.4.1-slim image

1 Ответ

0 голосов
/ 24 января 2020

В core.properties я устанавливал имя ядра как местоположения, когда имя, которое я задавал при создании, было местоположения-master. Я удалил name = location из core.properties и он начал работать: ^)

...