Last modified: 2014-04-15 16:38:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65196, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63196 - updateSearchIndexConfig fails
updateSearchIndexConfig fails
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CirrusSearch (Other open bugs)
master
PC Linux
: Unprioritized blocker (vote)
: ---
Assigned To: Nik Everett
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-27 18:15 UTC by Bob Dye
Modified: 2014-04-15 16:38 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bob Dye 2014-03-27 18:15:50 UTC
Centos 6.5 in VirtualBox on Windows 7
Mediawiki 1.23wmf10
ElasticSearch 1.0.1
CirrusSearch hash 74ff50f

Testing on VM prior to deployment on live server. Newly rebuilt VM. Running updateSearchIndexConfig.php as part of install.

Tried all suggested options.

Output:

~> php updateSearchIndexConfig.php
content index...
        Fetching Elasticsearch version...1.0.1...ok
        Infering index identifier...uswinewiki_content_
        Index exists so validating...
                Validating number of shards...is 5 but should be 4...cannot correct!
Number of shards is incorrect and cannot be changed without a rebuild. You can solve this
problem by running this program again with either --startOver or --reindexAndRemoveOk.  Make
sure you understand the consequences of either choice..  This script will now continue to
validate everything else.


~> php updateSearchIndexConfig.php --startOver
content index...
        Fetching Elasticsearch version...1.0.1...ok
        Infering index identifier...uswinewiki_content_
        Blowing away index to start over...ok
        Validating analyzers...ok
        Validating mappings...
                Validating mapping for page type...different...corrected
        Validating aliases...
                Validating content alias...is an index...Unexpected Elasticsearch failure.
Elasticsearch failed in an unexpected way.  This is always a bug in CirrusSearch.
Error type: Elastica\Exception\ResponseException
Message: IndexMissingException[[uswinewiki] missing]
Trace:
#0 /var/www/html/extensions_dist/Elastica/Elastica/lib/Elastica/Request.php(166): Elastica\Transport\Http->exec(Object(Elastica\Request), 

Array)
#1 /var/www/html/extensions_dist/Elastica/Elastica/lib/Elastica/Client.php(587): Elastica\Request->send()
#2 /var/www/html/extensions_dist/Elastica/Elastica/lib/Elastica/Index.php(440): Elastica\Client->request('uswinewiki/', 'DELETE', Array, 

Array)
#3 /var/www/html/extensions_dist/Elastica/Elastica/lib/Elastica/Index.php(153): Elastica\Index->request('', 'DELETE')
#4 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateOneSearchIndexConfig.php(451): Elastica\Index->delete()
#5 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateOneSearchIndexConfig.php(432): CirrusSearch\UpdateOneSearchIndexConfig-

>validateSpecificAlias()
#6 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateOneSearchIndexConfig.php(201): CirrusSearch\UpdateOneSearchIndexConfig-

>validateAlias()
#7 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateSearchIndexConfig.php(50): CirrusSearch\UpdateOneSearchIndexConfig-

>execute()
#8 /var/www/html/w/maintenance/doMaintenance.php(104): CirrusSearch\UpdateSearchIndexConfig->execute()
#9 /var/www/html/extensions_dist/CirrusSearch/maintenance/updateSearchIndexConfig.php(56): require_once('/var/www/html/w...')
#10 {main}



~> php updateSearchIndexConfig.php --reindexAndRemoveOK
content index...
        Fetching Elasticsearch version...1.0.1...ok
        Infering index identifier...uswinewiki_content_
        Index exists so validating...
                Validating number of shards...ok
                Validating number of replicas...ok
        Validating analyzers...ok
        Validating mappings...
                Validating mapping for page type...ok
        Validating aliases...
                Validating content alias...is an index...cannot correct!
There is currently an index with the name of the alias.  Rerun this
script with --startOver and it'll remove the index and continue.
Comment 1 Nik Everett 2014-03-27 18:19:37 UTC
That last error claims that you have a index named "uswinewiki_content".  If that is the case nuke it with

curl -XDELETE http://localhost:9200/uswinewiki_content

and try again.

If that fixes it for you I'll add some code around that case.
Comment 2 Bob Dye 2014-03-27 19:09:06 UTC
I nuked that one, then another that popped up (uswinewiki_general). I had to use --startOver, and then it looked like the update succeeded.

~> php updateSearchIndexConfig.php --startOver
content index...
        Fetching Elasticsearch version...1.0.1...ok
        Infering index identifier...uswinewiki_content_first
        Blowing away index to start over...ok
        Validating analyzers...ok
        Validating mappings...
                Validating mapping for page type...different...corrected
        Validating aliases...
                Validating content alias...alias is free...corrected
                Validating all alias...alias not already assigned to this index...corrected
        Updating tracking indexes...done
general index...
        Fetching Elasticsearch version...1.0.1...ok
        Infering index identifier...uswinewiki_general_first
        Blowing away index to start over...ok
        Validating analyzers...ok
        Validating mappings...
                Validating mapping for page type...different...corrected
        Validating aliases...
                Validating general alias...alias is free...corrected
                Validating all alias...alias not already assigned to this index...corrected
        Updating tracking indexes...done

Thanks.
Comment 3 Gerrit Notification Bot 2014-04-10 20:29:35 UTC
Change 125295 had a related patch set uploaded by Manybubbles:
Fix maintenance script when index has the alias

https://gerrit.wikimedia.org/r/125295
Comment 4 Gerrit Notification Bot 2014-04-10 22:31:11 UTC
Change 125295 merged by jenkins-bot:
Fix maintenance script when index has the alias

https://gerrit.wikimedia.org/r/125295

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links