# Cluster config not working

**URL:** <https://discuss.elastic.co/t/cluster-config-not-working/175740>\
**Category:** Elasticsearch\
**Created:** [April 7, 2019, 10:00pm UTC](https://discuss.elastic.co/t/cluster-config-not-working/175740 "2019-04-07T22:00:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haux](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@haux](https://discuss.elastic.co/u/haux)\
**Post date:** [April 7, 2019, 10:00pm UTC](https://discuss.elastic.co/t/cluster-config-not-working/175740/1 "2019-04-07T22:00:22Z")

</div>

Hi,

Trying to setup two ES clusters: "cluster1" & "cluster2" (each cluster has one node), but both dockers crash after few seconds

The first cluster:

docker-compose.yml:

```auto
version: '3.3'

services:

  elasticsearch1:
    hostname: elasticsearch1
    build:
      context: elasticsearch/
      args:
        ELK_VERSION: 6.7.0
    volumes:
      - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
    ports:
      - "9201:9200"
      - "9301:9300"
    environment:
      - "ES_JAVA_OPTS=-Xmx500m -Xms500m"
    networks:
      - kibana-es

  kibana1:
    hostname: kibana1
    build:
      context: kibana/
      args:
          ELK_VERSION: 6.7.0
    volumes:
      - ./kibana/config/:/usr/share/kibana/config:ro
    ports:
      - "5601:5601"
    networks:
      - kibana-es

networks:
  kibana-es:
    driver: bridge

```

elasticsearch1.yml:

```auto
cluster.name: "cluster1"
network.host: 0.0.0.0

cluster:
  remote:
    cluster2:
      seeds: 192.168.56.1:9302
      skip_unavailable: false

```

* * *

The second cluster

docker-compose.yml:

```auto
version: '3.3'

services:

  elasticsearch2:
    hostname: elasticsearch2
    build:
      context: elasticsearch/
      args:
        ELK_VERSION: 6.7.0
    volumes:
      - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
    ports:
      - "9202:9200"
      - "9302:9300"
    environment:
      - "ES_JAVA_OPTS=-Xmx500m -Xms500m"
    networks:
      - kibana-es2

  kibana2:
    hostname: kibana2
    build:
      context: kibana/
      args:
          ELK_VERSION: 6.7.0
    volumes:
      - ./kibana/config/:/usr/share/kibana/config:ro
    ports:
      - "5602:5601"
    networks:
      - kibana-es2

networks:
  kibana-es2:
    driver: bridge

```

elasticsearch2.yml:

```auto
cluster.name: "cluster2"
network.host: 0.0.0.0

cluster:
  remote:
    cluster1:
      seeds: 192.168.56.1:9301
      skip_unavailable: false

```

The log output for elasticsearch1

```auto
[2019-04-07T20:54:21,301][INFO][o.e.x.m.p.l.CppLogMessageHandler] [kOhAJUR] [controller/87] [Main.cc@109] controller (64 bit): Version 6.7.0 (Build d74ae2ac01b10d) Copyright (c) 2019 Elasticsearch BV
[2019-04-07T20:54:22,509][INFO][o.e.d.DiscoveryModule] [kOhAJUR] using discovery type [zen] and host providers [settings]
[2019-04-07T20:54:23,939][INFO][o.e.n.Node] [kOhAJUR] initialized
[2019-04-07T20:54:23,940][INFO][o.e.n.Node] [kOhAJUR] starting ...
[2019-04-07T20:54:24,167][INFO][o.e.t.TransportService] [kOhAJUR] publish_address {172.24.0.3:9300}, bound_addresses {0.0.0.0:9300}
[2019-04-07T20:54:24,305][WARN][o.e.t.RemoteClusterConnection] [kOhAJUR] fetching nodes from external cluster [apache2] failed
org.elasticsearch.transport.ConnectTransportException: [][192.168.56.1:9202] general node connection failure
        at org.elasticsearch.transport.TcpTransport$ChannelsConnectedListener$1.onFailure(TcpTransport.java:1294) ~[elasticsearch-6.7.0.jar:6.7.0]   

```

The connectivity is allowed between the two nodes.

Any idea if the problem is the configuration of my two clusters?

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [April 9, 2019, 12:17pm UTC](https://discuss.elastic.co/t/cluster-config-not-working/175740/2 "2019-04-09T12:17:56Z")

</div>

Hi @haux,

there are two immediate things that stand out:

> fetching nodes from external cluster [apache2] failed

and

> [192.168.56.1:9202]

`apache2` is not the one defined in the .yml file. And the port in use is 9202, should probably have been 9302.

A guess is that this definition is stored in the cluster settings on cluster1, see: [Remote clusters | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-remote-clusters.html#configuring-remote-clusters) for more info.

---

<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 7, 2019, 12:18pm UTC](https://discuss.elastic.co/t/cluster-config-not-working/175740/3 "2019-05-07T12:18:07Z")

</div>

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