Elasticsearch failed to connect to master although the http request is available

I use three servers to testify the Elasticsearch's Cluster function.
This is one of my servers' key configs:

  • Server1:(public address: 115.159.157.***)

     cluster.name: czqofnju
     node.name: qiang_server
     discovery.zen.ping.unicast.hosts: ["115.159.156.***", "182.254.212.***"]

The server's public ip address is 115.159.157.***. But when start elasticsearch, its log shows that it bounds to an private address

[2017-02-18T10:36:14,491][INFO ][o.e.t.TransportService   ] 
[qiang_server] publish_address {}, bound_addresses {}

Then when I try to use another server to connect to this server, it shows:

[2017-02-18T11:31:05,664][WARN ][o.e.d.z.ZenDiscovery     ]
[dbc_server] failed to connect to master 
[{qiang_server}{GYT635GNSaqOpBdQK4ZcGg}{O1sDFagITmWFnXRBf-uweA}{}{}], retrying... 
org.elasticsearch.transport.ConnectTransportException: [qiang_server][] connect_timeout[30s]

This server's key config are following:

  • Server2:(public address: 182.254.212.***)

     cluster.name: czqofnju
     node.name: dbc_server
     discovery.zen.ping.unicast.hosts: ["115.159.157.***"]

And if I try to send a HTTP request to Server1, it can respond.

Now my question is: why the server2 can reach server1 and get it's private address: and its node name: qiang_server, but still not able to connect to the server1?

I understand that is a private address but server2 has found server1, why they still cannot join together?

The following are some of my attempts, which all failed:
Clearly is a private address,
I have tried some other configs for network.host like

  1. site:still the same address

  2. 115.159.157.***: this is my server's public address, while exception implying that can not bind to the request address

  3. global: turning out with exception "No up-and-running global-scope (public) addresses found"

      System: CentOS 7.2 4
      JVM: OpenJDK 1.8.0_121
      Elasticsearch: 5.2.1

Any suggestions will help, thanks!

Why are your servers internet accessible? Do you not care about the data that is in ES?

it is just a test server, the data inside is useless, so I am not afraid of being attacked or stolen

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.