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):
transport.port: 9307
http.port: 9207
xpack.security.enabled: false
Port settings for cluster_two:
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
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
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.
> curl localhost:9207/_remote/info
{}
The transport are reachable as well
> 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?