# Unable to add remote cluster for CCS

**URL:** <https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637>\
**Category:** Elasticsearch\
**Tags:** ccs-cross-cluster-search\
**Created:** [February 18, 2021, 2:00am UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637 "2021-02-18T02:00:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![susindaran](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@susindaran](https://discuss.elastic.co/u/susindaran)\
**Post date:** [February 18, 2021, 2:00am UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/1 "2021-02-18T02:00:07Z")

</div>

I am simply spinning up two Elasticsearch instances in the same machine and trying to add one as a remote cluster to the other one.

Settings for cluster\_one (only the relevant part):

```auto
    transport.port: 9307
    http.port: 9207
    xpack.security.enabled: false

```

Port settings for cluster\_two:

```auto
    transport.port: 9357
    http.port: 9257
    xpack.security.enabled: false

    cluster:
      remote:
        cluster_one:
          seeds: 127.0.0.1:9307

```

Here's the document I want to search in `cluster_one`

```auto
curl localhost:9207/cc-idx/_search
{"took":35,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":1,"relation":"eq"},"max_score":1.0,"hits":[{"_index":"cc-idx","_type":"1","_id":"WdYtsncBXLIED8mInk4S","_score":1.0,"_source":{"name": "John Doe", "tag": "apple"}}]}}

```

When I try to query `cluster_one` from the other cluster, its unable to find the index

```auto
curl localhost:9257/cluster_one:cc-idx/_search
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [cluster_one:cc-idx]","resource.type":"index_or_alias","resource.id":"cluster_one:cc-idx","index_uuid":"_na_","index":"cluster_one:cc-idx"}],"type":"index_not_found_exception","reason":"no such index [cluster_one:cc-idx]","resource.type":"index_or_alias","resource.id":"cluster_one:cc-idx","index_uuid":"_na_","index":"cluster_one:cc-idx"},"status":404}

```

I am not seeing anything in the logs - no errors, no debug or trace, nothing!

`_remote/info API` return empty result.

```auto
> curl localhost:9207/_remote/info
{}

```

The transport are reachable as well

```auto
> curl localhost:9307
This is not an HTTP port

> curl localhost:9357
This is not an HTTP port

```

What am I doing wrong here? Am I missing a setting that's making the cluster undiscoverable to the other?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 18, 2021, 9:09am UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/2 "2021-02-18T09:09:48Z")

</div>

> [@susindaran](#):
>
> `_remote/info API` return empty result.

Did you [configure the remote cluster](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-remote-clusters.html)?

---

<div class="post-metadata">

**Author:** ![susindaran](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@susindaran](https://discuss.elastic.co/u/susindaran)\
**Post date:** [February 18, 2021, 5:28pm UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/3 "2021-02-18T17:28:14Z")

</div>

Thanks for the response @DavidTurner

Like I pointed out in the config above, I have configured the remote cluster. Both via `elasticsearch.yml` and via the `_cluster/settings` API.

Here is the response of `GET _cluster/settings`

```auto
curl localhost:9257/_cluster/settings
{"persistent":{"cluster":{"remote":{"cluster_one":{"seeds":["127.0.0.1:9307"]}}}},"transient":{}}

```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 18, 2021, 5:49pm UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/4 "2021-02-18T17:49:00Z")

</div>

Hmm, that's very strange, I can't see how you would get an empty result from `GET _remote/info` if the remote cluster really was configured.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 18, 2021, 5:53pm UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/5 "2021-02-18T17:53:41Z")

</div>

Aha I see, you need to do `curl http://localhost:9257/_remote/info` not `curl http://localhost:9207/_remote/info`. The remote cluster is defined on `cluster_two` not `cluster_one`.

---

<div class="post-metadata">

**Author:** ![susindaran](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@susindaran](https://discuss.elastic.co/u/susindaran)\
**Post date:** [February 18, 2021, 5:56pm UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/6 "2021-02-18T17:56:03Z")

</div>

Sorry for the confusion. Both the clusters return empty result for `_remote/info`

```auto
> curl localhost:9257/_cluster/settings
{"persistent":{"cluster":{"remote":{"cluster_one":{"seeds":["127.0.0.1:9307"]}}}},"transient":{}}

> curl http://localhost:9257/_remote/info
{}

```

```auto
> curl localhost:9207/_cluster/settings
{"persistent":{},"transient":{}}

> curl http://localhost:9207/_remote/info
{}

```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 18, 2021, 6:00pm UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/7 "2021-02-18T18:00:48Z")

</div>

Ok, weird. What version are we discussing?

---

<div class="post-metadata">

**Author:** ![susindaran](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@susindaran](https://discuss.elastic.co/u/susindaran)\
**Post date:** [February 18, 2021, 6:02pm UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/8 "2021-02-18T18:02:41Z")

</div>

```auto
> curl http://localhost:9207/
{
  "name" : "node-1",
  "cluster_name" : "cluster_one",
  "version" : {
    "number" : "7.9.3",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "c4138e51121ef06a6404866cddc601906fe5c868",
    "build_date" : "2020-10-16T10:36:16.141335Z",
    "build_snapshot" : false,
    "lucene_version" : "8.6.2",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

> curl http://localhost:9257/
{
  "name" : "node-1",
  "cluster_name" : "cluster_two",
  "version" : {
    "number" : "7.9.3",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "c4138e51121ef06a6404866cddc601906fe5c868",
    "build_date" : "2020-10-16T10:36:16.141335Z",
    "build_snapshot" : false,
    "lucene_version" : "8.6.2",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 18, 2021, 6:06pm UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/9 "2021-02-18T18:06:17Z")

</div>

Can you share `GET _cat/nodes` from both clusters?

---

<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:** [March 18, 2021, 6:06pm UTC](https://discuss.elastic.co/t/unable-to-add-remote-cluster-for-ccs/264637/10 "2021-03-18T18:06:59Z")

</div>

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