Topic on Extension talk:CirrusSearch/Flow

Install fails while running updateSearchIndexConfig.php - no such index "mw_cirrus_metastore"

8
Moydow (talkcontribs)

As the title says, while trying to install CirrusSearch, it fails while running the updateSearchIndexConfig.php script, with the following error:

Indexing namespaces...[88f74879166e1cb0742b2d96] [no req]   Elastica\Exception\ResponseException from line 179 of /home/mywiki/public_html/w/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php: no such index [index: mw_cirrus_metastore]
Backtrace:
#0 /home/mywiki/public_html/w/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Request.php(193): Elastica\Transport\Http->exec(Elastica\Request, array)
#1 /home/mywiki/public_html/w/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Client.php(674): Elastica\Request->send()
#2 /home/mywiki/public_html/w/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Client.php(706): Elastica\Client->request(string, string, array, array)
#3 /home/mywiki/public_html/w/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Index.php(562): Elastica\Client->requestEndpoint(Elasticsearch\Endpoints\DeleteByQuery)
#4 /home/mywiki/public_html/w/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Type.php(523): Elastica\Index->requestEndpoint(Elasticsearch\Endpoints\DeleteByQuery)
#5 /home/mywiki/public_html/w/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Type.php(491): Elastica\Type->requestEndpoint(Elasticsearch\Endpoints\DeleteByQuery)
#6 /home/mywiki/public_html/w/extensions/CirrusSearch/includes/MetaStore/MetaNamespaceStore.php(65): Elastica\Type->deleteByQuery(Elastica\Query)
#7 /home/mywiki/public_html/w/extensions/CirrusSearch/maintenance/indexNamespaces.php(39): CirrusSearch\MetaStore\MetaNamespaceStore->reindex(LanguageEn)
#8 /home/mywiki/public_html/w/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php(57): CirrusSearch\Maintenance\IndexNamespaces->execute()
#9 /home/mywiki/public_html/w/maintenance/doMaintenance.php(94): CirrusSearch\Maintenance\UpdateSearchIndexConfig->execute()
#10 /home/mywiki/public_html/w/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php(73): require_once(string)
#11 {main}

Using Elasticsearch 5.5.2, PHP 7.1.26, MW 1.32.0, Elastica 1.3.0, CirrusSearch 0.2. I've tried multiple versions of Elasticsearch from 5.5.2 up to 5.6.14, all with the same result. --Moydow (talk) 02:24, 19 January 2019 (UTC)

Hcpag (talkcontribs)

Same error when I run:

<code>php extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php </code>

return this error:

<code>

indexing namespaces...

Indexing namespaces...[432f3d673b42cbf73c70423a] [no req]   Elastica\Exception\ResponseException from line 179 of /var/www/html/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php: no such index [index: mw_cirrus_metastore]

Backtrace:

#0 /var/www/html/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Request.php(193): Elastica\Transport\Http->exec(Elastica\Request, array)

#1 /var/www/html/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Client.php(674): Elastica\Request->send()

#2 /var/www/html/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Client.php(706): Elastica\Client->request(string, string, array, array)

#3 /var/www/html/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Index.php(562): Elastica\Client->requestEndpoint(Elasticsearch\Endpoints\DeleteByQuery)

#4 /var/www/html/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Type.php(523): Elastica\Index->requestEndpoint(Elasticsearch\Endpoints\DeleteByQuery)

#5 /var/www/html/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Type.php(491): Elastica\Type->requestEndpoint(Elasticsearch\Endpoints\DeleteByQuery)

#6 /var/www/html/extensions/CirrusSearch/includes/MetaStore/MetaNamespaceStore.php(65): Elastica\Type->deleteByQuery(Elastica\Query)

#7 /var/www/html/extensions/CirrusSearch/maintenance/indexNamespaces.php(39): CirrusSearch\MetaStore\MetaNamespaceStore->reindex(Language)

#8 /var/www/html/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php(57): CirrusSearch\Maintenance\IndexNamespaces->execute()

#9 /var/www/html/maintenance/doMaintenance.php(94): CirrusSearch\Maintenance\UpdateSearchIndexConfig->execute()

#10 /var/www/html/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php(73): require_once(string)

#11 {main}

</code>

Using:

MediaWiki 1.31.1

PHP 7.2.10-0ubuntu0.18.04.1 (apache2handler)

MariaDB 10.1.34-MariaDB-0ubuntu0.18.04.1

ICU 60.2

Elasticsearch 5.6.3

Lua 5.1.5

Elasticsearch is running ok, extensions Elastica 1.3.0.0 (9fcf88c) 08:09 11 oct 2018 and CirrusSearch 0.2 (4330942) 21:17 16 oct 2018

<code>curl -s localhost:9200

