Error

Mr Lucky

Well-known member
I have got a couple of these, can anyone please help:

Code:
Server error log

    XFES\Elasticsearch\ConnectException: cURL error 7: Failed to connect to localhost port 9200: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) src/addons/XFES/Elasticsearch/Api.php:390

    Generated by: Unknown account Nov 21, 2019 at 5:36 AM

Stack trace

#0 src/addons/XFES/Elasticsearch/Api.php(90): XFES\Elasticsearch\Api->request('get', '/')
#1 src/addons/XFES/Elasticsearch/Api.php(107): XFES\Elasticsearch\Api->version()
#2 src/addons/XFES/Search/Source/Elasticsearch.php(230): XFES\Elasticsearch\Api->majorVersion()
#3 src/addons/XFES/Search/Source/Elasticsearch.php(149): XFES\Search\Source\Elasticsearch->getDslFromQuery(Object(XF\Search\Query\Query), '3000')
#4 src/XF/Search/Search.php(164): XFES\Search\Source\Elasticsearch->search(Object(XF\Search\Query\Query), '3000')
#5 src/XF/Repository/Search.php(34): XF\Search\Search->search(Object(XF\Search\Query\Query))
#6 src/XF/Pub/Controller/Search.php(395): XF\Repository\Search->runSearch(Object(XF\Search\Query\Query), Array, true)
#7 src/XF/Pub/Controller/Search.php(111): XF\Pub\Controller\Search->runSearch(Object(XF\Search\Query\Query), Array)
#8 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Search->actionSearch(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Search', Object(XF\Mvc\RouteMatch), Object(LiteSpeedCache\XF\Pub\Controller\Search), NULL)
#10 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(LiteSpeedCache\XF\Pub\Controller\Search), NULL)
#11 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#13 src/XF.php(391): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}

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

Previous GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to localhost port 9200: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) - src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:185
#0 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 src/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#4 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#5 src/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(37): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#6 src/vendor/guzzlehttp/guzzle/src/Middleware.php(30): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#7 src/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(70): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#8 src/vendor/guzzlehttp/guzzle/src/Middleware.php(58): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#9 src/vendor/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#10 src/vendor/guzzlehttp/guzzle/src/Client.php(277): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#11 src/vendor/guzzlehttp/guzzle/src/Client.php(98): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#12 src/vendor/guzzlehttp/guzzle/src/Client.php(106): GuzzleHttp\Client->sendAsync(Object(GuzzleHttp\Psr7\Request), Array)
#13 src/addons/XFES/Elasticsearch/Api.php(373): GuzzleHttp\Client->send(Object(GuzzleHttp\Psr7\Request))
#14 src/addons/XFES/Elasticsearch/Api.php(90): XFES\Elasticsearch\Api->request('get', '/')
#15 src/addons/XFES/Elasticsearch/Api.php(107): XFES\Elasticsearch\Api->version()
#16 src/addons/XFES/Search/Source/Elasticsearch.php(230): XFES\Elasticsearch\Api->majorVersion()
#17 src/addons/XFES/Search/Source/Elasticsearch.php(149): XFES\Search\Source\Elasticsearch->getDslFromQuery(Object(XF\Search\Query\Query), '3000')
#18 src/XF/Search/Search.php(164): XFES\Search\Source\Elasticsearch->search(Object(XF\Search\Query\Query), '3000')
#19 src/XF/Repository/Search.php(34): XF\Search\Search->search(Object(XF\Search\Query\Query))
#20 src/XF/Pub/Controller/Search.php(395): XF\Repository\Search->runSearch(Object(XF\Search\Query\Query), Array, true)
#21 src/XF/Pub/Controller/Search.php(111): XF\Pub\Controller\Search->runSearch(Object(XF\Search\Query\Query), Array)
#22 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Search->actionSearch(Object(XF\Mvc\ParameterBag))
#23 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Search', Object(XF\Mvc\RouteMatch), Object(LiteSpeedCache\XF\Pub\Controller\Search), NULL)
#24 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(LiteSpeedCache\XF\Pub\Controller\Search), NULL)
#25 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#26 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#27 src/XF.php(391): XF\App->run()
#28 index.php(20): XF::runApp('XF\\Pub\\App')
#29 {main}

Request state

array(4) {
  ["url"] => string(14) "/search/search"
  ["referrer"] => string(80) "https://cafesaxophone.com/search/30378/?q=What+should+a+beginner+buy&o=relevance"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(3) {
    ["keywords"] => string(9) "Christian"
    ["c"] => array(1) {
      ["users"] => string(0) ""
    }
    ["_xfToken"] => string(8) "********"
  }
}
 
At the time those errors were logged, your forum was unable to connect to the Elasticsearch server. This would suggest it wasn't running, or there was some other connectivity issue. As it's connecting to localhost it would more likely suggest that it was actually just not running. You may need to inspect Elasticsearch logs from around those times to see if it encountered any issues or if it coincides with some server maintenance or similar.

If you can perform searches right now without the error occurring then it suggests the issue is currently resolved.
 
You may need to inspect Elasticsearch logs from around those times to see if it encountered any issues or if it coincides with some server maintenance or similar.

I don't have access to those logs as it's a shared server, but that all makes sense it is probably a one off.
 
Back
Top Bottom