guiburi
guiburi

Reputation: 1

Elasticsearch 5.5 Cross Cluster Search setup issues

I am trying to setup cross cluster search.

My issue is all my ES clusters are behind an nginx proxy with basic auth

I can access the elastic rest endpoint by requesting nginx endpoint:

https://<username>:<password>@<ngix-enpoint>:<ngix-port>

Can I use this endpoint and basic auth to setup cross cluster search?

Current elasticsearch.yml config:

search:
  remote:
    cluster_one: 
        seeds: <ngix-enpoint>:<ngix-port>
    cluster_two: 
        seeds: <ngix-enpoint>:<ngix-port>

Where shall I add auth information? Thank you.

Upvotes: 0

Views: 434

Answers (1)

antonbormotov
antonbormotov

Reputation: 1987

According to documentation, elasticsearch cross-cluster search feature requires tcp connection, it can't be configured with http endpoint.

Unfortunately, official elastic documentation doesn't cover it explicitly, but pay attention at port numbers used in config examples:

search:
    remote:
        cluster_one: 
            seeds: 127.0.0.1:9300
        cluster_two: 
            seeds: 127.0.0.1:9301

Those port numbers are from default range 9300-9400 of transport module.

It is possible to configure nginx to proxy tcp connections to elasticsearch, example can be found here. If your cross cluster search node is located in the same, dedicated subnetwork, as remote cluster, it is considered a good practice to expose port 9300 and connect directly to remote cluster nodes.

Upvotes: 0

Related Questions