简体   繁体   English

索引不是在jdbc河流插件中创建的(弹性搜索)

[英]Index not created in jdbc river plugin (elastic search)

New to world of elastic search.I am trying to connect elastic search to mysql db using jdbc river plugin. 新的弹性搜索世界。我正在尝试使用jdbc river插件将弹性搜索连接到mysql数据库。 Query Used: 使用的查询:

curl -XPUT 'localhost/_river/my_jdbc_river/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
    "url" : "jdbc:mysql://local/test",
    "user" : "",
    "password" : "",
    "sql" : "select * from orders ",


}
}'

Exception Observed : 观察到异常:

[ERROR][river.jdbc.BulkNodeClient] cluster state is RED and not YELLOW, cowardly refusing to continue with operations
java.io.IOException: cluster state is RED and not YELLOW, cowardly refusing to continue with operations
    at org.xbib.elasticsearch.plugin.jdbc.client.ClientHelper.waitForCluster(ClientHelper.java:85)
    at org.xbib.elasticsearch.plugin.jdbc.client.node.BulkNodeClient.waitForCluster(BulkNodeClient.java:411)
    at org.xbib.elasticsearch.plugin.jdbc.client.node.BulkNodeClient.newClient(BulkNodeClient.java:205)
    at org.xbib.elasticsearch.plugin.jdbc.river.JDBCRiver$1.create(JDBCRiver.java:237)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverMouth.setIngestFactory(SimpleRiverMouth.java:88)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverMouth.setIngestFactory(SimpleRiverMouth.java:45)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.createRiverMouth(SimpleRiverFlow.java:304)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.beforeFetch(SimpleRiverFlow.java:184)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.execute(SimpleRiverFlow.java:148)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.request(RiverPipeline.java:88)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:66)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[2015-02-19 10:39:20,175][INFO ][river.jdbc.SimpleRiverMouth] creating index jdbc with settings {} and mappings null
[2015-02-19 10:39:20,175][ERROR][river.jdbc.SimpleRiverFlow] client is closed
org.elasticsearch.ElasticsearchIllegalStateException: client is closed
    at org.xbib.elasticsearch.plugin.jdbc.client.node.BulkNodeClient.newIndex(BulkNodeClient.java:473)
    at org.xbib.elasticsearch.plugin.jdbc.client.node.BulkNodeClient.newIndex(BulkNodeClient.java:53)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverMouth.beforeFetch(SimpleRiverMouth.java:106)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.beforeFetch(SimpleRiverFlow.java:207)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.execute(SimpleRiverFlow.java:148)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.request(RiverPipeline.java:88)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:66)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Can someone help fix this issue? 有人可以帮忙解决这个问题吗?

Additional info : Elastic search version :-1.4.2 Plugin version:-1.4.0.9 附加信息:弹性搜索版本:-1.4.2插件版本:-1.4.0.9

you could install a plugin named "head". 你可以安装一个名为“head”的插件。

cd $ES_HOME/bin
./plugin -install mobz/elasticsearch-head

then you can view it in a web browser by visiting http://localhost:9200/_plugin/head . 然后您可以通过访问http:// localhost:9200 / _plugin / head在Web浏览器中查看它。 It's easy to see the status of shard. 很容易看到碎片的状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM