MasterNotDiscoveredException

Dear Elasticsearch User,
When I am trying to run my ES Based Java program, I got following exception

 org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]
at org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)
at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:356)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)


<b>At the same time I have started es.batch.. But I have stopped that es.batch then the program running. Please let me know what is problem..?</b>

Are you starting a Java client? It means that it did not discover the
cluster to connect to. Which discovery are you using, multicast or unicast?

On Thu, Apr 26, 2012 at 10:25 AM, andavar andavar.laxman@gmail.com wrote:

Dear Elasticsearch User,

  • When I am trying to run my ES Based Java program, I got following
    exception *

    org.elasticsearch.discovery.MasterNotDiscoveredException: waited
    for [30s]
    at

org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)
at

org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:356)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)

   *At the same time I have started es.batch.. But I have stopped that

es.batch then the program running. Please let me know what is problem..?*

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/MasterNotDiscoveredException-tp3940481p3940481.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

Hi Kimchy,
Thanks for your reply. Yes am starting java client with default yml settings.. Nothing I was changed there.. Always I got same exception(MasterNotDiscoveredException )

So, it means that it did not join the cluster of remote servers. Probably
multicast is not working for you. Try and configure the node client with
unicast, or use TransportClient.

On Thu, May 3, 2012 at 8:43 AM, andavar andavar.laxman@gmail.com wrote:

Hi Kimchy,
Thanks for your reply. Yes am starting java client with
default yml settings.. Nothing I was changed there.. Always I got same
exception(MasterNotDiscoveredException )

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/MasterNotDiscoveredException-tp3940481p3958202.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

thanks for the help Kimchy.. I am using TransportClient. Now it will work fine. I want to understand difference between the following two method of client creation..

  1. Node node = nodeBuilder().client(true).settings(ImmutableSettings.settingsBuilder()
    .build()).build().start();
    Client client = node.client();

  2. TransportClient client = new TransportClient(settings);
    client.addTransportAddress(new InetSocketTransportAddress("localhost",9300));

Please let me know... And also please advise me why I got that exception...

Explained here:
Elasticsearch Platform — Find real-time answers at scale | Elastic.

On Fri, May 4, 2012 at 3:14 PM, andavar andavar.laxman@gmail.com wrote:

thanks for the help Kimchy.. I am using TransportClient. Now it will work
fine. I want to understand difference between the following two method of
client creation..

  1. Node node =
    nodeBuilder().client(true).settings(ImmutableSettings.settingsBuilder()
    .build()).build().start();
    Client client = node.client();

  2. TransportClient client = new TransportClient(settings);
    client.addTransportAddress(new
    InetSocketTransportAddress("localhost",9300));

Please let me know... And also please advise me why I got that
exception...

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/MasterNotDiscoveredException-tp3940481p3962090.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.