Node client cannot connect to cluster


(peter@vagaband.co) #1

I'm trying to configure node client to connect to an elasticsearch cluster
that does not use multicast, but I'm running into problems. Also I'm
providing all settings programmatically to the NodeClient as I cannot use
an elasticsearch.yml file (mainly because cluster names and unicast hosts
names are different across environments and I don't know how to tell node
client to use a different yml file based on environment).

Using es 0.90.5, I have configured it as follows (no yml file, just this
config) -

  Settings settings = ImmutableSettings.builder()
    .put("discovery.zen.ping.multicast.enabled", "false")
    .put("discovery.zen.ping.unicast.hosts", "es-a-qa-1, es-b-qa-1")
    .put("cluster.name", "search-0.90.5-1-qa")
    .build();

  Node node = 

nodeBuilder().client(true).loadConfigSettings(false).settings(settings).node();

But I get the following error.

30905 [elasticsearch[Courier][generic][T#1]] INFO
org.elasticsearch.discovery.zen - [Courier] failed to send join request
to master
[[es-a-qa-1][KqQ1sm7GTH2obZ6Vx-Sjog][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}],
reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting
for task.]

I can connect to both es-a-qa-1 and es-b-qa-1 nodes via telnet on 9300 and
9200 ports.

What am I doing wrong?

Thanks
Peter

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(peter@vagaband.co) #2

Can anyone help? Does nobody know how to do this? Would really appreciate
it.

On Thursday, September 26, 2013 2:45:52 PM UTC-4, pe...@vagaband.co wrote:

I'm trying to configure node client to connect to an elasticsearch cluster
that does not use multicast, but I'm running into problems. Also I'm
providing all settings programmatically to the NodeClient as I cannot use
an elasticsearch.yml file (mainly because cluster names and unicast hosts
names are different across environments and I don't know how to tell node
client to use a different yml file based on environment).

Using es 0.90.5, I have configured it as follows (no yml file, just this
config) -

  Settings settings = ImmutableSettings.builder()
    .put("discovery.zen.ping.multicast.enabled", "false")
    .put("discovery.zen.ping.unicast.hosts", "es-a-qa-1, es-b-qa-1")
    .put("cluster.name", "search-0.90.5-1-qa")
    .build();

  Node node = 

nodeBuilder().client(true).loadConfigSettings(false).settings(settings).node();

But I get the following error.

30905 [elasticsearch[Courier][generic][T#1]] INFO
org.elasticsearch.discovery.zen - [Courier] failed to send join request
to master
[[es-a-qa-1][KqQ1sm7GTH2obZ6Vx-Sjog][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}],
reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting
for task.]

I can connect to both es-a-qa-1 and es-b-qa-1 nodes via telnet on 9300 and
9200 ports.

What am I doing wrong?

Thanks
Peter

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #3

Try

discovery.zen.ping.unicast.hosts", "es-a-qa-1:9300, es-b-qa-1:9300")

Does it help?

David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 19 oct. 2013 à 16:49, "peter@vagaband.co" peter@vagaband.co a écrit :

Can anyone help? Does nobody know how to do this? Would really appreciate it.

On Thursday, September 26, 2013 2:45:52 PM UTC-4, pe...@vagaband.co wrote:

I'm trying to configure node client to connect to an elasticsearch cluster that does not use multicast, but I'm running into problems. Also I'm providing all settings programmatically to the NodeClient as I cannot use an elasticsearch.yml file (mainly because cluster names and unicast hosts names are different across environments and I don't know how to tell node client to use a different yml file based on environment).

Using es 0.90.5, I have configured it as follows (no yml file, just this config) -

  Settings settings = ImmutableSettings.builder()
    .put("discovery.zen.ping.multicast.enabled", "false")
    .put("discovery.zen.ping.unicast.hosts", "es-a-qa-1, es-b-qa-1")
    .put("cluster.name", "search-0.90.5-1-qa")
    .build();

  Node node = nodeBuilder().client(true).loadConfigSettings(false).settings(settings).node();

But I get the following error.

30905 [elasticsearch[Courier][generic][T#1]] INFO org.elasticsearch.discovery.zen - [Courier] failed to send join request to master [[es-a-qa-1][KqQ1sm7GTH2obZ6Vx-Sjog][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}], reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting for task.]

I can connect to both es-a-qa-1 and es-b-qa-1 nodes via telnet on 9300 and 9200 ports.

What am I doing wrong?

Thanks
Peter

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(peter@vagaband.co) #4

Yeah, using the port did not help. I am able to telnet to these machines to
9300, so it's not a firewall issue.

3686 [main] INFO org.elasticsearch.node - [Steven Lang] version[0.90.5],
pid[3861], build[c8714e8/2013-09-17T12:50:20Z]
3686 [main] INFO org.elasticsearch.node - [Steven Lang] initializing ...
3691 [main] INFO org.elasticsearch.plugins - [Steven Lang] loaded [],
sites []
4789 [main] INFO org.elasticsearch.node - [Steven Lang] initialized
4789 [main] INFO org.elasticsearch.node - [Steven Lang] starting ...
4852 [main] INFO org.elasticsearch.transport - [Steven Lang]
bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address
{inet[/10.0.1.9:9300]}
10908 [elasticsearch[Steven Lang][generic][T#1]] INFO
org.elasticsearch.discovery.zen - [Steven Lang] failed to send join
request to master
[[es-a-qa-1][230ODTyvQnSQ-ZmdE0Z94A][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}],
reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting
for task.]
16936 [elasticsearch[Steven Lang][generic][T#1]] INFO
org.elasticsearch.discovery.zen - [Steven Lang] failed to send join
request to master
[[es-a-qa-1][230ODTyvQnSQ-ZmdE0Z94A][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}],
reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting
for task.]
22970 [elasticsearch[Steven Lang][generic][T#1]] INFO
org.elasticsearch.discovery.zen - [Steven Lang] failed to send join
request to master
[[es-a-qa-1][230ODTyvQnSQ-ZmdE0Z94A][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}],
reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting
for task.]
28996 [elasticsearch[Steven Lang][generic][T#1]] INFO
org.elasticsearch.discovery.zen - [Steven Lang] failed to send join
request to master
[[es-a-qa-1][230ODTyvQnSQ-ZmdE0Z94A][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}],
reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting
for task.]
34856 [main] WARN org.elasticsearch.discovery - [Steven Lang] waited for
30s and no initial state was set by the discovery
34857 [main] INFO org.elasticsearch.discovery - [Steven Lang]
search_0.90.5-1_qa/VcU1VfDoQ6uAkX3ULn7gWw

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #5

Sounds like ES is launched on a different network.
Do you have multiple Network card in your instance?
If so, could you try to set es to listen on 172.16.51.x ?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 19 oct. 2013 à 21:51, "peter@vagaband.co" peter@vagaband.co a écrit :

Yeah, using the port did not help. I am able to telnet to these machines to 9300, so it's not a firewall issue.

3686 [main] INFO org.elasticsearch.node - [Steven Lang] version[0.90.5], pid[3861], build[c8714e8/2013-09-17T12:50:20Z]
3686 [main] INFO org.elasticsearch.node - [Steven Lang] initializing ...
3691 [main] INFO org.elasticsearch.plugins - [Steven Lang] loaded [], sites []
4789 [main] INFO org.elasticsearch.node - [Steven Lang] initialized
4789 [main] INFO org.elasticsearch.node - [Steven Lang] starting ...
4852 [main] INFO org.elasticsearch.transport - [Steven Lang] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.0.1.9:9300]}
10908 [elasticsearch[Steven Lang][generic][T#1]] INFO org.elasticsearch.discovery.zen - [Steven Lang] failed to send join request to master [[es-a-qa-1][230ODTyvQnSQ-ZmdE0Z94A][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}], reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting for task.]
16936 [elasticsearch[Steven Lang][generic][T#1]] INFO org.elasticsearch.discovery.zen - [Steven Lang] failed to send join request to master [[es-a-qa-1][230ODTyvQnSQ-ZmdE0Z94A][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}], reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting for task.]
22970 [elasticsearch[Steven Lang][generic][T#1]] INFO org.elasticsearch.discovery.zen - [Steven Lang] failed to send join request to master [[es-a-qa-1][230ODTyvQnSQ-ZmdE0Z94A][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}], reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting for task.]
28996 [elasticsearch[Steven Lang][generic][T#1]] INFO org.elasticsearch.discovery.zen - [Steven Lang] failed to send join request to master [[es-a-qa-1][230ODTyvQnSQ-ZmdE0Z94A][inet[/172.16.51.178:9300]]{max_local_storage_nodes=1}], reason [org.elasticsearch.ElasticSearchTimeoutException: Timeout waiting for task.]
34856 [main] WARN org.elasticsearch.discovery - [Steven Lang] waited for 30s and no initial state was set by the discovery
34857 [main] INFO org.elasticsearch.discovery - [Steven Lang] search_0.90.5-1_qa/VcU1VfDoQ6uAkX3ULn7gWw

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Jörg Prante) #6

Also note that telnet is not enough to check firewall issues, you must open
both UDP and TCP protocols on the hosts/ports. Apparently your host on
10.0.0.0/8 class A subnet can't reach hosts on 172.16.0.0/16 class B subnet.

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(peter@vagaband.co) #7

Yup, that was it. UDP was not allowed on my QA data center. Thanks, David
and Jörg.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Cheolgoo Kang) #8

It's a bit old issue, but how did you fix it?

On Saturday, October 19, 2013 4:16:48 PM UTC-7, pe...@vagaband.co wrote:

Yup, that was it. UDP was not allowed on my QA data center. Thanks, David
and Jörg.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ab7d09ae-9068-4469-9a45-5439f930a228%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(David Chia) #9

This was a lifesaver. Thanks for pointing out that both UDP and TCP needed
to be open.

On Saturday, October 19, 2013 2:32:12 PM UTC-7, Jörg Prante wrote:

Also note that telnet is not enough to check firewall issues, you must
open both UDP and TCP protocols on the hosts/ports. Apparently your host on
10.0.0.0/8 class A subnet can't reach hosts on 172.16.0.0/16 class B
subnet.

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/195ecbf3-0785-40ac-ace3-c9f98d218fef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #10