But it sounds like your client is using another cluster name [1]. Do you have any elasticsearch.yml in your project classpath?
-- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr Le 24 juin 2014 à 12:48:48, Koen Smets ([email protected]) a écrit: Hi David, Setting the (default) clustername, elasticsearch, doesn't help. grtz, Koen On Tuesday, June 24, 2014 12:24:51 PM UTC+2, David Pilato wrote: You need to set the cluster name I think. My 2 cents -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr Le 24 juin 2014 à 10:29:11, Koen Smets ([email protected]) a écrit: Hi, I've troubles to connect a second client-only Node via the Java API to a remote cluster. The first client (configured as client-only hence no master and no data) runs fine on localhost:9300. However, when the second client-only node tries to connect to the cluster an exception gets thrown: org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];[SERVICE_UNAVAILABLE/2/no master]; I use the following code to connect both clients: Node node = NodeBuilder.nodeBuilder().client(true).node(); Client client = node.client(); GetResponse response = client.prepareGet("twitter", "tweet", "1").execute().actionGet(); LOGGER.info(response.getSourceAsString()); // on shutdown node.close(); While the second client tries to join the cluster, the logs of the first client show the following warnings: o.e.d.z.p.multicast [WARN] [Odin] received ping response ping_response{target [[Firebolt][DqdgEEe8RwSyVDUuqmQw4w][p2][inet[/192.168.2.21:9300]]], master [[Firebolt][DqdgEEe8RwSyVDUuqmQw4w][p2][inet[/192.168.2.21:9300]]], cluster_name[elasticsearch]} with no matching id [1] I assumed that the first client would be running on localhost:9300 and the second one would bind to localhost:9301, but doesn't do that automatically. Do I need to specify an additional setting to allow this scenario? (I also tested by adding a TransportClient instead of a Node and this works fine) JUnit test code and log output can be found at: https://gist.github.com/ksmets/bed93778562dd2260e09 Thx, Koen -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/868dc883-dd39-44ac-ab56-1ac609f1f63f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/43ed69ab-83e8-4128-8450-bcb94fc93852%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.53a957f6.216231b.950f%40MacBook-Air-de-David.local. For more options, visit https://groups.google.com/d/optout.
