Unable to Migrate Custom Index to Cloud Through Logstash

Trying to use a basic configuration to write a custom index to a cloud instance but upon doing so I keep getting an error addressing Ruby. Posting the config and results of starting with systemctl betlow:

Config:

input {
    ElasticSearch {
        hosts => ["********your host**********"]
        user => "*******"
        password => "*********"
        index => "custom"
        size => 1000
        scroll => "1m"
    }
}

# a note in this section indicates that filter can be selected
filter {
}

output {
    ElasticSearch {
        hosts => [https://****.elastic-cloud.com:443]
        user => "********"
        password => "**********"
        index => "custom"
    }
} 

Results while using Debug Logging

[2022-02-16T16:53:56,621][DEBUG][logstash.runner          ] --------------- Logstash Settings -------------------
[2022-02-16T16:53:56,655][DEBUG][logstash.config.source.multilocal] Reading pipeline configurations from YAML {:location=>"/etc/logstash/pipelines.yml"}
[2022-02-16T16:53:56,782][DEBUG][logstash.agent           ] Initializing API WebServer {"api.http.host"=>"127.0.0.1", "api.http.port"=>9600..9700, "api.ssl.enabled"=>false, "api.auth.type"=>"none", "api.environment"=>"production"}
[2022-02-16T16:53:56,843][FATAL][logstash.runner          ] An unexpected error occurred! {:error=>#<ArgumentError: wrong number of arguments (given 3, expected 1..2)>, :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/api/modules/base.rb:43:i
n `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1537:in `new'", "/usr/share/logstash/logstash-core/lib/logstash/api/rack_app.rb:113:in `block in app'", "org/jruby/RubyBasicObject.java:2622:in `instan
ce_eval'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/api/rack_app.rb:101:in `app'", "/usr/share/logstash/logstash-core/lib/logstash/webserver.r
b:123:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/webserver.rb:74:in `from_settings'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:76:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:520:in `c
reate_agent'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:411:in `execute'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-1.0.1/lib/clamp/command.rb:68:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:292:i
n `run'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-1.0.1/lib/clamp/command.rb:133:in `run'", "/usr/share/logstash/lib/bootstrap/environment.rb:93:in `<main>'"]}
[2022-02-16T16:53:56,862][FATAL][org.logstash.Logstash    ] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.20.1.jar:?]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.20.1.jar:?]
at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:94) ~[?:?]

There are multiple threads opened about this today. Here is one.

Thanks badger. So basically just not compatible with 7.17.0. Appreciate it.

Is there a version that I can get that will work with 7.17.0?

No, but the fix was merged into the code base for 7.17.1 and 8.1. yaauie's comment in the discussion of the fix suggests those releases of the stack could be done in about a month. Also mentioned is the the possibility that a 2.2.1 release of Sinatra could fix this before that.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.