I have an on-premise elastic cluster running on version 2.3.3. (aka old)
I have another on-premise elastic cluster running on version 8.9.0 (aka new)
I want to migrate data from one index of old to new using logstash 8.9.0. Below are the steps I have followed.
- Created a piepline config file test_migration.conf with the following fields
input {
elasticsearch {
hosts => ["old_host"]
user => "888888"
password => "888888"
index => "mailbox_alerts"
size => 1000
scroll => "1m"
}
}
output {
elasticsearch {
hosts => ["https://new_host"]
cacert => '/tmp/cacert.pem'
user => "888888"
password => "888888"
index => "test-mailbox-alerts"
}
}
- Ran the below command to start logstash and invoke the pipeline
/els/logstash/bin/logstash --path.settings /els/Clusters/logstash -f /els/Clusters/logstash/test_migration.conf
This is failing due to the below error
[2023-10-10T13:43:48,518][ERROR][logstash.javapipeline ][main] Pipeline error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: Could not connect to a compatible version of Elasticsearch>, :backtrace=>["/els/logstash-8.9.0/vendor/bundle/jruby/2.6.0/gems/logstash-input-elasticsearch-4.17.2/lib/logstash/inputs/elasticsearch.rb:668:in `test_connection!'", "/els/logstash-8.9.0/vendor/bundle/jruby/2.6.0/gems/logstash-input-elasticsearch-4.17.2/lib/logstash/inputs/elasticsearch.rb:314:in `register'", "/els/logstash-8.9.0/vendor/bundle/jruby/2.6.0/gems/logstash-mixin-ecs_compatibility_support-1.3.0-java/lib/logstash/plugin_mixins/ecs_compatibility_support/target_check.rb:48:in `register'", "/els/logstash-8.9.0/logstash-core/lib/logstash/java_pipeline.rb:237:in `block in register_plugins'", "org/jruby/RubyArray.java:1865:in `each'", "/els/logstash-8.9.0/logstash-core/lib/logstash/java_pipeline.rb:236:in `register_plugins'", "/els/logstash-8.9.0/logstash-core/lib/logstash/java_pipeline.rb:395:in `start_inputs'", "/els/logstash-8.9.0/logstash-core/lib/logstash/java_pipeline.rb:320:in `start_workers'", "/els/logstash-8.9.0/logstash-core/lib/logstash/java_pipeline.rb:194:in `run'", "/els/logstash-8.9.0/logstash-core/lib/logstash/java_pipeline.rb:146:in `block in start'"], "pipeline.sources"=>["/els/Clusters/logstash/test_migration.conf"], :thread=>"#<Thread:0x7452137f@/els/logstash-8.9.0/logstash-core/lib/logstash/java_pipeline.rb:134 run>"}
[2023-10-10T13:43:48,519][INFO ][logstash.javapipeline ][main] Pipeline terminated {"pipeline.id"=>"main"}
[2023-10-10T13:43:48,529][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
What am I doing wrong here ? Does logstash 8.9.0 support migration from old to new ?