Topic on Extension talk:CirrusSearch

"Index is unknown retrying..." error on index generation script

6
Summary by MyWikis-JeffreyWang

Don't use AWS Elasticsearch or this happens

MyWikis-JeffreyWang (talkcontribs)

When attempting to run php /var/www/mediawiki-1.35.2/w/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php, I'm getting the following output:

indexing namespaces...

mw_cirrus_metastore missing, creating new metastore index.

Creating metastore index... mw_cirrus_metastore_first Scanning available plugins...

none

ok

Index is unknown retrying...

I'm not sure how the index could be unknown when this is the script that's supposed to generate it. Here's my settings:

$wgCirrusSearchIndexBaseName = $wgDBname;

$wgDisableSearchUpdate = true;

$wgCirrusSearchClusters = [

    'default' => [

        [

            'host' => 'search-cirrus-randomcharsid.us-east-1.es.amazonaws.com',

            'port' => 443,

            'scheme' => 'https'

        ]

    ]

];

Any ideas on why this might be the case? Thanks in advance!

EBernhardson (WMF) (talkcontribs)

The message `Index is unknown retrying...` comes from the code that is waiting for the new metastore index to report it is fully created and healthy. While not particularly clear, it seems this means the request to create the index was submitted, but then the later requests to ask about the status of this new index are reporting no such index currently exists. Critically it appears no check is being performed against the index creation request response, it seems likely the index creation request is failing and then Cirrus bails when checking that index.

Cirrus will need to be adjusted to do a better job at error reporting here, but that will only improve reporting it wouldn't fix your actual problem. My first guess would be, which version of elasticsearch are you using? I'm pretty sure the existing metastore index would be rejected by elastic >= 7.0.

MyWikis-JeffreyWang (talkcontribs)

Hi @EBernhardson (WMF), thanks for your reply! I am using Elasticsearch 6.5.4 on AWS's managed version of Elasticsearch, and using MediaWiki 1.35 (and CirrusSearch and Elastica are both on the REL1_35 branch of Git).

If it helps, I have "elasticsearch/elasticsearch": "6.7.2" in my composer.local.json because of T276854. So I guess I'm already laughing a bit at myself for picking two different versions. I'm using 6.5.4 because of the recommendation on the CirrusSearch extension page, but I'm wondering if it's safe to go up to 6.7 or 6.8.

Ciencia Al Poder (talkcontribs)

MediaWiki 1.33.x to 1.36.x require Elasticsearch 6.5.x (6.5.4 recommended).

Any other version (even newer ones than the requirement) will report ES is not compatible and fail instantly. (or at least that was happening some versions ago)

MyWikis-JeffreyWang (talkcontribs)

@Ciencia Al Poder The problem is that when I don't add that line into my composer.local.json I get the issue reported at T276854.

MyWikis-JeffreyWang (talkcontribs)