Jump to content

Topic on Extension talk:CirrusSearch

Creating index > ResponseException

6
Q2e.jua (talkcontribs)

I am trying to setup CirrusSearch extension, but stuck with the following exception while running UpdateSearchIndexConfig.php:

Elastica\Exception\ResponseException from line 178 of /wiki/extensions/Elastica/vendor/ruflin/elastica/src/Transport/Http.php

Setup:

  • Mediawiki 1.39
  • PHP 8.1
  • ElasticSearch 7.10.1 (via Docker)

Output of extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php:

Updating cluster ...

indexing namespaces...

mw_cirrus_metastore missing, creating new metastore index.

Creating metastore index...

mw_cirrus_metastore_first

Scanning available plugins...none

Elastica\Exception\ResponseException from line 178... (full stacktrace truncated)

Ciencia Al Poder (talkcontribs)

Looks like you're using ElasticSearch 7.10.1 but the requirement is 7.10.2. I'm not sure if a minor version difference is important, though

Q2e.jua (talkcontribs)
EBernhardson (WMF) (talkcontribs)

We would need to know what is in the ResponseException to offer a path forward. The name ResponseException itself isn't too meaningul, it mostly means elasticsearch said no. Perhaps something in either mediawiki logging or elasticsearch logging says what exactly the problem was?

Q2e.jua (talkcontribs)

Yeah, I'm still searching for some kind of log, but could not find anything.

  • The elasticsearch docker log does not contain related information.
  • Mediawiki log: I think I need to configure the log, because there is nothing in the default installation.

My next steps:

  • Checking for more log or activate enhanced logging in mediawiki
  • Try to manually run ElasticSearch 7.10.2 docker image, so we can exclude minor version differences
Q2e.jua (talkcontribs)

Update:

  • I had to manually load the 7.10.2 ElasticSearch docker image, because it was not available in the Plesk Repository.
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.10.2
  • After all, the ElasticSearch version was not the issue. The real issue was the configuration of the ElasticSearch container. Here it is important to configure the discovery type:
discovery.type | single-node

I will report this as an improvement issue to the maintainers:

  • Add an meaningful output message / At least just catch php exceptions and print the error message and the response message in the case of curl requests.
  • may add a simple setup for elastic search in the readme