Elasticsearch 2.3.4 connection refused

I have upgraded ES 1.5 to 2.3.4

After that I am getting connection issues from client machine (Indexer in my case).

I haven't changed any Elasticsearch.yml configuration. I checked with IT team, there is no FW or any network issue.
It happened only when I upgraded ES version.

Please put some focus on it.


network.host I guess.

Read the breaking changes if you did not yet.
This section might help: https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_20_network_changes.html

Does that mean...

I have which accesses :9200. So I have to put netowrk setting below

is that correct?


Thanks and sorry to bother you again.

How can I set master and data node. I found there are no default setting in ES 2.3.4 as in previous version?

I got below exception after setting network host: indexer-host-ip
Starting elasticsearch: ^[[A^[[AException in thread "main" BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /indexer-host-ip:9400]; nested: BindException[Cannot assign requested address];
Likely root cause: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method)

It's set by default. You don't need to explicitly set them.

When I set network.host: non_loopback it works. I can access it too form indexer.
But when I set it to some IP address of indexer, then it shows above exception.



The doc says: https://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-network.html#common-network-settings

The node will bind to this hostname or IP address and publish (advertise) this host to other nodes in the cluster. Accepts an IP address, hostname, a special value, or an array of any combination of these.

So here you have to set the IP of the machine elasticsearch is running on.

But my problem is, If I dont sent this value and keep this at it is, I am not able to access ES from other machine which was possible in previous version.

That means curl http://ES-host:9200 is not possible from indexer-host, which is the host where logstash is running.

it works only when I set network.host: nonloopback_

How to allow ES to be acessed form other host? is it only loopback setting?


Yes. You have to define something like:

network.host: x.x.x.x

Where x.x.x.x is the IP address of the machine where elasticsearch runs.
Which is the same as _nonloopback_ if you have only one network card.

What is wrong with that?

I don't know what is wrong with that? I want to know whether its the only way to make it accessible from other clients or any other way?

I am just afraid if that ES instance will be accessible from any other machine in that case.


That was the case with 1.5 with default settings.
The difference is that now you are aware of it because you explicitly set it.

For sure, it's a bad idea to open that on internet without any security layer.
Where is your cluster running? In cloud?
What are the other machines which can have an access to it? Machines running in the same network?


My cluster is running in our environment, not in cloud.[quote="dadoonet, post:13, topic:56073"]
What are the other machines which can have an access to it? Machines running in the same network?

Those are machine in same network.

So that should not be an issue if your elasticsearch instance is in the backend layer. No one but the other services can access it.

If you want to add a security layer, you could look at Shield (X-Pack/Security in 5.0) and add ip filtering if you wish.

OK. Thanks for this. We are already in discussion with sales team for Shield :slight_smile:

One more issue from elastic-hq. I am not able to connect to cluster from HQ after I put the URL of ES-Host:9200 in the input field ?

OK, I got it.

java version where ES-HQ us running is not compatible with the one where ES is running.
Need to bring both in synch. :slight_smile: