XF 1.5 Elasticsearch Indexing Failed

I've done some searching for this but have only found similar issues that don't resolve what we see.


Moving to a new server, we needed to reindex after installing elasticsearch on the server. After a few bumps, we got this:
Code:
An exception occurred: Elasticsearch indexing failed. See the server error log for more details. in /home/******/public_html/forums/library/XenES/Search/SourceHandler/ElasticSearch.php on line 1098

[LIST=1]
[*]XenES_Search_SourceHandler_ElasticSearch->_triggerFailedIndexError() in XenES/Search/SourceHandler/ElasticSearch.php at line 76
[*]XenES_Search_SourceHandler_ElasticSearch->finalizeRebuildSet() in XenForo/Search/Indexer.php at line 125
[*]XenForo_Search_Indexer->finalizeRebuildSet() in XenForo/Deferred/SearchIndex.php at line 76
[*]XenForo_Deferred_SearchIndex->execute() in XenForo/Model/Deferred.php at line 295
[*]XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
[*]XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 374
[*]XenForo_Model_Deferred->run() in XenForo/ViewRenderer/Abstract.php at line 352
[*]XenForo_ViewRenderer_Abstract::hasManualDeferredToRun() in XenForo/ViewRenderer/HtmlAdmin.php at line 131
[*]XenForo_ViewRenderer_HtmlAdmin->renderContainer() in XenForo/FrontController.php at line 639
[*]XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
[*]XenForo_FrontController->run() in /home/******/public_html/forums/admin.php at line 13
[/LIST]
Then, looking in the server error log, we get this:

Code:
Server Error Log
Error Info
XenForo_Exception: Elasticsearch indexing failed. See the server error log for more details. - library/XenES/Search/SourceHandler/ElasticSearch.php:1098
Generated By: ******, 35 minutes ago
Stack Trace
#0 /home/******/public_html/forums/library/XenES/Search/SourceHandler/ElasticSearch.php(76): XenES_Search_SourceHandler_ElasticSearch->_triggerFailedIndexError(Object(stdClass), Array)
#1 /home/******/public_html/forums/library/XenForo/Search/Indexer.php(125): XenES_Search_SourceHandler_ElasticSearch->finalizeRebuildSet()
#2 /home/******/public_html/forums/library/XenForo/Deferred/SearchIndex.php(76): XenForo_Search_Indexer->finalizeRebuildSet()
#3 /home/******/public_html/forums/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_SearchIndex->execute(Array, Array, 7.39161586761, '')
#4 /home/******/public_html/forums/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.39161586761, '', false)
#5 /home/******/public_html/forums/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 7.39161801338, '', false)
#6 /home/******/public_html/forums/library/XenForo/ViewRenderer/Abstract.php(352): XenForo_Model_Deferred->run(true, 7.39161801338)
#7 /home/******/public_html/forums/library/XenForo/ViewRenderer/HtmlAdmin.php(131): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun(true)
#8 /home/******/public_html/forums/library/XenForo/FrontController.php(639): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
#9 /home/******/public_html/forums/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
#10 /home/******/public_html/forums/admin.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(69) "http://www.******.com/forums/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
   ["tools/run-deferred"] => string(0) ""
  }
  ["_POST"] => array(3) {
   ["redirect"] => string(74) "http://www.******.com/forums/admin.php?tools/rebuild&success=1"
   ["execute"] => string(1) "1"
   ["_xfToken"] => string(8) "********"
  }
}

Trying to rerun it just hits the same error over and over again.

Any thoughts/ideas?

I did find this but this was from earlier before this error - could be related?
Code:
Server Error Log
Error Info
XenForo_Exception: Elasticsearch error: {"root_cause":[{"type":"parsing_exception","reason":"The field [fields] is no longer supported, please use [stored_fields] to retrieve stored fields or _source filtering if the field is not stored","line":1,"col":277}],"type":"parsing_exception","reason":"The field [fields] is no longer supported, please use [stored_fields] to retrieve stored fields or _source filtering if the field is not stored","line":1,"col":277} - library/XenES/Search/SourceHandler/ElasticSearch.php:967
Generated By: ******, Today at 4:40 PM
Stack Trace

#0 /home/******/public_html/forums/library/XenES/Search/SourceHandler/ElasticSearch.php(350): XenES_Search_SourceHandler_ElasticSearch->_logSearchResponseError(Object(stdClass), true)
#1 /home/******/public_html/forums/library/XenForo/Search/SourceHandler/Abstract.php(152): XenES_Search_SourceHandler_ElasticSearch->executeSearch('marble motoro', false, Array, Array, '', '400', Object(XenForo_Search_DataHandler_Post))
#2 /home/******/public_html/forums/library/XenForo/Search/Searcher.php(111): XenForo_Search_SourceHandler_Abstract->searchType(Object(XenForo_Search_DataHandler_Post), 'marble motoro', Array, 'relevance', 0, '400')
#3 /home/******/public_html/forums/library/XenForo/ControllerPublic/Search.php(249): XenForo_Search_Searcher->searchType(Object(XenForo_Search_DataHandler_Post), 'marble motoro', Array, 'relevance', 0)
#4 /home/******/public_html/forums/library/XenES/Proxy/ControllerSearch.php(30): XenForo_ControllerPublic_Search->actionSearch()
#5 /home/******/public_html/forums/library/XenForo/FrontController.php(351): XenES_Proxy_ControllerSearch->actionSearch()
#6 /home/******/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/******/public_html/forums/index.php(13): XenForo_FrontController->run()
#8 {main}

