TransportClient misuse cluster name when connection to the cluster


(Weiwei Wang) #1

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?


(Pat Christopher) #2

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 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?


(Weiwei Wang) #3

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
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 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?


(Shay Banon) #4

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), 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 (http://gmail.com)>
wrote:

You should have to set 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 (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)" with
"elasticsearch", it works fine. confusing, as when i connect to
cluster "pimsearch", i do not need to set "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?


(Pat Christopher) #5

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 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
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 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?


(system) #6