Bug #6785

ElasticSearch always connects to localhost, not to the specified host

Added by Gioele Barabucci over 7 years ago. Updated almost 6 years ago.

Status:NewStart date:06/04/2014
Priority:MediumDue date:
Assignee:-% Done:


Target version:-
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:


During the installation phase AtoM asks for the hostname of the ElasticSearch engine. The default setting is "localhost". If one changes that hostname to something else, AtoM will correctly setup the ElasticSearch index, but will not use that information in the later queries to the index.

This becomes clear once logging is enabled modifying the source code at


The log shows that ElasticSearch attempts to connect to "localhost", regardless of the different setting set during the installation.

  "path":"atom\\/_open", "method":"POST", "data":[], "query":[],
  "connection": {


#1 Updated by Dan Gillean over 7 years ago

  • Category set to Installation
  • Assignee set to Jesús García Crespo
  • Target version set to Release 2.1.0

Hi Giole,

Thank you for filing this issue. I have assigned it to Jesus, our systems architect, so he can review it and try to reproduce here.

#2 Updated by Gioele Barabucci over 7 years ago

The root cause of this problem is the fact that the wrong "config/server.yml" is used.

The installation process creates a "config/search.yml" with the correct server name, but that file is ignored by the "arElasticSearchPlugin" because it finds in the cache the original "config/search.yml" file from "plugins/arElasticSearchPlugin".

A workaround is to clear the symfony cache once the installation is complete.

Please note that the last step of the installation at http://SERVER/atom-testing/index.php/sfInstallPlugin/configureSite fails because of the this issue. The installation plugin itself should take care of loading the correct settings before redirecting to that page.

#3 Updated by Jesús García Crespo over 7 years ago

  • Target version changed from Release 2.1.0 to Release 2.2.0

#4 Updated by Dan Gillean over 6 years ago

  • Target version deleted (Release 2.2.0)

#5 Updated by Jesús García Crespo almost 6 years ago

  • Assignee deleted (Jesús García Crespo)

Also available in: Atom PDF