noamt / elasticsearch-grails-plugin

The revived ElasticSearch grails plugin
Based on Graeme Rocher initial stub. Note that it is still in early stage.
Other
63 stars 83 forks source link

discovery.zen.ping.unicast.hosts not work! #192

Closed yoga1982 closed 7 years ago

yoga1982 commented 7 years ago

Hi,

Since two instances of my application located in the two hosts. I want to make a cluster with each other. I tried to add one line settings.put("network", "_non_loopback:ipv4_") in ClientNodeFacotryBean.groovy, so that elasticsearch can host on the internal network. But they still cannot find each other. Then i tried to set "discovery.zen.ping.unicast.hosts", but when i set value for it, errors occurs in "org.elasticsearch.common.inject.ModulesBuilder.createInjector". Is there any solution for clusters solution?

yoga1982 commented 7 years ago

Found the solution. I can set the elasticsearch.yml from config.groovy or config.yml

elasticsearch.bootstrap.config.file = 'elasticsearch.yml'

then i can put the settings in elasticsearch.yml file in my project.