A couple months ago, had a mediawiki server with 3 wikis running on it dumped in my lap to support. The search box was using CirrusSearch and ElasticSearch / Elastica to generate results, but that was recently broken when the security team did some sort of log4j remediation. All searches would return "An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later."
So, I removed most traces of CirrusSearch / ElasticSearch and then had the bare-bones MediaWiki search working and of course no longer received the above error. Our server was running back-level MediaWiki (1.30), so I just brought the software up to nearly the latest versions.
I reenabled CirrusSearch and Elastica in LocalSettings.php, and my Version page shows them as loaded, but while I'm still not getting errors, the search results don't seem like they are enhanced in any way. How can I confirm whether or not I'm actually getting results from ElasticSearch instead of the default built-in search?
I suspect I already have my answer in that my attempt to regenerate my elasticsearch index fails with the response below. So I guess the real question is how do I fix ElasticSearch for my wikis?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Question
plenhart
A couple months ago, had a mediawiki server with 3 wikis running on it dumped in my lap to support. The search box was using CirrusSearch and ElasticSearch / Elastica to generate results, but that was recently broken when the security team did some sort of log4j remediation. All searches would return "An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later."
So, I removed most traces of CirrusSearch / ElasticSearch and then had the bare-bones MediaWiki search working and of course no longer received the above error. Our server was running back-level MediaWiki (1.30), so I just brought the software up to nearly the latest versions.
Centos 7.3.1611
Extension
Version
Description
CirrusSearch
6.5.4 (70b9a7e) 05:55, 16 March 2022
Elasticsearch-powered search for MediaWiki
Elastica
6.1.3 (c2b259b) 05:46, 19 January 2022
Base Elasticsearch functionality for other extensions by providing Elastica library
# yum list installed|grep elastic
elasticsearch.noarch 6.8.23-1 @elasticsearch6
elasticsearch-curator.x86_64 5.4.1-1 installed
I reenabled CirrusSearch and Elastica in LocalSettings.php, and my Version page shows them as loaded, but while I'm still not getting errors, the search results don't seem like they are enhanced in any way. How can I confirm whether or not I'm actually getting results from ElasticSearch instead of the default built-in search?
I suspect I already have my answer in that my attempt to regenerate my elasticsearch index fails with the response below. So I guess the real question is how do I fix ElasticSearch for my wikis?
# php /data/www/html/wiki/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php
Updating cluster ...
indexing namespaces...
Elastica\Exception\Connection\HttpException from line 190 of /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php: Couldn't connect to host, Elasticsearch down?
#0 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Request.php(194): Elastica\Transport\Http->exec()
#1 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Client.php(689): Elastica\Request->send()
#2 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Client.php(721): Elastica\Client->request()
#3 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Index.php(586): Elastica\Client->requestEndpoint()
#4 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Index.php(330): Elastica\Index->requestEndpoint()
#5 /data/www/html/wiki/extensions/CirrusSearch/includes/MetaStore/MetaStoreIndex.php(501): Elastica\Index->exists()
#6 /data/www/html/wiki/extensions/CirrusSearch/includes/MetaStore/MetaStoreIndex.php(165): CirrusSearch\MetaStore\MetaStoreIndex::cirrusReady()
#7 /data/www/html/wiki/extensions/CirrusSearch/includes/Maintenance/Maintenance.php(221): CirrusSearch\MetaStore\MetaStoreIndex->createIfNecessary()
#8 /data/www/html/wiki/extensions/CirrusSearch/maintenance/IndexNamespaces.php(36): CirrusSearch\Maintenance\Maintenance->maybeCreateMetastore()
#9 /data/www/html/wiki/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php(65): CirrusSearch\Maintenance\IndexNamespaces->execute()
#10 /data/www/html/wiki/maintenance/doMaintenance.php(108): CirrusSearch\Maintenance\UpdateSearchIndexConfig->execute()
#11 /data/www/html/wiki/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php(103): require_once('/data/www/html/...')
#12 {main}
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.