# TransportClient misuse cluster name when connection to the cluster

**URL:** <https://discuss.elastic.co/t/transportclient-misuse-cluster-name-when-connection-to-the-cluster/4683>\
**Category:** Elasticsearch\
**Created:** [June 22, 2011, 10:36am UTC](https://discuss.elastic.co/t/transportclient-misuse-cluster-name-when-connection-to-the-cluster/4683 "2011-06-22T10:36:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Weiwei\_Wang](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@Weiwei\_Wang](https://discuss.elastic.co/u/Weiwei_Wang)\
**Post date:** [June 22, 2011, 10:36am UTC](https://discuss.elastic.co/t/transportclient-misuse-cluster-name-when-connection-to-the-cluster/4683/1 "2011-06-22T10:36:24Z")

</div>

I have two clusters: pimsearch and elasticsearch both on the same  
server group.

cluster pimsearch use port 9300  
cluster elasticsearch use port 9301

the ips for the two clusters are 192.168.0.1, 192.168.0.2,  
192.168.0.3, 192.168.0.4

i connect to the cluster with TransportClient by setting  
client.transport.sniff=true and addTransportAddress(192.168.0.1) on  
port 9301 or 9300.

however, when i connect to 192.168.0.1:9301, the TransportClient  
complains  
17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/10.18.102.103:9301]]  
not part of the cluster Cluster [pimsearch], ignoring...

when i init TransportClient by setting "cluster.name" with  
"elasticsearch", it works fine. confusing, as when i connect to  
cluster "pimsearch", i do not need to set "cluster.name"

I do not know why this happens, as the node TransportClient connected  
to should send back the cluster information.

could anybody here give me an explanation?

---

<div class="post-metadata">

**Author:** ![Pat\_Christopher](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Pat\_Christopher](https://discuss.elastic.co/u/Pat_Christopher)\
**Post date:** [June 22, 2011, 9:45pm UTC](https://discuss.elastic.co/t/transportclient-misuse-cluster-name-when-connection-to-the-cluster/4683/2 "2011-06-22T21:45:17Z")

</div>

You should have to set cluster.name for both of those connection  
attempts. The message you're seeing:

17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/  
10.18.102.103:9301]]  
not part of the cluster Cluster [pimsearch], ignoring...

means you have sniffed a node that is not part of the cluster you are  
attempting to connect to. This only comes up during sniffing, I  
believe.

My shot in the dark is that the TransportClient is picking up the  
value 'pimsearch' as the default cluster to connect to. This value is  
'elasticsearch' out of the box but can be overridden.

Pat

On Jun 22, 3:36 am, Weiwei Wang [ww.wang...@gmail.com](mailto:ww.wang...@gmail.com) wrote:

> I have two clusters: pimsearch and elasticsearch both on the same  
> server group.
> 
> cluster pimsearch use port 9300  
> cluster elasticsearch use port 9301
> 
> the ips for the two clusters are 192.168.0.1, 192.168.0.2,  
> 192.168.0.3, 192.168.0.4
> 
> i connect to the cluster with TransportClient by setting  
> client.transport.sniff=true and addTransportAddress(192.168.0.1) on  
> port 9301 or 9300.
> 
> however, when i connect to 192.168.0.1:9301, the TransportClient  
> complains  
> 17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
> org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
> Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/10.18.102.103:9301]]  
> not part of the cluster Cluster [pimsearch], ignoring...
> 
> when i init TransportClient by setting "cluster.name" with  
> "elasticsearch", it works fine. confusing, as when i connect to  
> cluster "pimsearch", i do not need to set "cluster.name"
> 
> I do not know why this happens, as the node TransportClient connected  
> to should send back the cluster information.
> 
> could anybody here give me an explanation?

---

<div class="post-metadata">

