Remove a Node from elasticsearch Transport client nodes list

(Selvam) #1

HI All,

The Transport client comes with a cluster sniffing feature which allows it to dynamically add new hosts and remove old ones. When sniffing is enabled, the transport client will connect to the nodes in its internal node list, which is built via calls to addTransportAddress.

How to remove a node from elasticsearch transport client nodes list?

(Daniel Mitterdorfer) #2

Hi @Selvam_ayyanar,

You can use TransportClient#removeTransportAddress(TransportAddress) but note that addresses that you provide to the transport client are only used for the initial connection. Internally, the transport client will notice when the cluster changes (due to the sniffing feature) so there should be no real need to remove a transport address even on cluster changes.


(Selvam) #3

Thanks @danielmitterdorfer

you'r right,

But i had this problem thats why im asking this question.

(Daniel Mitterdorfer) #4

Hi @Selvam_ayyanar,

I see but why do you want to remove a transport address then? As your original question here is answered (how to remove a transport address?), I'd say let's move the discussion to the other question.


(Selvam) #5

Hi @danielmitterdorfer

in transport client we given 5 nodes ( es instance ) ip , the webapp ( jboss ) and es cluster running well and no problem.

we got exceptions and data loss when i restart only one the node ( try to make some changes ) from the cluster.

i.e The requests from jboss fails in a particular state

state == when the node is started to listen but not added into cluster.

so i planned to remove the node before restart it.

(Daniel Mitterdorfer) #6

Hi @Selvam_ayyanar,

Doesn't cause this manual work? I'd rather suggest instead the solution from the other question you've raised. As I said, the question on how to remove a transport address from the transport client is answered, so I'd say we should keep the discussion in the other thread.


(system) #7