Request State

array(3) {
  ["url"] => string(54) "http://www.******.com/forums/search/search"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(13) {
    ["keywords"] => string(13) "marble motoro"
    ["users"] => string(0) ""
    ["date"] => string(0) ""
    ["reply_count"] => string(1) "0"
    ["prefixes"] => array(1) {
      [0] => string(0) ""
    }
    ["nodes"] => array(1) {
      [0] => string(0) ""
    }
    ["child_nodes"] => string(1) "1"
    ["order"] => string(9) "relevance"
    ["type"] => string(4) "post"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(25) "/forums/search/?type=post"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
This isn't something we've had reported before so it's possibly going to be something unique/local to this installation.
I have stumbled across this post by having the same issue. ES is 2.4.0 as well and has been running for a long time.

Elasticsearch Server: http://127.0.0.1:9200/xenforo
Version: 2.4.0
Documents: 1,740,141 (2.3 GB)
Index Updates: 3,624,938 (0.0010 seconds average)
Searches: 86,545 (0.0152 seconds average)
Fetches: 71,625 (0.0202 seconds average)

suineg@*******:~$ curl -XGET 'localhost:9200'
{
"name" : "xenforo",
"cluster_name" : "fires",
"version" : {
"number" : "2.4.0",
"build_hash" : "ce9f0c7394dee074091dd1bc4e9469251181fc55",
"build_timestamp" : "2016-08-29T09:14:17Z",
"build_snapshot" : false,
"lucene_version" : "5.5.2"
},
"tagline" : "You Know, for Search"
}

Error Info

XenForo_Exception: Elasticsearch indexing failed. See the server error log for more details. - library/XenES/Search/SourceHandler/ElasticSearch.php:1098
Generated By: suineg, 6 minutes ago


Stack Trace
#0 /var/www/html/library/XenES/Search/SourceHandler/ElasticSearch.php(76): XenES_Search_SourceHandler_ElasticSearch->_triggerFailedIndexError(Object(stdClass), Array)
#1 /var/www/html/library/XenForo/Search/Indexer.php(125): XenES_Search_SourceHandler_ElasticSearch->finalizeRebuildSet()
#2 /var/www/html/library/XenForo/Deferred/SearchIndex.php(76): XenForo_Search_Indexer->finalizeRebuildSet()
#3 /var/www/html/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_SearchIndex->execute(Array, Array, 7.2233109474182, '')
#4 /var/www/html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.2233109474182, '', false)
#5 /var/www/html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 7.2233109474182, '', false)
#6 /var/www/html/library/XenForo/ViewRenderer/Abstract.php(352): XenForo_Model_Deferred->run(true, 7.2233109474182)
#7 /var/www/html/library/XenForo/ViewRenderer/HtmlAdmin.php(131): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun(true)
#8 /var/www/html/library/XenForo/FrontController.php(639): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
#9 /var/www/html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
#10 /var/www/html/admin.php(13): XenForo_FrontController->run()
#11 {main}


Request State
array(3) {
["url"] => string(58) "https://www.********.org/admin.php?tools/run-deferred"
["_GET"] => array(1) {
["tools/run-deferred"] => string(0) ""
}
["_POST"] => array(3) {
["redirect"] => string(39) "https://www.*********.org/admin.php"
["execute"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}

I was doing a cache rebuild after the import of a few thousand posts and this error popped up. ES has not been changed in any way for over a month.

If you want any other information let me know, I won't be reinstalling ES just yet so you can have me make changes to see if it can be fixed or anything else you might need.

I do not have the other error he had, just this one

XF 1.5.9
PHP 7.0
MySQL 14.14
ES 2.4.0
Nginx 1.10.0
 
2.4 wouldn't work but put 1.5.2 on there (the version we had on the old server) and it appears to be working - and MUCH faster (weird).
Give please link to elastichsearch version that will work. I also encounter errors when re-indexing with version elastichsearch 2.4.1
My system:
XenForo 1.5.10
CentOS 7
nginx
php-fpm
 
Give please link to elastichsearch version that will work. I also encounter errors when re-indexing with version elastichsearch 2.4.1
My system:
XenForo 1.5.10
CentOS 7
nginx
php-fpm
Our server team installed it. Having said that, here's what I came up with.

Code:
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
echo 'deb http://packages.elasticsearch.org/elasticsearch/1.5/debian stable main' | sudo tee /etc/apt/sources.list.d/ela
sticsearch.list
sudo apt-get update
sudo apt-get -y install elasticsearch=1.5.2

Edit: here's a jar also if you use that http://grepcode.com/snapshot/repo1.maven.org/maven2/org.elasticsearch/elasticsearch/1.5.2
 
@Brogan just to update you.

I deleted the index in ES and then rebuilt the cache and the error went away. I have changed nothing in the config at all or anything else in the forum and changed nothing with my ES install.

@hyperthreadz maybe that will help you? Not sure.
 
The error only developed after [initially] deleting the index and rebuilding the cache. We could have left the index and it might have worked but had we done so on the version that was installed we might have run into the issues eventually. Anyways moot point being that we resolved everything by going back to 1.5.2 and rebuilding (no errors at all).
 
Top Bottom