# Elasticsearch cluster not success

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-not-success/82280>\
**Category:** Elasticsearch\
**Created:** [April 13, 2017, 11:35am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-not-success/82280 "2017-04-13T11:35:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Chen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_chen/32/17288_2.png) [@Daniel\_Chen](https://discuss.elastic.co/u/Daniel_Chen)\
**Post date:** [April 13, 2017, 11:35am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-not-success/82280/1 "2017-04-13T11:35:39Z")

</div>

I have two servers both installed Elasticsearch 5.3.0

And with both **elasticsearch.yml** , I've configed:

```auto
cluster.name: alfred
node.name: ${HOSTNAME}
network.host: localhost
discovery.zen.ping.unicast.hosts: ["10.0.6.35", "10.0.6.36"]

```

after restart both elasticsearch, I ran:

```auto
curl -XGET 'localhost:9200/_cluster/health?pretty'

```

**output**

```auto
{
  "cluster_name" : "alfred",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 1,
  "active_shards" : 1,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 1,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 50.0
}

```

why my **number\_of\_nodes** still 1? shouldn't it be 2?

```auto
curl -X GET 'localhost:9200/_cluster/state?pretty'

```

**output**

```auto
{
  "cluster_name" : "alfred",
  "version" : 4,
  "state_uuid" : "MsBUYzJDTPiHugbFbtPwVw",
  "master_node" : "WO_y5kdDSbyDCqyhZTcXJQ",
  "blocks" : { },
  "nodes" : {
    "WO_y5kdDSbyDCqyhZTcXJQ" : {
      "name" : "ELK-Node1",
      "ephemeral_id" : "x8TGUy3MS5Cidg3yPy-6oQ",
      "transport_address" : "127.0.0.1:9300",
      "attributes" : { }
    }
  },
  "metadata" : {
...

```

only one node was listed.

BTW, both server's ufw was inactive.

---

<div class="post-metadata">

**Author:** ![Daniel\_Chen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_chen/32/17288_2.png) [@Daniel\_Chen](https://discuss.elastic.co/u/Daniel_Chen)\
**Post date:** [April 14, 2017, 2:07am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-not-success/82280/2 "2017-04-14T02:07:16Z")

</div>

I've figured out the cause of the problem.  
in the configuration file, `network.host` should be the ip address of each node not `localhost`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 12, 2017, 2:19am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-not-success/82280/3 "2017-05-12T02:19:40Z")

</div>

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