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"
  }
}
 
What version of Elastic Search? As 5.x is likely not fully supported.

It is also annoying that you need to check the Elastic Search server logs for some indexing failures now.
 
He's referring to the Elasticsearch version, not the XenForo Enhanced Search version. If you're using an alpha of Elasticsearch 5, there may be some problems (we made changes to support it earlier but it looks like there may be more breaking changes).
 
Here you go:

Code:
curl -XGET 'localhost:9200'
{
  "name" : "Runner",
  "cluster_name" : "elasticsearch",
  "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"
}
 
Until the next version of XFES is released, you will have to ask whoever installed it to downgrade elasticsearch to a compatible version.
 
Until the next version of XFES is released, you will have to ask whoever installed it to downgrade elasticsearch to a compatible version.
And what version would that be? (As I'm not familiar with this) I have no problem requesting a downgrade, I just need to know which version to informed them to downgrade it to.
 
Here you go:

Code:
curl -XGET 'localhost:9200'
{
  "name" : "Runner",
  "cluster_name" : "elasticsearch",
  "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"
}

Until the next version of XFES is released, you will have to ask whoever installed it to downgrade elasticsearch to a compatible version.

And what version would that be? (As I'm not familiar with this) I have no problem requesting a downgrade, I just need to know which version to informed them to downgrade it to.

He has v2.4.0 and this version IS compatible, because I have it and many others have it too.
version of elasticsearch is not problem here, something other is
 
I misread the version.

ES puts the root cause for the error as: "The field [fields] is no longer supported, please use [stored_fields] to retrieve stored fields or _source filtering if the field is not stored", which apparently is related to 5.x.

This isn't something we've had reported before so it's possibly going to be something unique/local to this installation.
Is this a vanilla XF/XFES/elasticsearch installation or has it been customised in some way?
 
I misread the version.

ES puts the root cause for the error as: "The field [fields] is no longer supported, please use [stored_fields] to retrieve stored fields or _source filtering if the field is not stored", which apparently is related to 5.x.

This isn't something we've had reported before so it's possibly going to be something unique/local to this installation.
Is this a vanilla XF/XFES/elasticsearch installation or has it been customised in some way?
[Elasticsearch is] very vanilla as I wasn't aware that this could be customized.

XF itself has customizations, but this has worked before on our old server with no issues.
 
Perhaps I'm being ignorant here but I've asked my server team to install version 4 based on this reply

According to their site, the 5.x branch is beta status so you should downgrade to the version prior.

because I couldn't get a straight answer.

However, as reading this:

He has v2.4.0 and this version IS compatible, because I have it and many others have it too.
version of elasticsearch is not problem here, something other is

I'm seeing that I stand corrected.

So, since my server team hasn't done crap yet, can someone give me any kind of answer on what I should have installed to make these issues go away? As it stands, Elastic Search still isn't working and I still don't have an answer.

But then again, perhaps I'm being ignorant here? I'm just a little bit confused. Not trying to argue or complain or whatever verb fits best, I'm just trying to get work done :)
 
I already clarified above that I misread the version.

I don't have an answer for you - the error suggests it is related to the 5.x branch of elasticsearch yet you apparently have version 2.4.0 installed.

Perhaps reinstalling/recompiling on the server may help.
 
There is not version 4, nor 3, most newest stable version is 2.4.0
They decided that new major version will be 5.0

Try what Brogan said. Delete complete elasticsearch and installing it again version 2.4.0.

That was based off of Brogan's reply before I found out other information.

I had since replied:
So, since my server team hasn't done crap yet,
So there's still time to install whatever version I want (that server team can be a bunch of dumb monkey's sometimes.)

Is it possible that 2.4 is incompatible with Apache 2.4, PHP5.5 or Centos 7?
 
I think that all are compatible, Centos 7 for sure because I have it to (7.2), for elastichsearch 2.x php 5.4 is minimum.
I have nginx so, I do not know for apache, but I think that it is compatible.

If you will installing again, select newest stable version of elasticsearch - 2.4.0, same you have it now.
 
Top Bottom