{

  "name" : "HHS_8mf",

  "cluster_name" : "docker-cluster",

  "cluster_uuid" : "phiq1MvXRPaSSK5O46vnkQ",

  "version" : {

    "number" : "5.6.3",

    "build_hash" : "1a2f265",

    "build_date" : "2017-10-06T20:33:39.012Z",

    "build_snapshot" : false,

    "lucene_version" : "6.6.1"

  },

  "tagline" : "You Know, for Search"

}

</code>


134.171.183.194 (talkcontribs)

same error :(

209.12.64.2 (talkcontribs)

same problem here as well.

Environment: Debian Jessie, MW 1.32, JAVA 8, ElasticSearch 5.6.14, CirrusSearch v1.32, Elastica v1.32

209.12.64.2 (talkcontribs)

I figured it out. We need to run the metastore.php first, then the updateSearchIndexConfig script. This fixed the problem. The README guide should include this step for new install.


# php metastore.php

mw_cirrus_metastore missing creating.

Creating metastore index... mw_cirrus_metastore_firstScanning available plugins...none

ok

        Green!

Creating mw_cirrus_metastore alias to mw_cirrus_metastore_first.

Update and check the CirrusSearch metastore index. Always operates on a single

cluster.

Usage: php metastore.php [--cluster|--conf|--dbgroupdefault|--dbpass|--dbuser|--dump|--globals|--help|--index-version-basename|--memory-limit|--mwdebug|--profiler|--quiet|--server|--show-all-index-versions|--show-index-version|--update-index-version|--upgrade|--userTestTrigger|--wiki]

Generic maintenance parameters:

    --help (-h): Display this help message

    --quiet (-q): Whether to suppress non-error output

    --conf: Location of LocalSettings.php, if not default

    --wiki: For specifying the wiki ID

    --globals: Output globals at the end of processing for debugging

    --memory-limit: Set a specific memory limit for the script, "max"

        for no limit or "default" to avoid changing it

    --server: The protocol and server name to use in URLs, e.g.

        http://en.wikipedia.org. This is sometimes necessary because server name

        detection may fail in command line scripts.

    --profiler: Profiler output format (usually "text")

    --mwdebug: Enable built-in MediaWiki development settings

Script dependant parameters:

    --dbuser: The DB user to use for this script

    --dbpass: The password to use for this script

    --dbgroupdefault: The default DB group to use.

Script specific parameters:

    --cluster: Perform all actions on the specified elasticsearch

        cluster

    --dump: Dump the metastore index to stdout (elasticsearch bulk index

        format).

    --index-version-basename: What basename to use when running

        --show-index-version or --update-index-version, defaults to wiki id

    --show-all-index-versions: Show all versions for all indices managed

        by this cluster.

    --show-index-version: Show index versions for this wiki.

    --update-index-version: Update the version index for this wiki.

        Dangerous: index versions should be managed by

        updateSearchIndexConfig.php.

    --upgrade: Create or upgrade the metastore index.

    --userTestTrigger: Use config var and profiles set in the user

        testing framework, e.g. --userTestTrigger=trigger

# php updateSearchIndexConfig.php

indexing namespaces...

        Indexing namespaces...done

content index...

        Fetching Elasticsearch version...5.6.14...ok

        Scanning available plugins...none

        Inferring index identifier...mediawiki_content_first

        Picking analyzer...english

        Creating index...ok

                Validating number of shards...ok

                Validating replica range...ok

                Validating shard allocation settings...done

                Validating max shards per node...ok

        Validating analyzers...ok

        Validating mappings...

                Validating mapping...different...corrected

        Validating aliases...

                Validating mediawiki_content alias...alias is free...corrected

                Validating mediawiki alias...alias not already assigned to this index...corrected

                Updating tracking indexes...done

general index...

        Fetching Elasticsearch version...5.6.14...ok

        Scanning available plugins...none

        Inferring index identifier...mediawiki_general_first

        Picking analyzer...english

        Creating index...ok

                Validating number of shards...ok

                Validating replica range...ok

                Validating shard allocation settings...done

                Validating max shards per node...ok

        Validating analyzers...ok

        Validating mappings...

                Validating mapping...different...corrected

        Validating aliases...

                Validating mediawiki_general alias...alias is free...corrected

                Validating mediawiki_archive alias...alias not already assigned to this index...corrected

                Validating mediawiki alias...alias not already assigned to this index...corrected

                Updating tracking indexes...done

EBernhardson (WMF) (talkcontribs)
Legaulph (talkcontribs)

I'm having the same problem here as well.

MediaWiki	1.31.1
PHP	7.1.8 (apache2handler)
MySQL	5.6.10
Elastica 1.3.0.0 (0959e38) 20:02, 24 October 2016
CirrusSearch 0.2 (c23ae6a) 17:21, 25 October 2016
php maintenance/updateSearchIndexConfig.php

indexing namespaces...

       Indexing namespaces...done

content index...

       Fetching Elasticsearch version...5.6.15...ok
       Scanning available plugins...none
       Inferring index identifier...mwsandbox_content_first
       Picking analyzer...english
               Validating number of shards...ok
               Validating replica range...ok
               Validating shard allocation settings...done
               Validating max shards per node...ok
       Validating analyzers...ok
       Validating mappings...
               Validating mapping...ok
       Validating aliases...
               Validating mwsandbox_content alias...ok
               Validating mwsandbox alias...ok
               Updating tracking indexes...[c47b9670917f5d1abf7d8a28] [no req]   Exception from line 144 of /app/mediawiki/extensions/CirrusSearch/includes/MetaStore/MetaVersionStore.php: meta store does not exist, you must index your data first

Backtrace:

  1. 0 /app/mediawiki/extensions/CirrusSearch/includes/MetaStore/MetaVersionStore.php(69): CirrusSearch\MetaStore\MetaVersionStore->getType()
  2. 1 /app/mediawiki/extensions/CirrusSearch/maintenance/metastore.php(133): CirrusSearch\MetaStore\MetaVersionStore->updateAll(string)
  3. 2 /app/mediawiki/extensions/CirrusSearch/maintenance/metastore.php(95): CirrusSearch\Maintenance\Metastore->updateIndexVersion(string)
  4. 3 /app/mediawiki/extensions/CirrusSearch/maintenance/updateOneSearchIndexConfig.php(290): CirrusSearch\Maintenance\Metastore->execute()
  5. 4 /app/mediawiki/extensions/CirrusSearch/maintenance/updateOneSearchIndexConfig.php(256): CirrusSearch\Maintenance\UpdateOneSearchIndexConfig->updateVersions()
  6. 5 /app/mediawiki/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php(64): CirrusSearch\Maintenance\UpdateOneSearchIndexConfig->execute()
  7. 6 /app/mediawiki/maintenance/doMaintenance.php(94): CirrusSearch\Maintenance\UpdateSearchIndexConfig->execute()
  8. 7 /app/mediawiki/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php(73): require_once(string)
  9. 8 {main}


I try to run php maintenance/metastore.php as suggested above.

Update and check the CirrusSearch metastore index. Always operates on a single

cluster.

Usage: php metastore.php [--cluster|--conf|--dbpass|--dbuser|--dump|--globals|--help|--index-version-basename|--memory-limit|--mwdebug|--profiler|--quiet|--server|--show-all-index-versions|--show-index-version|--update-index-version|--upgrade|--userTestTrigger|--wiki]

Generic maintenance parameters:

    --help (-h): Display this help message

    --quiet (-q): Whether to supress non-error output

    --conf: Location of LocalSettings.php, if not default

    --wiki: For specifying the wiki ID

    --globals: Output globals at the end of processing for debugging

    --memory-limit: Set a specific memory limit for the script, "max"

        for no limit or "default" to avoid changing it

    --server: The protocol and server name to use in URLs, e.g.

        http://en.wikipedia.org. This is sometimes necessary because server name

        detection may fail in command line scripts.

    --profiler: Profiler output format (usually "text")

    --mwdebug: Enable built-in MediaWiki development settings

Script dependant parameters:

    --dbuser: The DB user to use for this script

    --dbpass: The password to use for this script

Script specific parameters:

    --cluster: Perform all actions on the specified elasticsearch

        cluster

    --dump: Dump the metastore index to stdout (elasticsearch bulk index

        format).

    --index-version-basename: What basename to use when running

        --show-index-version or --update-index-version, defaults to wiki id

    --show-all-index-versions: Show all versions for all indices managed

        by this cluster.

    --show-index-version: Show index versions for this wiki.

    --update-index-version: Update the version index for this wiki.

        Dangerous: index versions should be managed by

        updateSearchIndexConfig.php.

    --upgrade: Create or upgrade the metastore index.

    --userTestTrigger: Use config var and profiles set in the user

        testing framework, e.g. --userTestTrigger=trigger

elasticsearch
 
 "name" : "IWKNs00",
 "cluster_name" : "elasticsearch",
 "cluster_uuid" : "ICSITMH-Q9mdgneAfnfjOg",
 "version" :  
   "number" : "5.6.15",
   "build_hash" : "fe7575a",
   "build_date" : "2019-02-13T16:21:45.880Z",
   "build_snapshot" : false,
   "lucene_version" : "6.6.1"
  
  "tagline" : "You Know, for Search"

Legaulph (talk)

Legaulph (talkcontribs)

Upgrade to the version for MediaWiki 1.31 Fixed the issues

Reply to "Install fails while running updateSearchIndexConfig.php - no such index "mw_cirrus_metastore""