关闭索引时出现异常

时间:2014-08-27 12:19:00

标签: java elasticsearch scheduling elasticsearch-jdbc-river

我创建了一个河流定义,每隔5秒就有一个调度程序连接到数据库。我需要添加该索引的设置(analyzer。过滤器)。当指数开启时,这是不可能的。因此,正如许多线程所建议的,我关闭了索引。一旦我关闭,我就会遇到以下异常。

    [2014-08-27 17:43:05,236][ERROR][BulkNodeClient           ] after bulk [3] error
org.elasticsearch.indices.IndexMissingException: [db2] missing
    at org.elasticsearch.cluster.routing.operation.plain.PlainOperationRouting.indexRoutingTable(PlainOperationRouting.java:245)
    at org.elasticsearch.cluster.routing.operation.plain.PlainOperationRouting.shards(PlainOperationRouting.java:259)
    at org.elasticsearch.cluster.routing.operation.plain.PlainOperationRouting.shards(PlainOperationRouting.java:255)
    at org.elasticsearch.cluster.routing.operation.plain.PlainOperationRouting.indexShards(PlainOperationRouting.java:70)
    at org.elasticsearch.action.bulk.TransportBulkAction.executeBulk(TransportBulkAction.java:242)
    at org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:153)
    at org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:65)
    at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:65)
    at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:92)
    at org.elasticsearch.client.support.AbstractClient.bulk(AbstractClient.java:159)
    at org.elasticsearch.action.bulk.BulkProcessor.execute(BulkProcessor.java:294)
    at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xbib.elasticsearch.support.client.bulk.BulkProcessorHelper.flush(BulkProcessorHelper.java:28)
    at org.xbib.elasticsearch.support.client.node.BulkNodeClient.flushIngest(BulkNodeClient.java:306)
    at org.xbib.elasticsearch.support.client.node.BulkNodeClient.flushIngest(BulkNodeClient.java:37)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverMouth.flush(SimpleRiverMouth.java:179)
    at org.xbib.elasticsearch.plugin.feeder.jdbc.JDBCFeeder.executeTask(JDBCFeeder.java:181)
    at org.xbib.elasticsearch.plugin.feeder.AbstractFeeder.newRequest(AbstractFeeder.java:363)
    at org.xbib.elasticsearch.plugin.feeder.AbstractFeeder.newRequest(AbstractFeeder.java:53)
    at org.xbib.pipeline.AbstractPipeline.call(AbstractPipeline.java:87)
    at org.xbib.pipeline.AbstractPipeline.call(AbstractPipeline.java:14)
    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:744)
[2014-08-27 17:43:05,241][ERROR][Feeder                   ] error while getting next input: client is closed
org.elasticsearch.ElasticsearchIllegalStateException: client is closed
    at org.xbib.elasticsearch.support.client.node.BulkNodeClient.waitForResponses(BulkNodeClient.java:313)
    at org.xbib.elasticsearch.support.client.node.BulkNodeClient.waitForResponses(BulkNodeClient.java:37)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverMouth.flush(SimpleRiverMouth.java:182)
    at org.xbib.elasticsearch.plugin.feeder.jdbc.JDBCFeeder.executeTask(JDBCFeeder.java:181)
    at org.xbib.elasticsearch.plugin.feeder.AbstractFeeder.newRequest(AbstractFeeder.java:363)
    at org.xbib.elasticsearch.plugin.feeder.AbstractFeeder.newRequest(AbstractFeeder.java:53)
    at org.xbib.pipeline.AbstractPipeline.call(AbstractPipeline.java:87)
    at org.xbib.pipeline.AbstractPipeline.call(AbstractPipeline.java:14)
    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:744)

如何解决这个问题?可能是什么问题?

1 个答案:

答案 0 :(得分:0)

看起来你的河流正在试图在它关闭时推向索引。更改索引设置,重新打开索引并重新启动河流。