**Author:** ![Weiwei\_Wang](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@Weiwei\_Wang](https://discuss.elastic.co/u/Weiwei_Wang)\
**Post date:** [June 24, 2011, 3:22am UTC](https://discuss.elastic.co/t/transportclient-misuse-cluster-name-when-connection-to-the-cluster/4683/3 "2011-06-24T03:22:05Z")

</div>

i also tried set sniff to false, and add all the transport address  
manually without setting the cluster.name, the problem is still there.

however, before i set up the second cluster, the code works fine

On Jun 23, 5:45 am, Pat Christopher [pat.christopher...@gmail.com](mailto:pat.christopher...@gmail.com)  
wrote:

> You should have to set cluster.name for both of those connection  
> attempts. The message you're seeing:
> 
> 17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
> org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
> Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/  
> 10.18.102.103:9301]]  
> not part of the cluster Cluster [pimsearch], ignoring...
> 
> means you have sniffed a node that is not part of the cluster you are  
> attempting to connect to. This only comes up during sniffing, I  
> believe.
> 
> My shot in the dark is that the TransportClient is picking up the  
> value 'pimsearch' as the default cluster to connect to. This value is  
> 'elasticsearch' out of the box but can be overridden.
> 
> Pat
> 
> On Jun 22, 3:36 am, Weiwei Wang [ww.wang...@gmail.com](mailto:ww.wang...@gmail.com) wrote:
> 
> > I have two clusters: pimsearch and elasticsearch both on the same  
> > server group.
> 
> > cluster pimsearch use port 9300  
> > cluster elasticsearch use port 9301
> 
> > the ips for the two clusters are 192.168.0.1, 192.168.0.2,  
> > 192.168.0.3, 192.168.0.4
> 
> > i connect to the cluster with TransportClient by setting  
> > client.transport.sniff=true and addTransportAddress(192.168.0.1) on  
> > port 9301 or 9300.
> 
> > however, when i connect to 192.168.0.1:9301, the TransportClient  
> > complains  
> > 17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
> > org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
> > Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/10.18.102.103:9301]]  
> > not part of the cluster Cluster [pimsearch], ignoring...
> 
> > when i init TransportClient by setting "cluster.name" with  
> > "elasticsearch", it works fine. confusing, as when i connect to  
> > cluster "pimsearch", i do not need to set "cluster.name"
> 
> > I do not know why this happens, as the node TransportClient connected  
> > to should send back the cluster information.
> 
> > could anybody here give me an explanation?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 24, 2011, 12:17pm UTC](https://discuss.elastic.co/t/transportclient-misuse-cluster-name-when-connection-to-the-cluster/4683/4 "2011-06-24T12:17:06Z")

</div>

Both with sniff enabled and not, nodes with the "wrong" cluster name are not filtered out.

The "sniffing" process simply goes to the relevant node you connected to explicitly, and gets the list of nodes it knows about and are part of its cluster.

Something is strange with what you do...

On Friday, June 24, 2011 at 6:22 AM, Weiwei Wang wrote:

> i also tried set sniff to false, and add all the transport address  
> manually without setting the cluster.name ([http://cluster.name](http://cluster.name)), the problem is still there.
> 
> however, before i set up the second cluster, the code works fine
> 
> On Jun 23, 5:45 am, Pat Christopher \<[pat.christopher...@gmail.com](mailto:pat.christopher...@gmail.com) ([http://gmail.com](http://gmail.com))\>  
> wrote:
> 
> > You should have to set cluster.name ([http://cluster.name](http://cluster.name)) for both of those connection  
> > attempts. The message you're seeing:
> > 
> > 17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
> > org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
> > Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/  
> > 10.18.102.103:9301]]  
> > not part of the cluster Cluster [pimsearch], ignoring...
> > 
> > means you have sniffed a node that is not part of the cluster you are  
> > attempting to connect to. This only comes up during sniffing, I  
> > believe.
> > 
> > My shot in the dark is that the TransportClient is picking up the  
> > value 'pimsearch' as the default cluster to connect to. This value is  
> > 'elasticsearch' out of the box but can be overridden.
> > 
> > Pat
> > 
> > On Jun 22, 3:36 am, Weiwei Wang \<[ww.wang...@gmail.com](mailto:ww.wang...@gmail.com) ([http://gmail.com](http://gmail.com))\> wrote:
> > 
> > > I have two clusters: pimsearch and elasticsearch both on the same  
> > > server group.
> > 
> > > cluster pimsearch use port 9300  
> > > cluster elasticsearch use port 9301
> > 
> > > the ips for the two clusters are 192.168.0.1, 192.168.0.2,  
> > > 192.168.0.3, 192.168.0.4
> > 
> > > i connect to the cluster with TransportClient by setting  
> > > client.transport.sniff=true and addTransportAddress(192.168.0.1) on  
> > > port 9301 or 9300.
> > 
> > > however, when i connect to 192.168.0.1:9301, the TransportClient  
> > > complains  
> > > 17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
> > > org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
> > > Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/10.18.102.103:9301]]  
> > > not part of the cluster Cluster [pimsearch], ignoring...
> > 
> > > when i init TransportClient by setting "cluster.name ([http://cluster.name](http://cluster.name))" with  
> > > "elasticsearch", it works fine. confusing, as when i connect to  
> > > cluster "pimsearch", i do not need to set "cluster.name ([http://cluster.name](http://cluster.name))"
> > 
> > > I do not know why this happens, as the node TransportClient connected  
> > > to should send back the cluster information.
> > 
> > > could anybody here give me an explanation?

---

<div class="post-metadata">

**Author:** ![Pat\_Christopher](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Pat\_Christopher](https://discuss.elastic.co/u/Pat_Christopher)\
**Post date:** [June 24, 2011, 4:56pm UTC](https://discuss.elastic.co/t/transportclient-misuse-cluster-name-when-connection-to-the-cluster/4683/5 "2011-06-24T16:56:58Z")

</div>

Assumption:  
pimsearch - 9300  
elasticsearch - 9301

When you attempt to connect to 'elasticsearch' with sniff set to  
false, are you adding the 9300 ports? Or only the 9301 ports?

And is this breaking anything or are you trying to understand the  
warning message?

Pat

On Jun 23, 8:22 pm, Weiwei Wang [ww.wang...@gmail.com](mailto:ww.wang...@gmail.com) wrote:

> i also tried set sniff to false, and add all the transport address  
> manually without setting the cluster.name, the problem is still there.
> 
> however, before i set up the second cluster, the code works fine
> 
> On Jun 23, 5:45 am, Pat Christopher [pat.christopher...@gmail.com](mailto:pat.christopher...@gmail.com)  
> wrote:
> 
> > You should have to set cluster.name for both of those connection  
> > attempts. The message you're seeing:
> 
> > 17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
> > org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
> > Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/  
> > 10.18.102.103:9301]]  
> > not part of the cluster Cluster [pimsearch], ignoring...
> 
> > means you have sniffed a node that is not part of the cluster you are  
> > attempting to connect to. This only comes up during sniffing, I  
> > believe.
> 
> > My shot in the dark is that the TransportClient is picking up the  
> > value 'pimsearch' as the default cluster to connect to. This value is  
> > 'elasticsearch' out of the box but can be overridden.
> 
> > Pat
> 
> > On Jun 22, 3:36 am, Weiwei Wang [ww.wang...@gmail.com](mailto:ww.wang...@gmail.com) wrote:
> 
> > > I have two clusters: pimsearch and elasticsearch both on the same  
> > > server group.
> 
> > > cluster pimsearch use port 9300  
> > > cluster elasticsearch use port 9301
> 
> > > the ips for the two clusters are 192.168.0.1, 192.168.0.2,  
> > > 192.168.0.3, 192.168.0.4
> 
> > > i connect to the cluster with TransportClient by setting  
> > > client.transport.sniff=true and addTransportAddress(192.168.0.1) on  
> > > port 9301 or 9300.
> 
> > > however, when i connect to 192.168.0.1:9301, the TransportClient  
> > > complains  
> > > 17:15:54 [elasticsearch[cached]-pool-2-thread-1] WARN  
> > > org.elasticsearch.client.transport [Slf4jESLogger.java:86]- [Kingo  
> > > Sunen] Node [Lyja][uwuwaLHDQOi1gt3FC2HOsg][inet[/10.18.102.103:9301]]  
> > > not part of the cluster Cluster [pimsearch], ignoring...
> 
> > > when i init TransportClient by setting "cluster.name" with  
> > > "elasticsearch", it works fine. confusing, as when i connect to  
> > > cluster "pimsearch", i do not need to set "cluster.name"
> 
> > > I do not know why this happens, as the node TransportClient connected  
> > > to should send back the cluster information.
> 
> > > could anybody here give me an explanation?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:02am UTC](https://discuss.elastic.co/t/transportclient-misuse-cluster-name-when-connection-to-the-cluster/4683/6 "2017-07-06T04:02:39Z")

</div>


