Page MenuHomePhabricator

PHP fatal error while searching index: Declaration of Elasticsearch\Endpoints\Indices\Exists::getParamWhitelist() must be compatible with Elasticsearch\Endpoints\AbstractEndpoint::getParamWhitelist():
Open, MediumPublic

Description

While performing this command: php extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php
The following error pops out:
PHP Fatal error: Declaration of Elasticsearch\Endpoints\Indices\Exists::getParamWhitelist() must be compatible with Elasticsearch\Endpoints\AbstractEndpoint::getParamWhitelist(): array in /var/www/html/mwtest/extensions/Elastica/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Exists.php on line 60

Observed on:
Mediawiki 1.31.10
Elasticsearch 5.6.16
Ubuntu 18
PhP 7.2.24

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Gehel triaged this task as High priority.Nov 9 2020, 4:37 PM
Gehel moved this task from needs triage to Current work on the Discovery-Search board.
Gehel edited projects, added Discovery-Search (Current work); removed Discovery-Search.

This loks like a version incomplatability between the high level elasticsearch client (ruflin/elastica) and the elasticsearch-php low level client. I would verify composer installed appropriate versions of each.

Gehel claimed this task.
Gehel added a subscriber: Gehel.

Without more information, there isn't much to do / investigate on our side. Feel free to re-open if you need more help to fix the issue!

Svrl reopened this task as Open.EditedNov 17 2020, 6:18 PM

Sorry for innactivity.
When I looked to Mediawiki installations the versions it shown these: for the Elastica: 1.3.0.0 (cfec7fc) 24. 7. 2020, 19:21, and for the CirrusSearch: 0.2 (ad9a0d9) 17. 4. 2018, 20:24, which are versions downloaded for Mediawiki 1.3.1.
And the version by the composer.json:
"ruflin/elastica": "5.3.6",
And thank you for the tip about version mismatch of composer validation.

CBogen lowered the priority of this task from High to Medium.Nov 23 2020, 6:19 PM
CBogen moved this task from needs triage to making others happy on the Discovery-Search board.

This error might occur on 1.35, see T276854 for more details