Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElasticStore Can't be enable by error on rebuildElasticIndex.php with before ES 6.4 #4341

Closed
MPThLee opened this issue Oct 25, 2019 · 4 comments
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error
Milestone

Comments

@MPThLee
Copy link
Contributor

MPThLee commented Oct 25, 2019

Setup and configuration

  • SMW version: 3.1.0
  • MW version: 1.31.5
  • PHP version: 7.3.11
  • DB system (MySQL, Blazegraph, etc.) and version: MariaDB v15.1, ElasticSearch v5.6.16, Redis 5.0.6

Issue

I'm using CirrusSearch and Elastica before, and moved to Semantic Mediawiki on existing wiki. But ElasticStore is unable to use due to error durring rebuildElasticIndex.php

Stack trace

Produces a stack trace and/or outputs:

Settings and mappings ...
   ... updating settings and mappings ...
   ... *data* index ...
       ... closing[dba20cd88ad809a585deefd3] [no req]   Elasticsearch\Common\Exceptions\BadRequest400Exception from line 610 of /srv/http/wiki/w/extensions/Elastica/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Can't update [index.number_of_replicas] on closed indices [[smw-data-mediawiki_db-v2/kkg_RHzKT1-3vwcku7OkfA]] - can leave index in an unopenable state"}],"type":"illegal_argument_exception","reason":"Can't update [index.number_of_replicas] on closed indices [[smw-data-mediawiki_db-v2/kkg_RHzKT1-3vwcku7OkfA]] - can leave index in an unopenable state"},"status":400}
Backtrace:
#0 /srv/http/wiki/w/extensions/Elastica/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(273): Elasticsearch\Connections\Connection->process4xxError(array, array, array)
#1 /srv/http/wiki/w/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(array)
#2 /srv/http/wiki/w/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Closure, NULL, NULL)
#3 /srv/http/wiki/w/vendor/guzzlehttp/ringphp/src/Core.php(341): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Closure, NULL, NULL)
#4 /srv/http/wiki/w/extensions/Elastica/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(294): GuzzleHttp\Ring\Core::proxy(GuzzleHttp\Ring\Future\CompletedFutureArray, Closure)
#5 /srv/http/wiki/w/extensions/Elastica/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(171): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(array, Elasticsearch\Connections\Connection, Elasticsearch\Transport, array)
#6 /srv/http/wiki/w/extensions/Elastica/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(101): Elasticsearch\Connections\Connection->performRequest(string, string, array, string, array, Elasticsearch\Transport)
#7 /srv/http/wiki/w/extensions/Elastica/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/AbstractNamespace.php(72): Elasticsearch\Transport->performRequest(string, string, array, array, array)
#8 /srv/http/wiki/w/extensions/Elastica/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IndicesNamespace.php(209): Elasticsearch\Namespaces\AbstractNamespace->performRequest(Elasticsearch\Endpoints\Indices\Settings\Put)
#9 /srv/http/wiki/w/extensions/SemanticMediaWiki/src/Elastic/Connection/Client.php(406): Elasticsearch\Namespaces\IndicesNamespace->putSettings(array)
#10 /srv/http/wiki/w/extensions/SemanticMediaWiki/src/Elastic/Indexer/Rebuilder.php(389): SMW\Elastic\Connection\Client->putSettings(array)
#11 /srv/http/wiki/w/extensions/SemanticMediaWiki/src/Elastic/Indexer/Rebuilder.php(214): SMW\Elastic\Indexer\Rebuilder->setDefaultByType(string)
#12 /srv/http/wiki/w/extensions/SemanticMediaWiki/maintenance/rebuildElasticIndex.php(222): SMW\Elastic\Indexer\Rebuilder->setDefaults()
#13 /srv/http/wiki/w/extensions/SemanticMediaWiki/maintenance/rebuildElasticIndex.php(151): SMW\Maintenance\RebuildElasticIndex->otherActivities()
#14 /srv/http/wiki/w/maintenance/doMaintenance.php(94): SMW\Maintenance\RebuildElasticIndex->execute()
#15 /srv/http/wiki/w/extensions/SemanticMediaWiki/maintenance/rebuildElasticIndex.php(437): require_once(string)
#16 {main}

Steps to reproduce

Since it's administrative issue, Can not produce with sandbox

@JeroenDeDauw
Copy link
Member

Does Elastic work without SMW enabled?

@JeroenDeDauw JeroenDeDauw added the bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error label Oct 25, 2019
@MPThLee
Copy link
Contributor Author

MPThLee commented Oct 25, 2019

It's work with CirrusSearch. I just fixed this issue by dropping all nodes :(

@mwjames
Copy link
Contributor

mwjames commented Oct 25, 2019 via email

@JeroenDeDauw JeroenDeDauw removed the bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error label Oct 25, 2019
@MPThLee
Copy link
Contributor Author

MPThLee commented Oct 26, 2019

For fix this issue in my end, just upgraded to MW 1.33 (and ES 6.8).

I think ElasticStore can be enabled with ES 5.6, as Elasticsearch: Recommended 6.1+, Tested with 5.6.6 on Help:ElasticStore.

I will open this issue. If this issue planned to won't fix, Please close this issue.

Edit: note that CirrusSearch with MW 1.31 and 1.32 still require ES 5.x.

@MPThLee MPThLee changed the title ElasticStore Can't be enable by error on rebuildElasticIndex.php ElasticStore Can't be enable by error on rebuildElasticIndex.php with ES 5.x Oct 26, 2019
@MPThLee MPThLee changed the title ElasticStore Can't be enable by error on rebuildElasticIndex.php with ES 5.x ElasticStore Can't be enable by error on rebuildElasticIndex.php with before ES 6.4 Oct 26, 2019
@kghbln kghbln added the bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error label Nov 2, 2019
@kghbln kghbln added this to the SMW 3.1.3 milestone Jan 12, 2020
@kghbln kghbln closed this as completed Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error
Projects
None yet
Development

No branches or pull requests

4 participants