XenForo Enhanced Search 2.1.1 Errors

Getting these errors below:

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) in src/addons/XFES/Elasticsearch/Api.php at line 390
  1. XFES\Elasticsearch\Api->request() in src/addons/XFES/Elasticsearch/Api.php at line 90
  2. XFES\Elasticsearch\Api->version() in src/addons/XFES/Elasticsearch/Api.php at line 107
  3. XFES\Elasticsearch\Api->majorVersion() in src/addons/XFES/Search/Source/Elasticsearch.php at line 230
  4. XFES\Search\Source\Elasticsearch->getDslFromQuery() in src/addons/XFES/Search/Source/Elasticsearch.php at line 149
  5. XFES\Search\Source\Elasticsearch->search() in src/XF/Search/Search.php at line 164
  6. XF\Search\Search->search() in src/XF/Repository/Search.php at line 34
  7. XF\Repository\Search->runSearch() in src/XF/Pub/Controller/Search.php at line 395
  8. XF\Pub\Controller\Search->runSearch() in src/XF/Pub/Controller/Search.php at line 111
  9. XF\Pub\Controller\Search->actionSearch() in src/XF/Mvc/Dispatcher.php at line 321
  10. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
  11. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  12. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  13. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  14. XF\App->run() in src/XF.php at line 390
  15. XF::runApp() in index.php at line 20
Any idea where to start?
 

Chris D

XenForo developer
Staff member
See our response here for a possible explanation:
 

Brogan

XenForo moderator
Staff member
You need to enter the elasticsearch server details.

If you don't know what those are, your host should be able to help.
 

6686

Member
Are you getting the exact same errors I did above?
yes, same when i comfig
XFES\Elasticsearch\ConnectException: cURL error 28: Operation timed out after 20001 milliseconds with 0 out of -1 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in src/addons/XFES/Elasticsearch/Api.phpat line 390
  1. XFES\Elasticsearch\Api->request() in src/addons/XFES/Elasticsearch/Api.php at line 246
  2. XFES\Elasticsearch\Api->indexExists() in src/addons/XFES/Service/Configurer.php at line 49
  3. XFES\Service\Configurer->indexExists() in src/addons/XFES/Admin/Controller/EnhancedSearch.php at line 83
  4. XFES\Admin\Controller\EnhancedSearch->actionConfig() in src/XF/Mvc/Dispatcher.php at line 321
  5. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 244
  6. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  7. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  8. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2178
  9. XF\App->run() in src/XF.php at line 390
  10. XF::runApp() in admin.php at line 13
Screen Shot 2019-07-31 at 7.38.55 PM.jpg
 

Chris D

XenForo developer
Staff member
cURL error 7 failed to connect (the OP) is different to cURL error 28 operation timed out (yours).

Though both are essentially network issues between the web server and the elasticsearch server.

You need to make sure elasticsearch is running and ensure there is network connectivity between them. Check for firewalls blocking and other network issues, such as the hostname/IP and port number being correct.

We can't do anything to help though apart from that as these are server configuration/network issues.
 

6686

Member
cURL error 7 failed to connect (the OP) is different to cURL error 28 operation timed out (yours).

Though both are essentially network issues between the web server and the elasticsearch server.

You need to make sure elasticsearch is running and ensure there is network connectivity between them. Check for firewalls blocking and other network issues, such as the hostname/IP and port number being correct.

We can't do anything to help though apart from that as these are server configuration/network issues.
yes, i know But I find it works perfectly.


Thank you.
 

Chris D

XenForo developer
Staff member
That just demonstrates the server is running. It doesn't indicate that your web server can make any connection to it. That's the aspect you need to troubleshoot with your host, or server support.
 

Arnox

Active member
I'm getting the same error, (cURL 7) but again, a reboot solves it (at least for a while). Is the service just automatically shutting down after a period of time for whatever reason?

I don't know if this is REALLY a server issue, but then again, I don't think it's Enhanced Search's fault either. It's probably ElasticSearch being buggy or having a faulty default configuration.
 

gerryvz

Well-known member
I do not believe at all that this is an issue with XenForo or any of its add-ons. I beleive it is a VPS issue with the ElasticSearch process (daemon?), and getting out of control and hogging the processor. This has happened two times for me since March. A reboot has solved it both times.

My VPS is set to warn me via email/text if a process gets out of control for more than an hour or two. I can go in via Terminal on my phone, or via the VPS management console (manager.linode.com) to reboot the system, restart a needed process, etc. In the case of the bad ElasticSearch process, it seems that only a full VPS reboot will solve the issue.
 

webbouk

Well-known member
We have had the same issue as the OP and it appears that ElasticSearch was trying to run off a non-exsistent Java version, possibly due to a recent java automatic update.

Updating the Java location allowed the ElasticSearch service to be restarted
 
Top