Marki
Marki

Reputation: 661

Elasticsearch 2.2 cluster: adding node fails

I am trying to add a second node. Therefore I have installed the same version of ES on another host in the same network (no firewall in-between the two).

The cluster name is the default on both hosts ("elasticsearch").

On node #2 I add the IP of the first node to elasticsearch.yml:

discovery.zen.ping.unicast.hosts: ["1.2.3.1"]

(also tried discovery.zen.ping.unicast.hosts: ["127.0.0.1, "1.2.3.1"])

I shut down everything and first start node #1 and then node #2.

Node #1 gives me this soon after Node #2 comes up:

[2016-02-19 16:30:06,848][INFO ][rest.suppressed          ] /_bulk Params: {}
ClusterBlockException[blocked by: [SERVICE_UNAVAILABLE/2/no master];]
        at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:154)
        at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedRaiseException(ClusterBlocks.java:144)
        at org.elasticsearch.action.bulk.TransportBulkAction.executeBulk(TransportBulkAction.java:212)
        at org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:159)

Node #2 gives me this upon issuing a curl localhost:9200/_cat/health?pretty:

[2016-02-19 16:30:45,177][INFO ][discovery.zen            ] [Zartra] failed to send join request to master [{Western Kid}{ymbhcgNQR6WrE-zdbrj3QQ}{172.31.32.37}{172.31.32.37:9300}], reason [RemoteTransportException[[Western Kid][172.31.32.37:9300][internal:discovery/zen/join]]; nested: IllegalStateException[Node [{Western Kid}{ymbhcgNQR6WrE-zdbrj3QQ}{172.31.32.37}{172.31.32.37:9300}] not master for join request]; ]

And I thought I read that putting up an ES cluster was the easiest thing in the world ;-)

Upvotes: 0

Views: 438

Answers (1)

User42
User42

Reputation: 100

What is the "network.host" configuration on the elasticsearch.yml ?

If you keep the default configuration, it will be set to "127.0.0.1".

Try to put network.host: [_site_ , 127.0.0.1]

Upvotes: 1

Related Questions