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 network.host: 0.0.0.0 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 {10.105.197.255:9300}, bound_addresses {10.105.197.255:9300}
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}{10.105.197.255}{10.105.197.255:9300}], retrying...
org.elasticsearch.transport.ConnectTransportException: [qiang_server][10.105.197.255:9300] connect_timeout[30s]
This server's key config are following:
-
Server2:(public address: 182.254.212.***)
cluster.name: czqofnju node.name: dbc_server network.host: 0.0.0.0 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:10.105.197.255 and its node name: qiang_server, but still not able to connect to the server1?
I understand that 10.105.197.255 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 10.105.197.255 is a private address,
I have tried some other configs for network.host like
-
site:still the same address
-
115.159.157.***: this is my server's public address, while exception implying that can not bind to the request address
-
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!