要不要再翻翻文档呢?

logstash版本升级与elasticsearch兼容性问题

Logstash | 作者 wuyp | 发布于2022年01月06日 | 阅读数:4512

使用的es版本是5.5.3,原来使用的logstash版本也是5.5.3。上次因为log4j漏洞关注了logstash最新版本7.16.2,另外发现对比5版本cpu占用有明显的降低 , 尝试希望升级到该版本。但是从官方信息来看,es 5.5.3版本与logstash的版本兼容范围是2.4.x-5.6.x,实际在运行过程中也确实出现了兼容问题:
[2022-01-06T10:38:42,878][ERROR][logstash.javapipeline    ][main] Pipeline error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: Could not connect to a compatible version of Elasticsearch>, :backtrace=>["/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:247:in `block in healthcheck!'", "org/jruby/RubyHash.java:1415:in `each'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:240:in `healthcheck!'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:374:in `update_urls'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:89:in `update_initial_urls'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:83:in `start'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client.rb:359:in `build_pool'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client.rb:63:in `initialize'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client_builder.rb:106:in `create_http_client'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch/http_client_builder.rb:102:in `build'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/plugin_mixins/elasticsearch/common.rb:34:in `build_client'", "/data/apps/Monitor/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-11.2.3-java/lib/logstash/outputs/elasticsearch.rb:275:in `register'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:131:in `register'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:68:in `register'", "/data/apps/Monitor/logstash-7.16.2/logstash-core/lib/logstash/java_pipeline.rb:232:in `block in register_plugins'", "org/jruby/RubyArray.java:1821:in `each'", "/data/apps/Monitor/logstash-7.16.2/logstash-core/lib/logstash/java_pipeline.rb:231:in `register_plugins'", "/data/apps/Monitor/logstash-7.16.2/logstash-core/lib/logstash/java_pipeline.rb:589:in `maybe_setup_out_plugins'", "/data/apps/Monitor/logstash-7.16.2/logstash-core/lib/logstash/java_pipeline.rb:244:in `start_workers'", "/data/apps/Monitor/logstash-7.16.2/logstash-core/lib/logstash/java_pipeline.rb:189:in `run'", "/data/apps/Monitor/logstash-7.16.2/logstash-core/lib/logstash/java_pipeline.rb:141:in `block in start'"], "pipeline.sources"=>["/data/apps/Monitor/logstash-7.16.2/config/monitor-datatestk-applog.conf"], :thread=>"#<Thread:0x32e64bb5 run>"}
目前还没有准备好es从5升级到7,在此基础上,有没有什么办法可以解决该兼容性问题呢 ?
已邀请:

sdx

赞同来自:

不兼容需要改造插件,但是代价比较大,建议升级es

要回复问题请先登录注册