• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Elasticsearch indexing failed

Sunka

Well-known member
#1
Installed xfes 1.1.8, xenforo 1.5.16, and elasticsearch 6
Reindex failed.
This is server logs:

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:1195
Generated By: Sunka, 2 minutes ago
Stack Trace
#0 /home/nginx/domains/pijanitvor.com/public/library/XenES/Search/SourceHandler/ElasticSearch.php(81): XenES_Search_SourceHandler_ElasticSearch->_triggerFailedIndexError(Object(stdClass), Array)
#1 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Search/Indexer.php(125): XenES_Search_SourceHandler_ElasticSearch->finalizeRebuildSet()
#2 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Deferred/SearchIndex.php(76): XenForo_Search_Indexer->finalizeRebuildSet()
#3 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_SearchIndex->execute(Array, Array, 6.2101969718933, '')
#4 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 6.2101969718933, '', false)
#5 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 6.2101979255676, '', false)
#6 /home/nginx/domains/pijanitvor.com/public/library/XenForo/ViewRenderer/Abstract.php(354): XenForo_Model_Deferred->run(true, 6.2101979255676)
#7 /home/nginx/domains/pijanitvor.com/public/library/XenForo/ViewRenderer/HtmlAdmin.php(131): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun(true)
#8 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(662): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
#9 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(176): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
#10 /home/nginx/domains/pijanitvor.com/public/admin.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(55) "https://www.pijanitvor.com/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["redirect"] => string(60) "https://www.pijanitvor.com/admin.php?tools/rebuild&success=1"
    ["execute"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
Code:
Server Error Log
Error Info
XenForo_Exception: Elasticsearch indexing failed for report-1 Elasticsearch error: failed to parse [is_report] - library/XenES/Search/SourceHandler/ElasticSearch.php:1062
Generated By: Sunka, 1 minute ago
Stack Trace
#0 /home/nginx/domains/pijanitvor.com/public/library/XenES/Search/SourceHandler/ElasticSearch.php(1185): XenES_Search_SourceHandler_ElasticSearch->_logSearchResponseError(Object(stdClass), true, 'Elasticsearch i...')
#1 /home/nginx/domains/pijanitvor.com/public/library/XenES/Search/SourceHandler/ElasticSearch.php(81): XenES_Search_SourceHandler_ElasticSearch->_triggerFailedIndexError(Object(stdClass), Array)
#2 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Search/Indexer.php(125): XenES_Search_SourceHandler_ElasticSearch->finalizeRebuildSet()
#3 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Deferred/SearchIndex.php(76): XenForo_Search_Indexer->finalizeRebuildSet()
#4 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_SearchIndex->execute(Array, Array, 8, '')
#5 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 8, '', false)
#6 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 8, '', false)
#7 /home/nginx/domains/pijanitvor.com/public/library/XenForo/ControllerAdmin/Tools.php(159): XenForo_Model_Deferred->run(true, NULL, '', false)
#8 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(369): XenForo_ControllerAdmin_Tools->actionRunDeferred()
#9 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(152): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/nginx/domains/pijanitvor.com/public/admin.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(55) "https://www.pijanitvor.com/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["redirect"] => string(60) "https://www.pijanitvor.com/admin.php?tools/rebuild&success=1"
    ["execute"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
 

Sunka

Well-known member
#2
P.S.

In ElasticSearch.php, line 1195 is
// bulk action

segment of code:

Code:
        if (!empty($result->error))
        {
            if (!empty($result->_type) && !empty($result->_id))
            {
                $typeAndId = XenES_Api::getTypeAndIdFromHit($result);
                $failed[] = array($typeAndId[0], $typeAndId[1], $result->error);
            }
            else
            {
                $failed[] = array('', '', $result->error);
            }
        }
        else if (!empty($result->items))
        {
            // bulk action
            foreach ($result->items AS $item)
            {
                if (!empty($item->index))
                {
                    $record = $item->index;
                }
                else if (!empty($item->delete))
                {
                    $record = $item->delete;
                }
                else
                {
                    continue;
                }

                if (!empty($record->error))
                {
                    $typeAndId = XenES_Api::getTypeAndIdFromHit($record);
                    $failed[] = array($typeAndId[0], $typeAndId[1], $record->error);
                }
            }
        }

In ACP is notice There are manual rebuild processes that have been stopped before completion. Click here to complete them., but click on it started to continue rebuilding and next second it stops with above server error
 
Last edited:

Mike

XenForo developer
Staff member
#3
The error appears to relate to indexing of reports which is from an add-on. Elasticsearch 6 has various changes that add-ons may need to account for, so you will need to contact the add-on author for guidance.
 

Sunka

Well-known member
#6
@Xon
Yep.
Installed xfes, installed elasticsearch, delete index in xenforo acp, start rebuilding and after few minutes stop with this error