Is java elasticsearch a joke?

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

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

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?
http://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 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.
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?utm_medium=email&utm_source=footer
.

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 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.
For more options, visit https://groups.google.com/d/optout.

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.
(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?
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 <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 <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?utm_medium=email&utm_source=footer
.

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 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.
For more options, visit https://groups.google.com/d/optout.

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 mars 2015 à 05:53, Sai Asuka 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. (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? 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 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4c62ee1f-6224-4749-bd28-16e47a200b09%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 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.
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 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.
For more options, visit https://groups.google.com/d/optout.

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 mars 2015 à 05:53, Sai Asuka <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. (
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?
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 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.
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?utm_medium=email&utm_source=footer
.

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 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?utm_medium=email&utm_source=footer
.
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 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.
For more options, visit https://groups.google.com/d/optout.

Discovery is using other port. See 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
elastic.co
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 25 mars 2015 à 15:50, Sai Asuka 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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 mars 2015 à 05:53, Sai Asuka <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. (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? 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 <>> 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 <>.
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?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 <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?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?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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/41A19D2C-F7C0-48F4-94A6-4BAD13252C39%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

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 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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 mars 2015 à 05:53, Sai Asuka <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. (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? 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 <>> 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 <>.
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?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 <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?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?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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/AB19F8E7-007B-471C-9281-D83EDD370DDA%40elastic.co.
For more options, visit https://groups.google.com/d/optout.

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 <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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 mars 2015 à 05:53, Sai Asuka 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. (
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?
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 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.
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?utm_medium=email&utm_source=footer
.

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 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?utm_medium=email&utm_source=footer
.
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 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?utm_medium=email&utm_source=footer
.
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 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.
For more options, visit https://groups.google.com/d/optout.

On Thu, Mar 26, 2015 at 6:47 AM, Sai Asuka 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.
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.
For more options, visit https://groups.google.com/d/optout.