# Is java elasticsearch a joke?

**URL:** <https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878>\
**Category:** Elasticsearch\
**Created:** [March 25, 2015, 3:43am UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878 "2015-03-25T03:43:49Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![saipa](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saipa](https://discuss.elastic.co/u/saipa)\
**Post date:** [March 25, 2015, 3:43am UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/1 "2015-03-25T03:43:49Z")

</div>

I am using elasticsearch java client, indexing a document "looks" simple.  
I know 100% my cluster is running, and my name is create.

```
Node node = nodeBuilder().clusterName("mycluster").node();

Client client = node.client();

```

String json = "{" +

""user":"kimchy"," +

""postDate":"2013-01-30"," +

""message":"trying out Elasticsearch"" +

"}";

IndexResponse response = client.prepareIndex("twitter", "tweet")

.setSource(json)

.execute()

.actionGet();

I read somewhere that you should shove ".client(true)", but I get:

org.elasticsearch.discovery.MasterNotDiscoveredException

What gives?

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e6b7b18e-69a5-41c3-a192-27cf37b230fd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e6b7b18e-69a5-41c3-a192-27cf37b230fd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![saipa](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saipa](https://discuss.elastic.co/u/saipa)\
**Post date:** [March 25, 2015, 3:44am UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/2 "2015-03-25T03:44:54Z")

</div>

The problem is in either case, I see no new index or anything.

On Tuesday, March 24, 2015 at 11:43:49 PM UTC-4, Sai Asuka wrote:

> I am using elasticsearch java client, indexing a document "looks" simple.  
> I know 100% my cluster is running, and my name is create.
> 
> ```
> Node node = nodeBuilder().clusterName("mycluster").node();
> 
> Client client = node.client();
> 
> ```
> 
> String json = "{" +
> 
> ""user":"kimchy"," +
> 
> ""postDate":"2013-01-30"," +
> 
> ""message":"trying out Elasticsearch"" +
> 
> "}";
> 
> IndexResponse response = client.prepareIndex("twitter", "tweet")
> 
> .setSource(json)
> 
> .execute()
> 
> .actionGet();
> 
> I read somewhere that you should shove ".client(true)", but I get:
> 
> org.elasticsearch.discovery.MasterNotDiscoveredException
> 
> What gives?

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 25, 2015, 4:34am UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/3 "2015-03-25T04:34:13Z")

</div>

I don't mean to be rude, but just because it doesn't work doesn't make it a  
joke.

Have you read the docs?

> **[Java Transport Client (deprecated) \[7.17\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html)**

On 25 March 2015 at 14:44, Sai Asuka [asuka.shin@gmail.com](mailto:asuka.shin@gmail.com) wrote:

> The problem is in either case, I see no new index or anything.
> 
> On Tuesday, March 24, 2015 at 11:43:49 PM UTC-4, Sai Asuka wrote:
> 
> > I am using elasticsearch java client, indexing a document "looks" simple.  
> > I know 100% my cluster is running, and my name is create.
> > 
> > ```
> > Node node = nodeBuilder().clusterName("mycluster").node();
> > 
> > Client client = node.client();
> > 
> > ```
> > 
> > String json = "{" +
> > 
> > ""user":"kimchy"," +
> > 
> > ""postDate":"2013-01-30"," +
> > 
> > ""message":"trying out Elasticsearch"" +
> > 
> > "}";
> > 
> > IndexResponse response = client.prepareIndex("twitter", "tweet")
> > 
> > .setSource(json)
> > 
> > .execute()
> > 
> > .actionGet();
> > 
> > I read somewhere that you should shove ".client(true)", but I get:
> > 
> > org.elasticsearch.discovery.MasterNotDiscoveredException
> > 
> > What gives?
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9h1na1Y4YHT%2Bug%2BDVEs4k9AstqB4Vx7OQzT9nbeXSVqg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9h1na1Y4YHT%2Bug%2BDVEs4k9AstqB4Vx7OQzT9nbeXSVqg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![saipa](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saipa](https://discuss.elastic.co/u/saipa)\
**Post date:** [March 25, 2015, 4:53am UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/4 "2015-03-25T04:53:06Z")

</div>

Yes, which is why I was baffled. In fact, the code I used was straight out  
of that specific page.  
The client code also came straight from the docs.  
([Client | Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html)):

So the code I used from the documentation that appears so basic does not  
work even though my cluster is running. The docs make it very simple, so I  
am surprised it does not work out of the box on my local machine with a  
single node (running on my local machine on OSX installed using brew for  
latest ES 1.5, the Java Elasticsearch jar is also 1.5:

Node node = nodeBuilder().clusterName("yourclustername").node(); // I  
replaced yourclustername with my cluster name  
//Node node =  
nodeBuilder().clusterName("yourclustername").client(true).node(); // this  
does not work either  
Client client = node.client();

String json = "{" +  
""user":"kimchy"," +  
""postDate":"2013-01-30"," +  
""message":"trying out Elasticsearch"" +  
"}";

IndexResponse response = client.prepareIndex("twitter", "tweet")  
.setSource(json)  
.execute()  
.actionGet();

What is the problem?

On Wednesday, March 25, 2015 at 12:34:49 AM UTC-4, Mark Walkom wrote:

> I don't mean to be rude, but just because it doesn't work doesn't make it  
> a joke.
> 
> Have you read the docs?  
> [Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html)
> 
> On 25 March 2015 at 14:44, Sai Asuka \<[asuka...@gmail.com](mailto:asuka...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > The problem is in either case, I see no new index or anything.
> > 
> > On Tuesday, March 24, 2015 at 11:43:49 PM UTC-4, Sai Asuka wrote:
> > 
> > > I am using elasticsearch java client, indexing a document "looks" simple.  
> > > I know 100% my cluster is running, and my name is create.
> > > 
> > > ```
> > > Node node = nodeBuilder().clusterName("mycluster").node();
> > > 
> > > Client client = node.client();
> > > 
> > > ```
> > > 
> > > String json = "{" +
> > > 
> > > ""user":"kimchy"," +
> > > 
> > > ""postDate":"2013-01-30"," +
> > > 
> > > ""message":"trying out Elasticsearch"" +
> > > 
> > > "}";
> > > 
> > > IndexResponse response = client.prepareIndex("twitter", "tweet")
> > > 
> > > .setSource(json)
> > > 
> > > .execute()
> > > 
> > > .actionGet();
> > > 
> > > I read somewhere that you should shove ".client(true)", but I get:
> > > 
> > > org.elasticsearch.discovery.MasterNotDiscoveredException
> > > 
> > > What gives?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 25, 2015, 6:54am UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/5 "2015-03-25T06:54:00Z")

</div>

Wondering if you have any firewall issue so discovery does not work here?

I suppose that you are not using any plugin and that your node is correctly running locally?

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

> Le 25 mars 2015 à 05:53, Sai Asuka [asuka.shin@gmail.com](mailto:asuka.shin@gmail.com) a écrit :
> 
> Yes, which is why I was baffled. In fact, the code I used was straight out of that specific page.  
> The client code also came straight from the docs. ([Client | Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html)):
> 
> So the code I used from the documentation that appears so basic does not work even though my cluster is running. The docs make it very simple, so I am surprised it does not work out of the box on my local machine with a single node (running on my local machine on OSX installed using brew for latest ES 1.5, the Java Elasticsearch jar is also 1.5:
> 
> Node node = nodeBuilder().clusterName("yourclustername").node(); // I replaced yourclustername with my cluster name  
> //Node node = nodeBuilder().clusterName("yourclustername").client(true).node(); // this does not work either  
> Client client = node.client();
> 
> String json = "{" +  
> ""user":"kimchy"," +  
> ""postDate":"2013-01-30"," +  
> ""message":"trying out Elasticsearch"" +  
> "}";
> 
> IndexResponse response = client.prepareIndex("twitter", "tweet")  
> .setSource(json)  
> .execute()  
> .actionGet();
> 
> What is the problem?
> 
> > On Wednesday, March 25, 2015 at 12:34:49 AM UTC-4, Mark Walkom wrote:  
> > I don't mean to be rude, but just because it doesn't work doesn't make it a joke.
> > 
> > Have you read the docs? [Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html)
> > 
> > > On 25 March 2015 at 14:44, Sai Asuka [asuka...@gmail.com](mailto:asuka...@gmail.com) wrote:  
> > > The problem is in either case, I see no new index or anything.
> > > 
> > > > On Tuesday, March 24, 2015 at 11:43:49 PM UTC-4, Sai Asuka wrote:  
> > > > I am using elasticsearch java client, indexing a document "looks" simple.  
> > > > I know 100% my cluster is running, and my name is create.
> > > > 
> > > > ```
> > > > Node node = nodeBuilder().clusterName("mycluster").node();
> > > > 
> > > > Client client = node.client();
> > > > 
> > > > ```
> > > > 
> > > > String json = "{" +
> > > > 
> > > > ""user":"kimchy"," +
> > > > 
> > > > ""postDate":"2013-01-30"," +
> > > > 
> > > > ""message":"trying out Elasticsearch"" +
> > > > 
> > > > "}";
> > > > 
> > > > IndexResponse response = client.prepareIndex("twitter", "tweet")
> > > > 
> > > > .setSource(json)
> > > > 
> > > > .execute()
> > > > 
> > > > .actionGet();
> > > > 
> > > > I read somewhere that you should shove ".client(true)", but I get:
> > > > 
> > > > org.elasticsearch.discovery.MasterNotDiscoveredException
> > > > 
> > > > What gives?
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ECBECC31-2190-46CF-9E29-6B5271A14ED4%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/ECBECC31-2190-46CF-9E29-6B5271A14ED4%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![saipa](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saipa](https://discuss.elastic.co/u/saipa)\
**Post date:** [March 25, 2015, 2:50pm UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/6 "2015-03-25T14:50:09Z")

</div>

I don't "think" have any firewall rules on my machine. I have been able to  
use python's elasticsearch library to create a new index successfully with  
the default.  
Unless there is something different with python to ES vs Java to ES despite  
the libraries being "official" libraries.

I am using the elasticsearch-java library, no plugins installed. The node  
was installed using brew install elasticsearch, then elasticsearch start.  
In the web browser I can see my node:  
localhost:9200

I am running locally. What baffles me is whenever I find a thread related  
to a similar issue, it appears that no matter how new or old they are, it  
appears there is no resolution.

Does anyone have ideas? Is there some step that is unique to OSX, or  
something else that needs to be done like flushing or something?

On Wednesday, March 25, 2015 at 2:55:03 AM UTC-4, David Pilato wrote:

> Wondering if you have any firewall issue so discovery does not work here?
> 
> I suppose that you are not using any plugin and that your node is  
> correctly running locally?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 25 mars 2015 à 05:53, Sai Asuka \<[asuka...@gmail.com](mailto:asuka...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Yes, which is why I was baffled. In fact, the code I used was straight out  
> of that specific page.  
> The client code also came straight from the docs. (  
> [Client | Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html)  
> ):
> 
> So the code I used from the documentation that appears so basic does not  
> work even though my cluster is running. The docs make it very simple, so I  
> am surprised it does not work out of the box on my local machine with a  
> single node (running on my local machine on OSX installed using brew for  
> latest ES 1.5, the Java Elasticsearch jar is also 1.5:
> 
> Node node = nodeBuilder().clusterName("yourclustername").node(); // I  
> replaced yourclustername with my cluster name  
> //Node node =  
> nodeBuilder().clusterName("yourclustername").client(true).node(); // this  
> does not work either  
> Client client = node.client();
> 
> String json = "{" +  
> ""user":"kimchy"," +  
> ""postDate":"2013-01-30"," +  
> ""message":"trying out Elasticsearch"" +  
> "}";
> 
> IndexResponse response = client.prepareIndex("twitter", "tweet")  
> .setSource(json)  
> .execute()  
> .actionGet();
> 
> What is the problem?
> 
> On Wednesday, March 25, 2015 at 12:34:49 AM UTC-4, Mark Walkom wrote:
> 
> > I don't mean to be rude, but just because it doesn't work doesn't make it  
> > a joke.
> > 
> > Have you read the docs?  
> > [Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html)
> > 
> > On 25 March 2015 at 14:44, Sai Asuka [asuka...@gmail.com](mailto:asuka...@gmail.com) wrote:
> > 
> > > The problem is in either case, I see no new index or anything.
> > > 
> > > On Tuesday, March 24, 2015 at 11:43:49 PM UTC-4, Sai Asuka wrote:
> > > 
> > > > I am using elasticsearch java client, indexing a document "looks"  
> > > > simple.  
> > > > I know 100% my cluster is running, and my name is create.
> > > > 
> > > > ```
> > > > Node node = nodeBuilder().clusterName("mycluster").node();
> > > > 
> > > > Client client = node.client();
> > > > 
> > > > ```
> > > > 
> > > > String json = "{" +
> > > > 
> > > > ""user":"kimchy"," +
> > > > 
> > > > ""postDate":"2013-01-30"," +
> > > > 
> > > > ""message":"trying out Elasticsearch"" +
> > > > 
> > > > "}";
> > > > 
> > > > IndexResponse response = client.prepareIndex("twitter", "tweet")
> > > > 
> > > > .setSource(json)
> > > > 
> > > > .execute()
> > > > 
> > > > .actionGet();
> > > > 
> > > > I read somewhere that you should shove ".client(true)", but I get:
> > > > 
> > > > org.elasticsearch.discovery.MasterNotDiscoveredException
> > > > 
> > > > What gives?
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 25, 2015, 2:55pm UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/7 "2015-03-25T14:55:52Z")

</div>

Discovery is using other port. See [Node discovery | Elasticsearch Guide [8.11] | Elastic](http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#multicast) [http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#multicast](http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#multicast)  
AFAIR it has always been working fine on OSX.  
Latest version I tested was IIRC 1.4.2.

Which version are you using?

--  
David Pilato - Developer | Evangelist

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co/)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 25 mars 2015 à 15:50, Sai Asuka [asuka.shin@gmail.com](mailto:asuka.shin@gmail.com) a écrit :
> 
> I don't "think" have any firewall rules on my machine. I have been able to use python's elasticsearch library to create a new index successfully with the default.  
> Unless there is something different with python to ES vs Java to ES despite the libraries being "official" libraries.
> 
> I am using the elasticsearch-java library, no plugins installed. The node was installed using brew install elasticsearch, then elasticsearch start.  
> In the web browser I can see my node:  
> localhost:9200
> 
> I am running locally. What baffles me is whenever I find a thread related to a similar issue, it appears that no matter how new or old they are, it appears there is no resolution.
> 
> Does anyone have ideas? Is there some step that is unique to OSX, or something else that needs to be done like flushing or something?
> 
> On Wednesday, March 25, 2015 at 2:55:03 AM UTC-4, David Pilato wrote:  
> Wondering if you have any firewall issue so discovery does not work here?
> 
> I suppose that you are not using any plugin and that your node is correctly running locally?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 25 mars 2015 à 05:53, Sai Asuka \<[asuka...@gmail.com](mailto:asuka...@gmail.com) \<javascript:\>\> a écrit :
> 
> > Yes, which is why I was baffled. In fact, the code I used was straight out of that specific page.  
> > The client code also came straight from the docs. ([Client | Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html) [http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html)):
> > 
> > So the code I used from the documentation that appears so basic does not work even though my cluster is running. The docs make it very simple, so I am surprised it does not work out of the box on my local machine with a single node (running on my local machine on OSX installed using brew for latest ES 1.5, the Java Elasticsearch jar is also 1.5:
> > 
> > Node node = nodeBuilder().clusterName("yourclustername").node(); // I replaced yourclustername with my cluster name  
> > //Node node = nodeBuilder().clusterName("yourclustername").client(true).node(); // this does not work either  
> > Client client = node.client();
> > 
> > String json = "{" +  
> > ""user":"kimchy"," +  
> > ""postDate":"2013-01-30"," +  
> > ""message":"trying out Elasticsearch"" +  
> > "}";
> > 
> > IndexResponse response = client.prepareIndex("twitter", "tweet")  
> > .setSource(json)  
> > .execute()  
> > .actionGet();
> > 
> > What is the problem?
> > 
> > On Wednesday, March 25, 2015 at 12:34:49 AM UTC-4, Mark Walkom wrote:  
> > I don't mean to be rude, but just because it doesn't work doesn't make it a joke.
> > 
> > Have you read the docs? [Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html) [http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html)
> > 
> > On 25 March 2015 at 14:44, Sai Asuka \<[asuka...@gmail.com](mailto:asuka...@gmail.com) \<\>\> wrote:  
> > The problem is in either case, I see no new index or anything.
> > 
> > On Tuesday, March 24, 2015 at 11:43:49 PM UTC-4, Sai Asuka wrote:  
> > I am using elasticsearch java client, indexing a document "looks" simple.  
> > I know 100% my cluster is running, and my name is create.
> > 
> > ```
> > Node node = nodeBuilder().clusterName("mycluster").node();
> > 
> > Client client = node.client();
> > 
> > ```
> > 
> > String json = "{" +
> > 
> > ""user":"kimchy"," +
> > 
> > ""postDate":"2013-01-30"," +
> > 
> > ""message":"trying out Elasticsearch"" +
> > 
> > "}";
> > 
> > IndexResponse response = client.prepareIndex("twitter", "tweet")
> > 
> > .setSource(json)
> > 
> > .execute()
> > 
> > .actionGet();
> > 
> > I read somewhere that you should shove ".client(true)", but I get:
> > 
> > org.elasticsearch.discovery.MasterNotDiscoveredException
> > 
> > What gives?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<\>.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm_medium=email&utm_source=footer).
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com?utm_medium=email&utm_source=footer).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/41A19D2C-F7C0-48F4-94A6-4BAD13252C39%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/41A19D2C-F7C0-48F4-94A6-4BAD13252C39%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![andrew](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@andrew](https://discuss.elastic.co/u/andrew)\
**Post date:** [March 25, 2015, 6:15pm UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/8 "2015-03-25T18:15:42Z")

</div>

Have you made any changes to elasticsearch.yml? If so, please post.

Also, can you check that you can telnet to localhost:9300?

> On Mar 25, 2015, at 7:50 AM, Sai Asuka [asuka.shin@gmail.com](mailto:asuka.shin@gmail.com) wrote:
> 
> I don't "think" have any firewall rules on my machine. I have been able to use python's elasticsearch library to create a new index successfully with the default.  
> Unless there is something different with python to ES vs Java to ES despite the libraries being "official" libraries.
> 
> I am using the elasticsearch-java library, no plugins installed. The node was installed using brew install elasticsearch, then elasticsearch start.  
> In the web browser I can see my node:  
> localhost:9200
> 
> I am running locally. What baffles me is whenever I find a thread related to a similar issue, it appears that no matter how new or old they are, it appears there is no resolution.
> 
> Does anyone have ideas? Is there some step that is unique to OSX, or something else that needs to be done like flushing or something?
> 
> On Wednesday, March 25, 2015 at 2:55:03 AM UTC-4, David Pilato wrote:  
> Wondering if you have any firewall issue so discovery does not work here?
> 
> I suppose that you are not using any plugin and that your node is correctly running locally?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 25 mars 2015 à 05:53, Sai Asuka \<[asuka...@gmail.com](mailto:asuka...@gmail.com) \<javascript:\>\> a écrit :
> 
> > Yes, which is why I was baffled. In fact, the code I used was straight out of that specific page.  
> > The client code also came straight from the docs. ([Client | Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html) [http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html)):
> > 
> > So the code I used from the documentation that appears so basic does not work even though my cluster is running. The docs make it very simple, so I am surprised it does not work out of the box on my local machine with a single node (running on my local machine on OSX installed using brew for latest ES 1.5, the Java Elasticsearch jar is also 1.5:
> > 
> > Node node = nodeBuilder().clusterName("yourclustername").node(); // I replaced yourclustername with my cluster name  
> > //Node node = nodeBuilder().clusterName("yourclustername").client(true).node(); // this does not work either  
> > Client client = node.client();
> > 
> > String json = "{" +  
> > ""user":"kimchy"," +  
> > ""postDate":"2013-01-30"," +  
> > ""message":"trying out Elasticsearch"" +  
> > "}";
> > 
> > IndexResponse response = client.prepareIndex("twitter", "tweet")  
> > .setSource(json)  
> > .execute()  
> > .actionGet();
> > 
> > What is the problem?
> > 
> > On Wednesday, March 25, 2015 at 12:34:49 AM UTC-4, Mark Walkom wrote:  
> > I don't mean to be rude, but just because it doesn't work doesn't make it a joke.
> > 
> > Have you read the docs? [Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html) [http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html)
> > 
> > On 25 March 2015 at 14:44, Sai Asuka \<[asuka...@gmail.com](mailto:asuka...@gmail.com) \<\>\> wrote:  
> > The problem is in either case, I see no new index or anything.
> > 
> > On Tuesday, March 24, 2015 at 11:43:49 PM UTC-4, Sai Asuka wrote:  
> > I am using elasticsearch java client, indexing a document "looks" simple.  
> > I know 100% my cluster is running, and my name is create.
> > 
> > ```
> > Node node = nodeBuilder().clusterName("mycluster").node();
> > 
> > Client client = node.client();
> > 
> > ```
> > 
> > String json = "{" +
> > 
> > ""user":"kimchy"," +
> > 
> > ""postDate":"2013-01-30"," +
> > 
> > ""message":"trying out Elasticsearch"" +
> > 
> > "}";
> > 
> > IndexResponse response = client.prepareIndex("twitter", "tweet")
> > 
> > .setSource(json)
> > 
> > .execute()
> > 
> > .actionGet();
> > 
> > I read somewhere that you should shove ".client(true)", but I get:
> > 
> > org.elasticsearch.discovery.MasterNotDiscoveredException
> > 
> > What gives?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<\>.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm_medium=email&utm_source=footer).
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com?utm_medium=email&utm_source=footer).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/AB19F8E7-007B-471C-9281-D83EDD370DDA%40elastic.co](https://groups.google.com/d/msgid/elasticsearch/AB19F8E7-007B-471C-9281-D83EDD370DDA%40elastic.co).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![saipa](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saipa](https://discuss.elastic.co/u/saipa)\
**Post date:** [March 25, 2015, 7:47pm UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/9 "2015-03-25T19:47:02Z")

</div>

No changes to elasticsearch.yml except for clusterName.

The telnet command fails:

telnet localhost:9300

Error from executing telnet:  
localhost:9300: nodename nor servname provided, or not known  
Version used is 1.5.0

On Wednesday, March 25, 2015 at 2:15:57 PM UTC-4, Andrew Selden wrote:

> Have you made any changes to elasticsearch.yml? If so, please post.
> 
> Also, can you check that you can telnet to localhost:9300?
> 
> On Mar 25, 2015, at 7:50 AM, Sai Asuka \<[asuka...@gmail.com](mailto:asuka...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> I don't "think" have any firewall rules on my machine. I have been able to  
> use python's elasticsearch library to create a new index successfully with  
> the default.  
> Unless there is something different with python to ES vs Java to ES  
> despite the libraries being "official" libraries.
> 
> I am using the elasticsearch-java library, no plugins installed. The node  
> was installed using brew install elasticsearch, then elasticsearch start.  
> In the web browser I can see my node:  
> localhost:9200
> 
> I am running locally. What baffles me is whenever I find a thread related  
> to a similar issue, it appears that no matter how new or old they are, it  
> appears there is no resolution.
> 
> Does anyone have ideas? Is there some step that is unique to OSX, or  
> something else that needs to be done like flushing or something?
> 
> On Wednesday, March 25, 2015 at 2:55:03 AM UTC-4, David Pilato wrote:
> 
> > Wondering if you have any firewall issue so discovery does not work here?
> > 
> > I suppose that you are not using any plugin and that your node is  
> > correctly running locally?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 25 mars 2015 à 05:53, Sai Asuka [asuka...@gmail.com](mailto:asuka...@gmail.com) a écrit :
> > 
> > Yes, which is why I was baffled. In fact, the code I used was straight  
> > out of that specific page.  
> > The client code also came straight from the docs. (  
> > [Client | Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html)  
> > ):
> > 
> > So the code I used from the documentation that appears so basic does not  
> > work even though my cluster is running. The docs make it very simple, so I  
> > am surprised it does not work out of the box on my local machine with a  
> > single node (running on my local machine on OSX installed using brew for  
> > latest ES 1.5, the Java Elasticsearch jar is also 1.5:
> > 
> > Node node = nodeBuilder().clusterName("yourclustername").node(); // I  
> > replaced yourclustername with my cluster name  
> > //Node node =  
> > nodeBuilder().clusterName("yourclustername").client(true).node(); // this  
> > does not work either  
> > Client client = node.client();
> > 
> > String json = "{" +  
> > ""user":"kimchy"," +  
> > ""postDate":"2013-01-30"," +  
> > ""message":"trying out Elasticsearch"" +  
> > "}";
> > 
> > IndexResponse response = client.prepareIndex("twitter", "tweet")  
> > .setSource(json)  
> > .execute()  
> > .actionGet();
> > 
> > What is the problem?
> > 
> > On Wednesday, March 25, 2015 at 12:34:49 AM UTC-4, Mark Walkom wrote:
> > 
> > > I don't mean to be rude, but just because it doesn't work doesn't make  
> > > it a joke.
> > > 
> > > Have you read the docs?  
> > > [Java Transport Client (deprecated) [7.17] | Elastic](http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html)
> > > 
> > > On 25 March 2015 at 14:44, Sai Asuka [asuka...@gmail.com](mailto:asuka...@gmail.com) wrote:
> > > 
> > > > The problem is in either case, I see no new index or anything.
> > > > 
> > > > On Tuesday, March 24, 2015 at 11:43:49 PM UTC-4, Sai Asuka wrote:
> > > > 
> > > > > I am using elasticsearch java client, indexing a document "looks"  
> > > > > simple.  
> > > > > I know 100% my cluster is running, and my name is create.
> > > > > 
> > > > > ```
> > > > > Node node = nodeBuilder().clusterName("mycluster").node();
> > > > > 
> > > > > Client client = node.client();
> > > > > 
> > > > > ```
> > > > > 
> > > > > String json = "{" +
> > > > > 
> > > > > ""user":"kimchy"," +
> > > > > 
> > > > > ""postDate":"2013-01-30"," +
> > > > > 
> > > > > ""message":"trying out Elasticsearch"" +
> > > > > 
> > > > > "}";
> > > > > 
> > > > > IndexResponse response = client.prepareIndex("twitter", "tweet")
> > > > > 
> > > > > .setSource(json)
> > > > > 
> > > > > .execute()
> > > > > 
> > > > > .actionGet();
> > > > > 
> > > > > I read somewhere that you should shove ".client(true)", but I get:
> > > > > 
> > > > > org.elasticsearch.discovery.MasterNotDiscoveredException
> > > > > 
> > > > > What gives?
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > > 
> > > > For more options, visit [https://groups.google.com/d/optout](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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/252076e0-b1d9-4142-b108-72b47f7841dd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/dbd4643e-d6c5-46f7-9cb5-9afead9a35b8%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b4cfffb7-96dc-4ae3-937d-9f05e8f36a34%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b4cfffb7-96dc-4ae3-937d-9f05e8f36a34%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Perryn\_Fowler](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@Perryn\_Fowler](https://discuss.elastic.co/u/Perryn_Fowler)\
**Post date:** [March 26, 2015, 3:05am UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/10 "2015-03-26T03:05:35Z")

</div>

On Thu, Mar 26, 2015 at 6:47 AM, Sai Asuka [asuka.shin@gmail.com](mailto:asuka.shin@gmail.com) wrote:

> telnet localhost:9300

should be

telnet localhost 9300

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAFps6aCoJs%3DT2MxAP\_MrrCHUCHEaAtP%3DOKHDx%3Dt5-AwUR%3Din8w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAFps6aCoJs%3DT2MxAP_MrrCHUCHEaAtP%3DOKHDx%3Dt5-AwUR%3Din8w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:23am UTC](https://discuss.elastic.co/t/is-java-elasticsearch-a-joke/22878/11 "2017-07-06T00:23:54Z")

</div>


