# Master Node is Not Available

**URL:** <https://discuss.elastic.co/t/master-node-is-not-available/11597>\
**Category:** Elasticsearch\
**Created:** [April 16, 2013, 12:49pm UTC](https://discuss.elastic.co/t/master-node-is-not-available/11597 "2013-04-16T12:49:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammad\_rafi\_g](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@mohammad\_rafi\_g](https://discuss.elastic.co/u/mohammad_rafi_g)\
**Post date:** [April 16, 2013, 12:49pm UTC](https://discuss.elastic.co/t/master-node-is-not-available/11597/1 "2013-04-16T12:49:22Z")

</div>

Hi, to All.,  
Subject: Master Node is Not  
Available for Indexing using ElasticSearch-Java-API.  
Actually My system Has, ElasticSearch 0.19.8, java 1.6.0\_32, in  
Windows 7 Environment.  
After all, I have Implemented a Sample Logic for Indexing one Document in  
my ElasticSearch. And It is Working Fine in my System.

```
   And we have also ElasticSearch in My Office Server Machine, which is 

```

Running in Linux Environment.  
I have also Tried to Index a Document into my Server Machine, but no  
Documents are Indexed.

And I Have Observed the Following Two Cases.,  
_Case 1:[ Master Node is Not Available for New Node in Server Machine  
ElasticSerach]_  
_my sample code is given below.,_  
_Node node = nodeBuilder().clusterName("elasticsearch257").node(); //for server machine { and for my local machine  
----.clusterName("elasticsearch")----}  
Client client = node.client();_  
IndexResponse response = client.prepareIndex("twitter", "tweet",  
"1").setSource(  
jsonBuilder().startObject().field("user",  
"kimchy").field("message", "trying out Elastic Search").endObject()  
).execute().actionGet();  
node.close();

_in my server machine log:_  
INFO: [Domina] {0.19.8}[13344]: starting ...  
Apr 16, 2013 4:36:27 PM org.elasticsearch.transport  
INFO: [Domina] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]},  
publish\_address {inet[/xxx.xxx.xxx.251:9301]}  
Apr 16, 2013 4:36:30 PM org.elasticsearch.cluster.service  
INFO: \* [Domina] new\_master  
[Domina][vu9JUFkYS0KRViyq2wuMpw][inet[/xxx.xxx.xxx.251:9301]], reason:  
zen-disco-join (elected\_as\_master)\*  
Apr 16, 2013 4:36:30 PM org.elasticsearch.discovery

_in my local machine log:[In my Local system, Master Node is Available]_  
INFO: [Madame Hydra] {0.19.8}[908]: starting ...  
Apr 16, 2013 4:36:36 PM org.elasticsearch.transport  
INFO: [Madame Hydra] bound\_address {inet[/0.0.0.0:9301]},  
publish\_address {inet[/xxx.xxx.xxx.182:9301]}  
Apr 16, 2013 4:36:39 PM org.elasticsearch.cluster.service  
INFO: _[Madame Hydra] detected\_master [Marvel  
Boy][SzNog5DXSbK3BBUWvZoPSw][inet[/xxx.xxx.xxx.182:9300]], added {[Marvel  
Boy][SzNog5DXSbK3BBUWvZoPSw]_[inet[/192.168.2.182:9300]],}, reason:  
zen-disco-receive(from master [[Marvel  
Boy][SzNog5DXSbK3BBUWvZoPSw][inet[/192.168.2.182:9300]]])  
Apr 16, 2013 4:36:39 PM org.elasticsearch.gateway.local.state.meta  
Result is:

1. While in my Local Machine, it is Detecting the Master Node and both  
are Adding and then the Indexing Process is Working Fine.
2. Where as in my Server Machine, Even though Master Node is Running, A  
New Master is Creating. But Finally No Documents are adding to Server  
Machine's ElasticSearch.

_Case 2:_  
_my sample code is given below.,_  
_Settings settings =  
ImmutableSettings.settingsBuilder().put("cluster.name",  
"elasticsearch257").build();_ //for server machine { and for my local  
machine ----.clusterName("elasticsearch")----}\*

- _Client client = new TransportClient(settings).addTransportAddress(new  
InetSocketTransportAddress("xxx.xxx.xxx.251", 9300));_

----("xxx.xxx.xxx.182",9300)---}  
IndexResponse response = client.prepareIndex("twitter", "tweet",  
"1").setSource(  
jsonBuilder().startObject().field("user",  
"kimchy").field("message", "trying out Elastic Search").endObject()  
).execute().actionGet();  
client.close();  
\*  
in my server machine log:\*[throwing Exception]  
INFO: [Widget] failed to get node info for  
[#transport#-1][inet[/192.168.2.251:9300]], disconnecting...  
_org.elasticsearch.transport.NodeDisconnectedException_:  
[][inet[/192.168.2.251:9300]][cluster/nodes/info] disconnected  
Result is:

1. In my Local Machine, Code is Working Fine and Documents Indexed with  
out any Exception.
2. In my Server Machine, "NodeDisconnectedException" is Raised with the  
same code.

Have I Done Any Thing Wrong while Executing the Code in Server Machine?  
{Actually, I am able to Access the Server Machine's  
ElasticSearch Head Plugin in my Local Machine Browser and If I Do  
Pinging(in command prompt, ping xxx.xxx.xxx.251) Reply is successful. }  
{I am using putty application for Executing My Code in Server  
Machine Remotely and WinSCP for File Transformation from my local to server  
systems}  
Is this Process{the ElasticSearch-Java-API for Indexing} works Fine in all  
OS{windows 7 and Linux}?

If Any One Know How To Index Documents from One(say., Local) System to  
Another(say, Server Machine) System. Please tell me.

If Possible, Tell me, Is there any other Technique for Indexing Documents  
from our Local System to Server System?

Thanks to you all.  
Regards  
Rafi.

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:40am UTC](https://discuss.elastic.co/t/master-node-is-not-available/11597/2 "2017-07-06T02:40:58Z")

</div>

Closed on July 6, 2017, 2:40am UTC


