Search code examples
scalaelasticsearchelastic4s

elastic4s org.elasticsearch.client.transport.NoNodeAvailableException:


I'm having issues connecting to a local version of elasticsearch. I'm doing the following

val uri = ElasticsearchClientUri("elasticsearch://127.0.0.1:9300")
val client = ElasticClient.remote(uri)
lient execute { search in "_all" query "test" }

But get a

org.elasticsearch.client.transport.NoNodeAvailableException: None of the    configured nodes are available: []

exception. It doesn't matter if I go between 9200 / or 9300. ES is up and running correctly as far as I can see. Any pointers appreciated.


Solution

  • There are some possible reasons for this:

    • The client and server versions can be different
    • Cluster name can be different
    • There could be a network problem when accesing the host and port.