elasticsearch - logstash - 线程 ">output"org.elasticsearch.discovery.MasterNotDiscoveredException : waited for [30s] 中的异常

标签 elasticsearch logstash

日志存储对我来说是 100% 的灾难。我在同一台机器上使用 LS 1.4.1 和 ES 1.02。

这是我启动 logstash 索引器的方式:

/usr/local/share/logstash-1.4.1/bin/logstash -f /usr/local/share/logstash.indexer.config
input {
  redis {
    host => "redis.queue.do.development.sf.test.com"
    data_type => "list"
    key => "logstash"
    codec => json
  }
}

output {
        stdout { }
        elasticsearch {
                bind_host => "127.0.0.1"
                port => "9300"
        }
}

我设置的ES:

network.bind_host: 127.0.0.1
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["127.0.0.1:9300"]

哇..这就是我得到的:

/usr/local/share/logstash-1.4.1/bin/logstash -f /usr/local/share/logstash.indexer.config
Using milestone 2 input plugin 'redis'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.1/plugin-milestones {:level=>:warn}
log4j, [2014-05-29T12:02:29.545]  WARN: org.elasticsearch.discovery: [logstash-do-logstash-sf-development-20140527082230-866-2010] waited for 30s and no initial state was set by the discovery
Exception in thread ">output" org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]
    at org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java:180)
    at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(org/elasticsearch/cluster/service/InternalClusterService.java:492)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(java/lang/Thread.java:744)

最佳答案

参见 http://logstash.net/docs/1.4.1/outputs/elasticsearch

VERSION NOTE: Your Elasticsearch cluster must be running Elasticsearch 1.1.1. If you use any other version of Elasticsearch, you should set protocol => http in this plugin.

所以您的问题是 logstash 不支持您在不使用 http 传输的情况下使用的旧 ES 版本。

关于elasticsearch - logstash - 线程 ">output"org.elasticsearch.discovery.MasterNotDiscoveredException : waited for [30s] 中的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23937827/

相关文章:

elasticsearch - 如何搜索包含子字符串的文档

elasticsearch - 如何将Elasticsearch结果合并到一个字段中或如何解释在哪个字段中找到了结果

elasticsearch - Elasticsearch通过REST API更改节点名称

elasticsearch - 异常:LogStash::ConfigurationError

elasticsearch - ELK Stack-Elasticsearch索引创建(logstash)

elasticsearch - Logstash "agent"命令行参数是否必要?已弃用?

elasticsearch - Elasticsearch :搜索特定记录而无需滚动所有数据

elasticsearch - Elasticsearch Lucene查询语法来添加和减去N分钟与时间字段?

linux - 将运行logstash 的脚本的conf 文件放在哪里?

elasticsearch - 聚合日志将第一个时间戳设置为@timestamp