Problem with Java Analyzer API


(James McGill) #1

When I run the attached test program against 0.19.0, it fails with:

org.elasticsearch.cluster.block.ClusterBlockException: blocked by:
[SERVICE_UNAVAILABLE/1/state not recovered /
initialized];[SERVICE_UNAVAILABLE/2/no master];

It works with 0.18.7.

Can anyone duplicate this result?

$ java -version
java version "1.6.0_27"

curl -XPUT 'http://localhost:9200/twitter/'
javac test/AnalyzerTest.java

java test.AnalyzerTest twitter whitespace Analyze This

curl -XDELETE 'http://localhost:9200/twitter/'

Regards,

James


(Shay Banon) #2

This failure means that the node you connected to has not initialized yet, or, that the client failed to connect to the cluster. Can you check the logs and see if it manages to connect successfully (the client) and if the cluster it connects to is up and running?

Btw, there is a problem with the analyze API (manifested differently than the problem you posted): https://github.com/elasticsearch/elasticsearch/issues/1770.

On Tuesday, March 13, 2012 at 9:52 PM, James McGill wrote:

When I run the attached test program against 0.19.0, it fails with:

org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];[SERVICE_UNAVAILABLE/2/no master];

It works with 0.18.7.

Can anyone duplicate this result?

$ java -version
java version "1.6.0_27"

curl -XPUT 'http://localhost:9200/twitter/'
javac test/AnalyzerTest.java

java test.AnalyzerTest twitter whitespace Analyze This

curl -XDELETE 'http://localhost:9200/twitter/'

Regards,

James

Attachments:

  • AnalyzerTest.java

(James McGill) #3

Thank you, Shay. The 0.19.1-SNAPSHOT resolves my issue as well.

On Wednesday, March 14, 2012 5:13:59 AM UTC-7, kimchy wrote:

This failure means that the node you connected to has not initialized
yet, or, that the client failed to connect to the cluster. Can you check
the logs and see if it manages to connect successfully (the client) and if
the cluster it connects to is up and running?

Btw, there is a problem with the analyze API (manifested differently than
the problem you posted):
https://github.com/elasticsearch/elasticsearch/issues/1770.


(system) #4