XFES\Elasticsearch\RequestException: Elasticsearch error: all shards failed src/addons/XFES/Elasticsearch/Api.php:464

GameNet

Active member
Is there something not configured in our ElasticSearch build or is this a bug?

error code:
Code:
XFES\Elasticsearch\RequestException: Elasticsearch error: all shards failed src/addons/XFES/Elasticsearch/Api.php:464
Generated by: NICK97 Apr 24, 2024 at 3:33 PM
Stack trace
#0 src/addons/XFES/Elasticsearch/Api.php(391): XFES\Elasticsearch\Api->request('get', 'citiesmods_mods...', '{
    "sort": [...')
#1 src/addons/XFES/Elasticsearch/Api.php(289): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#2 src/addons/XFES/Search/Source/Elasticsearch.php(786): XFES\Elasticsearch\Api->search(Array)
#3 src/addons/XFES/Search/Source/Elasticsearch.php(341): XFES\Search\Source\Elasticsearch->executeSearch(Object(XFES\Search\Query\MoreLikeThisQuery), Array, 100)
#4 src/addons/XFES/XF/Search/Search.php(36): XFES\Search\Source\Elasticsearch->moreLikeThis(Object(XFES\Search\Query\MoreLikeThisQuery), 100)
#5 src/XF/Search/Search.php(296): XFES\XF\Search\Search->XFES\XF\Search\{closure}(Object(XFES\Search\Query\MoreLikeThisQuery), 100)
#6 src/addons/XFES/XF/Search/Search.php(31): XF\Search\Search->executeSearch(Object(XFES\Search\Query\MoreLikeThisQuery), 100, Object(Closure), false)
#7 src/addons/XFES/XF/Repository/Thread.php(88): XFES\XF\Search\Search->moreLikeThis(Object(XFES\Search\Query\MoreLikeThisQuery), 100, false)
#8 src/addons/XFES/XF/Repository/Thread.php(51): XFES\XF\Repository\Thread->getSimilarThreadIds(Object(XFMG\XF\Entity\Thread), 100, false)
#9 src/addons/XFES/Widget/SimilarThreads.php(155): XFES\XF\Repository\Thread->rebuildSimilarThreadsCache(Object(XFMG\XF\Entity\Thread))
#10 src/addons/XFES/Widget/SimilarThreads.php(61): XFES\Widget\SimilarThreads->getSimilarThreadsCache(Object(XFMG\XF\Entity\Thread))
#11 internal_data/code_cache/widgets/_277_xfes_thread_view_below_quick_reply_similar_threads.php(5): XFES\Widget\SimilarThreads->render()
#12 src/XF/Template/Templater.php(8091): XF\SubContainer\Widget->{closure}(Object(XenConcept\LinkedAccount\XF\Template\Templater), Array, Array)
#13 src/XF/SubContainer/Widget.php(168): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)
#14 src/XF/Template/Templater.php(2075): XF\SubContainer\Widget->getCompiledWidget(Array, Array)
#15 internal_data/code_cache/templates/l1/s241/public/thread_view.php(1221): XF\Template\Templater->widgetPosition('thread_view_bel...', Array)
#16 src/XF/Template/Templater.php(1759): XF\Template\Templater->{closure}(Object(XenConcept\LinkedAccount\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#17 src/XF/Template/Templater.php(1750): XF\Template\Templater->renderTemplate('thread_view', Array, true, Object(XF\Template\ExtensionSet))
#18 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('snog_movies_thr...', Array)
#19 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#20 src/XF/Mvc/Dispatcher.php(461): XF\Mvc\Renderer\Html->renderView('Snog\\Movies:For...', 'public:snog_mov...', Array)
#21 src/XF/Mvc/Dispatcher.php(443): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#23 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#24 src/XF/App.php(2592): XF\Mvc\Dispatcher->run()
#25 src/XF.php(532): XF\App->run()
#26 index.php(20): XF::runApp('XF\\Pub\\App')
#27 {main}
Request state
array(4) {
  ["url"] => string(33) "/threads/under-wraps-2-2022.2003/"
  ["referrer"] => string(43) "https://cities-mods.com/forums/imdb-movies/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Also I have Enable search suggestions in the Search options

My Elastic Search version is 8.13.2 (elasticsearch 8.13.2)
 
You might try visiting the Enhanced search page in the control panel and toggling an index option (stemming/stop words/accent removal) on and off (saving each time). Then re-optimize if required, and finally rebuild the index.

We need make some improvements to upgrading XFES and enabling/disabling search suggestions. There is an open bug report about a similar issue in the meantime: https://xenforo.com/community/threa...ch-index-with-enhanced-search-enabled.220988/
 
Now it’s showing this error!

is this a bug?


error code:
Code:
XFES\Elasticsearch\RequestException: Validation Failed: 1: private index setting [index.verified_before_close] can not be set explicitly; src/addons/XFES/Elasticsearch/Api.php:464
Generated by: NICK97 Apr 24, 2024 at 3:51 PM
Stack trace
#0 src/addons/XFES/Elasticsearch/Api.php(361): XFES\Elasticsearch\Api->request('put', 'citiesmods_mods', '{
    "mappings...')
#1 src/addons/XFES/Service/Optimizer.php(74): XFES\Elasticsearch\Api->createIndex(Array)
#2 src/addons/XFES/Search/Source/Elasticsearch.php(138): XFES\Service\Optimizer->optimize(Array, true)
#3 src/XF/Search/Search.php(131): XFES\Search\Source\Elasticsearch->truncate('')
#4 src/XF/Job/SearchRebuild.php(27): XF\Search\Search->truncate('')
#5 src/XF/Job/Manager.php(272): XF\Job\SearchRebuild->run(8)
#6 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#8 src/XF/Admin/Controller/Tools.php(143): XF\Job\Manager->runQueue(true, 8)
#9 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(X0815\ChkTables\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(X0815\ChkTables\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2592): XF\Mvc\Dispatcher->run()
#14 src/XF.php(532): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}
Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(47) "https://cities-mods.com/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(10) "/admin.php"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(0) ""
  }
}
 
It looks like your Elasticsearch index has some unexpected settings (verified_before_close, at least), which prevents XF from updating the index settings during the optimization process that runs prior to the search rebuild. It's not immediately clear to me why these unexpected settings would be there to begin with, but we could potentially handle this better by skipping over them.

In the meantime you might try deleting the index manually (outside of XF) first, or re-configuring XFES to use a different index name in a pinch.
 
Back
Top Bottom