gpt4 book ai didi

elasticsearch - 尝试将数据发送到Elasticsearch时Logstash挂起

转载 作者:行者123 更新时间:2023-12-03 01:39:30 24 4
gpt4 key购买 nike

这是我在Logtash的.config文件中得到的输出:

output {

elasticsearch {
document_type => "apache"

}}

当输出设置为 stdout {}时,它可以正常工作。
我让Elasticsearch在本地运行没有问题。
当我运行命令时:
sudo ./logstash -f sample_1.conf --debug
Logstash挂起。
这是我使用 --debug在日志中得到的:
[DEBUG] 2018-03-04 03:28:56.245 [pool-2-thread-2] jvm - collector name {:name=>"ParNew"}
[DEBUG] 2018-03-04 03:28:56.255 [pool-2-thread-2] jvm - collector name {:name=>"ConcurrentMarkSweep"}
[DEBUG] 2018-03-04 03:28:58.448 [[main]<file] file - _globbed_files: /usr/share/logstash/bin/log_file.txt: glob is: ["/usr/share/logstash/bin/log_file.txt"]
[DEBUG] 2018-03-04 03:28:59.353 [Ruby-0-Thread-12: /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:617] pipeline - Pushing flush onto pipeline {:pipeline_id=>"main", :thread=>"#<Thread:0x34284e61@/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:246 sleep>"}
[DEBUG] 2018-03-04 03:29:01.268 [pool-2-thread-2] jvm - collector name {:name=>"ParNew"}
[DEBUG] 2018-03-04 03:29:01.268 [pool-2-thread-2] jvm - collector name {:name=>"ConcurrentMarkSweep"}
[DEBUG] 2018-03-04 03:29:04.354 [Ruby-0-Thread-12: /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:617] pipeline - Pushing flush onto pipeline {:pipeline_id=>"main", :thread=>"#<Thread:0x34284e61@/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:246 sleep>"}

这些行只是无限地重复一次。
Logstash和Elasticsearch版本均为6.2.2

可能是什么问题呢?

最佳答案

从6.0版开始,ElasticSearch删除了文档类型或映射类型。您可以删除document_type,然后重试。

有关更多详细信息,请引用https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html

关于elasticsearch - 尝试将数据发送到Elasticsearch时Logstash挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49091695/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com