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

Server Error

Discussion in 'Enhanced Search Support' started by wohlfman, Jul 1, 2016.

  1. wohlfman

    wohlfman New Member

    I've asked my devs to take a look, but figured I'd post here. Error received when trying to rebuild search index.

    XenForo Enhanced Search 1.1.4
    Digital Point Search 1.1.3
    Xenforo 1.5.8
    Elastic Search 1.0.2-1

    Error Info:
    ErrorException: json_encode(): Invalid UTF-8 sequence in argument - library/XenES/Api.php:117

    Stack Trace
    #0 [internal function]: XenForo_Application::handlePhpError(2, 'json_encode(): ...', '/chroot/home/co...', 117, Array)
    #1 /chroot/home/concour1/myforum.com/html/library/XenES/Api.php(117): json_encode(Array)
    #2 /chroot/home/concour1/myforum.com/html/library/XenES/Search/SourceHandler/ElasticSearch.php(73): XenES_Api::indexBulk('concour1_sbf_xe...', 'report', Array)
    #3 /chroot/home/concour1/myforum.com/html/library/DigitalPointSearch/Search/SourceHandler/ElasticSearch.php(11): XenES_Search_SourceHandler_ElasticSearch->finalizeRebuildSet()
    #4 /chroot/home/concour1/myforum.com/html/library/XenForo/Model/Deferred.php(295): DigitalPointSearch_Search_SourceHandler_ElasticSearch->__destruct()
    #5 /chroot/home/concour1/myforum.com/html/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_SearchIndex->execute(Array, Array, 7.9999980926514, '')
    #6 /chroot/home/concour1/myforum.com/html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999980926514, '', false)
    #7 /chroot/home/concour1/myforum.com/html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
    #8 /chroot/home/concour1/myforum.com/html/library/XenForo/ControllerAdmin/Tools.php(159): XenForo_Model_Deferred->run(true, NULL, '', false)
    #9 /chroot/home/concour1/myforum.com/html/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_Tools->actionRunDeferred()
    #10 /chroot/home/concour1/myforum.com/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #11 /chroot/home/concour1/myforum.com/html/admin.php(13): XenForo_FrontController->run()
    #12 {main}

    Request state:
    array(3) {
    ["url"] => string(59) "http://myforum.com/admin.php?tools/run-deferred"
    ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
    }
    ["_POST"] => array(5) {
    ["execute"] => string(1) "1"
    ["_xfRequestUri"] => string(24) "/admin.php?tools/rebuild"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
    }
    }
     
  2. Mike

    Mike XenForo Developer Staff Member

    We've seen this a couple times, though it's not generally completely clear as to why it happens as MySQL should generally be validating the UTF-8 before insertion.

    A relevant point here is that this appears to be related to indexing reports, which isn't a standard content type, so it makes it more difficult to debug as we don't know what is being passed to the index exactly.
     
  3. wohlfman

    wohlfman New Member

    Thanks for the response. So, I'm assuming that it's due to Digital Point Site Search add-on.
     
  4. wohlfman

    wohlfman New Member

    It's because my reports were imported from VB (we just migrated).
     
  5. wohlfman

    wohlfman New Member

    OK, I have a new one now. Can anyone point me in the right direction? I'm of course willing to pay a dev to fix this for me.

    XenForo_Exception: No response returned from Elasticsearch. Is it running? - library/XenES/Search/SourceHandler/ElasticSearch.php:976

    #0 /chroot/home/concour1/forums.mysite.com/html/library/DigitalPointSearch/Search/SourceHandler/ElasticSearch.php(46): XenES_Search_SourceHandler_ElasticSearch->_assertIndexSuccessful(Object(stdClass), 'thread')
    #1 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Search/Indexer.php(44): DigitalPointSearch_Search_SourceHandler_ElasticSearch->insertIntoIndex('thread', 38336, 't dog lxi', '', 1104951068, 3716, 38336, Array)
    #2 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Search/DataHandler/Thread.php(59): XenForo_Search_Indexer->insertIntoIndex('thread', 38336, 't dog lxi', '', 1104951068, 3716, 38336, Array)
    #3 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Search/DataHandler/Abstract.php(275): XenForo_Search_DataHandler_Thread->_insertIntoIndex(Object(XenForo_Search_Indexer), Array, NULL)
    #4 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Search/DataHandler/Thread.php(119): XenForo_Search_DataHandler_Abstract->insertIntoIndex(Object(XenForo_Search_Indexer), Array)
    #5 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Search/DataHandler/Thread.php(101): XenForo_Search_DataHandler_Thread->quickIndex(Object(XenForo_Search_Indexer), Array)
    #6 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Deferred/SearchIndex.php(74): XenForo_Search_DataHandler_Thread->rebuildIndex(Object(XenForo_Search_Indexer), 0, 5000)
    #7 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_SearchIndex->execute(Array, Array, 7.3963878154755, '')
    #8 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.3963878154755, '', false)
    #9 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 7.3963918685913, '', false)
    #10 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/ViewRenderer/Abstract.php(352): XenForo_Model_Deferred->run(true, 7.3963918685913)
    #11 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/ViewRenderer/HtmlAdmin.php(131): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun(true)
    #12 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/FrontController.php(639): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
    #13 /chroot/home/concour1/forums.mysite.com/html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
    #14 /chroot/home/concour1/forums.mysite.com/html/admin.php(13): XenForo_FrontController->run()
    #15 {main}

    array(3) {
    ["url"] => string(59) "http://forums.mysite.com/admin.php?tools/run-deferred"
    ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
    }
    ["_POST"] => array(3) {
    ["redirect"] => string(40) "http://forums.mysite.com/admin.php"
    ["execute"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    }
    }

    According to my host:

    Elasticsearch is indeed running currently. MySQL is running properly at this time, however I am seeing a few delayed queries running, which may be strange.

    1415017 DELAYED localhost concour1_s 243 Delaye Waiting for INSERT
    1413328 DELAYED localhost concour1_s 43 Delaye Waiting for INSERT
    1412999 DELAYED localhost concour1_s 1 Delaye Waiting for INSERT

    The column starting with 243 is the amount of time the query has been running, or in this case been waiting for some INSERT query to be run. This might be worth having your dev team take a look at the info and determine why queries are being created in that state and how to stop it.
     
  6. Mike

    Mike XenForo Developer Staff Member

    Elasticsearch is unrelated to MySQL, so any checking within MySQL won't show details about what's going on with ES. On a side note, those delayed connections are normal and expected. It's a MySQL feature (delayed inserts).

    Can you consistently reproduce this error? It looks like you were rebuilding the search index when it happened.
     
  7. wohlfman

    wohlfman New Member

    Yes, as soon as I click rebuild caches from Tools section, I'm greeted with this popup:

    An exception occurred: No response returned from Elasticsearch. Is it running? in /chroot/home/concour1/mysite.com/html/library/XenES/Search/SourceHandler/ElasticSearch.php on line 976

    1. XenES_Search_SourceHandler_ElasticSearch->_assertIndexSuccessful() in DigitalPointSearch/Search/SourceHandler/ElasticSearch.php at line 46
    2. DigitalPointSearch_Search_SourceHandler_ElasticSearch->insertIntoIndex() in XenForo/Search/Indexer.php at line 44
    3. XenForo_Search_Indexer->insertIntoIndex() in XenForo/Search/DataHandler/Thread.php at line 59
    4. XenForo_Search_DataHandler_Thread->_insertIntoIndex() in XenForo/Search/DataHandler/Abstract.php at line 275
    5. XenForo_Search_DataHandler_Abstract->insertIntoIndex() in XenForo/Search/DataHandler/Thread.php at line 119
    6. XenForo_Search_DataHandler_Thread->quickIndex() in XenForo/Search/DataHandler/Thread.php at line 101
    7. XenForo_Search_DataHandler_Thread->rebuildIndex() in XenForo/Deferred/SearchIndex.php at line 74
    8. XenForo_Deferred_SearchIndex->execute() in XenForo/Model/Deferred.php at line 295
    9. XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
    10. XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 374
    11. XenForo_Model_Deferred->run() in XenForo/ViewRenderer/Abstract.php at line 352
    12. XenForo_ViewRenderer_Abstract::hasManualDeferredToRun() in XenForo/ViewRenderer/Json.php at line 147
    13. XenForo_ViewRenderer_Json::_addDefaultParams() in XenForo/ViewRenderer/Json.php at line 185
    14. XenForo_ViewRenderer_Json::jsonEncodeForOutput() in XenForo/ViewRenderer/Json.php at line 61
    15. XenForo_ViewRenderer_Json->renderError() in XenForo/FrontController.php at line 595
    16. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
    17. XenForo_FrontController->run() in /chroot/home/concour1/mysite.com/html/admin.php at line 13

    I can close out that error, but anytime I try to rebuild anything listed on the page, I get the error.
     
  8. Mike

    Mike XenForo Developer Staff Member

    This may be a bug in the error handling code. If you submit a ticket with FTP and ACP login details, I can take a look. I suspect it may be related to the first error. (Please reference this thread in the ticket.)
     
  9. wohlfman

    wohlfman New Member

    OK, thank you. I will submit a ticket. What's weird is that I'm now experiencing something different (you will see via the server log errors that this was not the case previously).

    I believe I clicked rebuild thread information (I've clicked so many things, it's a little fuzzy now). It started rebuilding conversations (part of digital point functionality).

    Now instead of the error, when clicking Tools > Rebuild Caches, I'm getting Processing (see below) followed by Conversations being rebuilt in increments of 5,000. It seems to chug through about 50K-150K of them, albeit it very slowly, and then just stops. The processing prompt disappears and I'm left on the screen with no error message or rebuilt successful messaging. I've tried this 3 times with same result. I'm not sure if it is helpful but at some point last week, I set the conversations to rebuild at 5K increments, tried to rebuild only to receive the error.



    upload_2016-7-6_16-23-35.png
     
  10. Xon

    Xon Well-Known Member

    I'm baffled why @digitalpoint's DigitalPointSearch is injecting the report's content_info filed into the search index. This is a binary blob which has the results of serialized() sent to it, there is no requirement for it to be valid UTF8.

    The Alter Ego Detector add-on is just stick two user records rather than 1 user record (compared to a reported user profile) into the content_info. Even then, the generated report comment text is deliberately designed to be searchable.
     

Share This Page