Elasticsearch available on internal and public ip

We have an ElasticSearch cluster running, it's local (company network) available and everything works. And I also made each node available on an external ip by configuring the network.bind_host on localhost, local and public ip.

What isn't working is the SniffingConnectionPool, I get a PingFailure error when I configure the external ip's. Sniffing on the local ip's is working as expected. I think the reason for that is the publish_address (I see that when I request GET _nodes/http,settings ) is always the local ip adress, even when I call the external ip.

So my question is how do I make the publish_address working for the local AND public ip? Is it "only" adding the external ip(s) to the discovery.zen.ping.unicast.hosts ?

I don't think this is possible, a node can only have one HTTP publish address so you must choose which one you want.

Rather than using sniffing, can you set up DNS and use a StaticConnectionPool?

Also note that you shouldn't expose Elasticsearch to the public internet.

This setting is purely about nodes in the cluster discovering each other. It has no bearing on anything to do with HTTP.

1 Like

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