XFES not working after upgrade to XFES 2.1 B1

Andro

Well-known member
As title.

Upgraded site to XF 2.1 and then upgraded add-on to XFES 2.1 B1.

Search engine stopped responding then. Optimise button was shown on XFES setting but that failed.

1.png


I also tried rebuilding search index, but it is failing. Front end shows The search could not be completed. Please try again later.

I had to change search engine into MySQL search and that works fine.

Elastic search running fine on server and nothing else i tweaked, no clue what's wrong.

Please help.
 
Error is related but it can't be a server performance issue on my case as it was working great until XFES 2.0.1 and same version of Elastic search as before. Along with that my site has been hosted on a server which has much more resources than my sized site.

After upgrade only it started happening. Something wrong with XFES 2.1.0 B1 only.

I will appreciate if @Mike can look into this issue as i can see few other members also facing this issue after upgrade.
 
This really just is related to Elasticsearch not responding -- in this case, for 20 seconds. You may find that there are errors logged within Elasticsearch itself that indicate there's some problem.

The interface with Elasticsearch is simply via HTTP. While there are some underlying changes to the HTTP library we use in 2.1, that shouldn't trigger an issue with Elasticsearch.
 
@Mike
Got the same issue on a test serve:

Code:
[LIST]
[*]XFES\Elasticsearch\ConnectException: cURL error 28: Operation timed out after 20001 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
[*] 
[*]src/addons/XFES/Elasticsearch/Api.php:390
[/LIST]
Stack trace
#0 src/addons/XFES/Elasticsearch/Api.php(246): XFES\Elasticsearch\Api->request()
#1 src/addons/XFES/Service/Configurer.php(49): XFES\Elasticsearch\Api->indexExists()
#2 src/addons/XFES/Admin/Controller/EnhancedSearch.php(83): XFES\Service\Configurer->indexExists()
#3 src/XF/Mvc/Dispatcher.php(350): XFES\Admin\Controller\EnhancedSearch->actionConfig()
#4 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass()
#5 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch()
#6 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop()
#7 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#8 src/XF.php(391): XF\App->run()
#9 admin.php(13): XF::runApp()
#10 {main}

-------------

Previous GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 20001 milliseconds with 0 bytes received (see bla
#0 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection()
#1 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError()
#2 src/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish()
#3 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke()
#4 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}()
#5 src/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(37): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}()
#6 src/vendor/guzzlehttp/guzzle/src/Middleware.php(30): GuzzleHttp\PrepareBodyMiddleware->__invoke()
#7 src/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(70): GuzzleHttp\Middleware::GuzzleHttp\{closure}()
#8 src/vendor/guzzlehttp/guzzle/src/Middleware.php(58): GuzzleHttp\RedirectMiddleware->__invoke()
#9 src/vendor/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\Middleware::GuzzleHttp\{closure}()
#10 src/vendor/guzzlehttp/guzzle/src/Client.php(277): GuzzleHttp\HandlerStack->__invoke()
#11 src/vendor/guzzlehttp/guzzle/src/Client.php(98): GuzzleHttp\Client->transfer()
#12 src/vendor/guzzlehttp/guzzle/src/Client.php(106): GuzzleHttp\Client->sendAsync()
#13 src/addons/XFES/Elasticsearch/Api.php(373): GuzzleHttp\Client->send()
#14 src/addons/XFES/Elasticsearch/Api.php(246): XFES\Elasticsearch\Api->request()
#15 src/addons/XFES/Service/Configurer.php(49): XFES\Elasticsearch\Api->indexExists()
#16 src/addons/XFES/Admin/Controller/EnhancedSearch.php(83): XFES\Service\Configurer->indexExists()
#17 src/XF/Mvc/Dispatcher.php(350): XFES\Admin\Controller\EnhancedSearch->actionConfig()
#18 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass()
#19 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch()
#20 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop()
#21 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#22 src/XF.php(391): XF\App->run()
#23 admin.php(13): XF::runApp()
#24 {main}

Request state
array(4) {
["url"] => string(33) "/admin.php?enhanced-search/config"
["referrer"] => string(54) "https://domain.com/admin.php?enhanced-search/"
["_GET"] => array(1) {
["enhanced-search/config"] => string(0) ""
}
["_POST"] => array(9) {
["host"] => string(8) "10.0.0.4"
["port"] => string(4) "9200"
["username"] => string(0) ""
["password"] => string(8) "********"
["index"] => string(8) "mfsearch"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(27) "/admin.php?enhanced-search/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}

But the strange thing is, a curl test on the console works fine:

Code:
user@webserver:/# curl -XGET 'http://10.0.0.4:9200'
{
  "name" : "search",
  "cluster_name" : "mfsearch",
  "cluster_uuid" : "_na_",
  "version" : {
    "number" : "7.5.2",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "8bec50e1e0ad29dad5653712cf3bb580cd1afcdf",
    "build_date" : "2020-01-15T12:11:52.313576Z",
    "build_snapshot" : false,
    "lucene_version" : "8.3.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

So it works from a console but not through the web...any idea?
 
After digging through logs and the ES forum, it turned out to be a bug/race condition in ES.
Rebuild the search server, reinstalled ES, changed the yml config and voila, everything works again.
 
Top Bottom