Re: getting MasterNotDiscoveredException for ES node for client

2014-04-08 Thread Subhadip Bagui
Hi, The issue is that if I leave ES inactive for some time I get java.net.SocketException: Network is unreachable error. I have to restart ES to get it worked. May be too many node or client is created. So I'm trying to use the same client instance created for all ES. But the singleton instanc

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-08 Thread David Pilato
Looks good to me. I don't understand what your problem actually is. May be you don't have a fully working cluster? What gives GET / for example? --  David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr Le 8 avril 2014 à 17:17:44, Subhadip Bagui (i.ba...@gmail.com

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-08 Thread Subhadip Bagui
Hi David, The singleton instance for client I'm not getting for existing client. Trying something like this. Can you please give some working example. public class ESClientSingleton { private static ESClientSingleton instance; private ESClientSingleton() { } public static Object getIn

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-08 Thread Subhadip Bagui
Thanks a lot David :) -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit http

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-08 Thread David Pilato
Singleton is the way to go. Node and Client is thread safe. --  David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr Le 8 avril 2014 à 10:49:59, Subhadip Bagui (i.ba...@gmail.com) a écrit: Hi David, I'm trying to store all cloud event related data like create node

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-08 Thread Subhadip Bagui
Hi David, I'm trying to store all cloud event related data like create node, delete node etc. in ES. So whenever a new event occurs I'm creating a new node and client, doing the indexing and then closing the node. As you said, should I use same node created and use that in all occurence? like

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-07 Thread David Pilato
You should share the same node and client across all threads. -- David ;-) Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs Le 8 avr. 2014 à 06:06, Subhadip Bagui a écrit : Hi David, If I restart ES the same is working. But gives me this issue if multiple call made after some time. My

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-07 Thread Subhadip Bagui
Hi David, If I restart ES the same is working. But gives me this issue if multiple call made after some time. My client and server are on the same system. I stopped the firewall also. Any suggestion how to make multicast working. Can I create and close client node for multiple times? -- You

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-07 Thread David Pilato
Sounds like you have a network issue? java.net.SocketException: Network is unreachable: no further information May be multicast is disabled on your network so you'd better give a unicast list of nodes? -- David ;-) Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs Le 7 avr. 2014 à 19:18,

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-07 Thread Subhadip Bagui
Hi, If I remove client(true) from node initialization then I'm successfully indexing documents. But I want to create this node as client only without shards being allocated to them, as stated in http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html Also I'm g

Re: getting MasterNotDiscoveredException for ES node for client

2014-04-07 Thread Subhadip Bagui
Please suggest. I'm getting connection error in elasticsearch end even if the node is running. [2014-04-07 17:22:40,109][WARN ][transport.netty ] [node-master] exception caught on transport layer [[id: 0xd2 f92b59, 0.0.0.0/0.0.0.0:64313]], closing connection java.net.SocketException: Ne

getting MasterNotDiscoveredException for ES node for client

2014-04-07 Thread Subhadip Bagui
Hi, I'm using the below code for indexing data from cloud. But getting the below exception while calling prepareIndex . Please let me know why the exception is coming. public static IndexResponse insertESDocument(String nodeName, String json) { Node node = nodeBuilder().clusterName("el