Reindex remote cluster connection timeout

I'm trying to reindex an index from a remote cluster

POST _reindex?wait_for_completion=false
{
  "source": {
    "remote": {
      "host": "https://remote-cluster.eu-west-1.aws.found.io:9200",
      "username": "xxx",
      "password": "xxx"
    },
    "index": "index-remote"
  },
  "dest": {
    "index": "index-local"
  }
}

I'm using Elastic Cloud, both clusters are in the same account/organisation. I have setup certificate trust between the two

And I set the reindex.remote.whitelist in each of the clusters, pointing to the other cluster and I still get a connection timeout

[instance-0000000013] 56668 failed with exception java.net.ConnectException: Timeout connecting to [remote-cluster.eu-west-1.aws.found.io/xx.xx.xxx.xxx:9200] at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:169) ~[?:?] at org.apache.http.nio.pool.AbstractNIOConnPool.requestTimeout(AbstractNIOConnPool.java:632) ~[?:?] at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.timeout(AbstractNIOConnPool.java:898) ~[?:?] at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:198) ~[?:?] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:213) ~[?:?] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:158) ~[?:?] at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351) ~[?:?] at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221) ~[?:?] at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) ~[?:?] at java.lang.Thread.run(Thread.java:1570) ~[?:?]

Anyone any suggestions?

Thanks

Jeroen

One quick thing is 9200 is not the correct port used used by ESS and will not work... Try 443 and yes you need to specifically add it.

Also not exactly sure what you mean by

You should just beable to set the Trusted Environments...

Can you share what you did assume you meant these settings

Have you considered CCR?

I'd recommend doing this kind of reindex using CCS rather than the HTTP-based reindex-from-remote. Needs v8.12.0 or later (#96968) on the reindexing cluster.

@stephenb

:man_facepalming: yes that did the trick

Thanks both for helping @DavidTurner too.

I am using CCR btw, the reason to not do it here is that there are a lot of smaller indices on the remote cluster that I 1) don't want to create following indices for since I have to create 1 for every index and 2) I would like to reindex to 1 index on my local cluster.

I created auto-follow indices for all new ones so this reindexing from the remote is a one off action

Thanks again!

Jeroen

That's good, but NB I'm suggesting using CCS, i.e. cross-cluster search for the reindex operation.