# Can a local Elasticsearch connect to a remote Elasticsearch with remote cluster feature?

**URL:** <https://discuss.elastic.co/t/can-a-local-elasticsearch-connect-to-a-remote-elasticsearch-with-remote-cluster-feature/170591>\
**Category:** Elasticsearch\
**Created:** [March 2, 2019, 1:38pm UTC](https://discuss.elastic.co/t/can-a-local-elasticsearch-connect-to-a-remote-elasticsearch-with-remote-cluster-feature/170591 "2019-03-02T13:38:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fr0der1c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fr0der1c/32/34125_2.png) [@fr0der1c](https://discuss.elastic.co/u/fr0der1c)\
**Post date:** [March 2, 2019, 1:38pm UTC](https://discuss.elastic.co/t/can-a-local-elasticsearch-connect-to-a-remote-elasticsearch-with-remote-cluster-feature/170591/1 "2019-03-02T13:38:22Z")

</div>

I have a cloud server with very limited resource running ES for my personal project. The resource is really limited so I'm thinking using a local ES cluster and the remote cluster feature to "download" indices in the cloud server. However, I encountered error:

```auto
[2019-03-02T13:23:28,408][WARN][o.e.t.RemoteClusterConnection] [elasticsearch-master-2] fetching nodes from external cluster [cluster_one] failed
org.elasticsearch.transport.ConnectTransportException: [es-sz-1][172.18.231.212:9300] connect_exception
	at org.elasticsearch.transport.TcpTransport$ChannelsConnectedListener.onFailure(TcpTransport.java:1569) ~[elasticsearch-6.6.0.jar:6.6.0]
	at org.elasticsearch.action.ActionListener.lambda$toBiConsumer$2(ActionListener.java:99) ~[elasticsearch-6.6.0.jar:6.6.0]
	at org.elasticsearch.common.concurrent.CompletableContext.lambda$addListener$0(CompletableContext.java:42) ~[elasticsearch-core-6.6.0.jar:6.6.0]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) ~[?:?]
	at org.elasticsearch.common.concurrent.CompletableContext.completeExceptionally(CompletableContext.java:57) ~[elasticsearch-core-6.6.0.jar:6.6.0]
	at org.elasticsearch.transport.netty4.Netty4TcpChannel.lambda$new$1(Netty4TcpChannel.java:72) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:121) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:327) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:343) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:556) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:510) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470) ~[?:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) ~[?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: 172.18.231.212/172.18.231.212:9300
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779) ~[?:?]
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
	... 6 more
Caused by: java.net.NoRouteToHostException: No route to host
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779) ~[?:?]
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
	... 6 more
[2019-03-02T13:23:28,413][WARN][o.e.t.RemoteClusterService] [elasticsearch-master-2] failed to update seed list for cluster: cluster_one
org.elasticsearch.transport.ConnectTransportException: [es-sz-1][172.18.231.212:9300] connect_exception
	at org.elasticsearch.transport.TcpTransport$ChannelsConnectedListener.onFailure(TcpTransport.java:1569) ~[elasticsearch-6.6.0.jar:6.6.0]
	at org.elasticsearch.action.ActionListener.lambda$toBiConsumer$2(ActionListener.java:99) ~[elasticsearch-6.6.0.jar:6.6.0]
	at org.elasticsearch.common.concurrent.CompletableContext.lambda$addListener$0(CompletableContext.java:42) ~[elasticsearch-core-6.6.0.jar:6.6.0]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) ~[?:?]
	at org.elasticsearch.common.concurrent.CompletableContext.completeExceptionally(CompletableContext.java:57) ~[elasticsearch-core-6.6.0.jar:6.6.0]
	at org.elasticsearch.transport.netty4.Netty4TcpChannel.lambda$new$1(Netty4TcpChannel.java:72) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424) ~[?:?]
	at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:121) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:327) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:343) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:556) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:510) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470) ~[?:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) ~[?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: 172.18.231.212/172.18.231.212:9300
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779) ~[?:?]
[omitted due to length limit]

```

Every time I tried to add the seed node in Kibana or using the Elasticsearch API, the above error shows in log and the seed node disappear in elasticsearch.

The IP address 172.18.231.212 is weird. Obviously it's a local IP but I have no idea what it is. My local ES runs in Docker for Mac one-node kubernetes cluster, being deployed using the official Elasticsearch helm. I wonder if my plan will work.

---

<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:** [March 2, 2019, 2:07pm UTC](https://discuss.elastic.co/t/can-a-local-elasticsearch-connect-to-a-remote-elasticsearch-with-remote-cluster-feature/170591/2 "2019-03-02T14:07:53Z")

</div>

> [@fr0der1c](#):
>
> The IP address 172.18.231.212 is weird. Obviously it's a local IP but I have no idea what it is.

I'm going to guess it's the IP address of the container running the node, but checking `GET _cat/nodes?v` on the cloud cluster will tell us for sure.

If you want to "download" indices from the cloud server to your local cluster, you are probably looking for [reindex-from-remote](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#reindex-from-remote) rather than cross-cluster search. Cross-cluster search still runs its searches on the remote cluster.

---

<div class="post-metadata">

**Author:** ![fr0der1c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fr0der1c/32/34125_2.png) [@fr0der1c](https://discuss.elastic.co/u/fr0der1c)\
**Post date:** [March 3, 2019, 7:10am UTC](https://discuss.elastic.co/t/can-a-local-elasticsearch-connect-to-a-remote-elasticsearch-with-remote-cluster-feature/170591/3 "2019-03-03T07:10:51Z")

</div>

`GET _cat/nodes?v` give me the following:

```auto
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
10.1.0.106 20 98 19 4.68 3.83 3.72 mdi - elasticsearch-master-1
10.1.0.108 45 98 19 4.68 3.83 3.72 mdi - elasticsearch-master-0
10.1.0.107 46 98 27 4.68 3.83 3.72 mdi * elasticsearch-master-2

```

So 172.18.231.212 is not the IP of any nodes. Am I right?

I'm thinking cross cluster replication actually. Will that work?

---

<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:** [March 3, 2019, 12:47pm UTC](https://discuss.elastic.co/t/can-a-local-elasticsearch-connect-to-a-remote-elasticsearch-with-remote-cluster-feature/170591/4 "2019-03-03T12:47:41Z")

</div>

Is that on your local cluster or on the remote one? Is the remote cluster an [Elastic Cloud](https://cloud.elastic.co) one? If so, it includes support, and your best bet is to ask your support contact for advice. I don't know that this is possible, and can think of reasons why it might be tricky right now, but I don't have the latest information.

---

<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 31, 2019, 12:51pm UTC](https://discuss.elastic.co/t/can-a-local-elasticsearch-connect-to-a-remote-elasticsearch-with-remote-cluster-feature/170591/5 "2019-03-31T12:51:39Z")

</div>

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