# Unable to Migrate Custom Index to Cloud Through Logstash

**URL:** <https://discuss.elastic.co/t/unable-to-migrate-custom-index-to-cloud-through-logstash/297419>\
**Category:** Logstash\
**Created:** [February 16, 2022, 10:08pm UTC](https://discuss.elastic.co/t/unable-to-migrate-custom-index-to-cloud-through-logstash/297419 "2022-02-16T22:08:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel.talbot](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@daniel.talbot](https://discuss.elastic.co/u/daniel.talbot)\
**Post date:** [February 16, 2022, 10:08pm UTC](https://discuss.elastic.co/t/unable-to-migrate-custom-index-to-cloud-through-logstash/297419/1 "2022-02-16T22:08:51Z")

</div>

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:

```auto
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

```auto
[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) ~[?:?]

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 16, 2022, 10:10pm UTC](https://discuss.elastic.co/t/unable-to-migrate-custom-index-to-cloud-through-logstash/297419/2 "2022-02-16T22:10:50Z")

</div>

> [@daniel.talbot](#):
>
> ```auto
> 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'"
> 
> ```

There are multiple threads opened about this today. [Here](https://discuss.elastic.co/t/pipeline-number-of-arguments-error/297367) is one.

---

<div class="post-metadata">

**Author:** ![daniel.talbot](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@daniel.talbot](https://discuss.elastic.co/u/daniel.talbot)\
**Post date:** [February 17, 2022, 1:48pm UTC](https://discuss.elastic.co/t/unable-to-migrate-custom-index-to-cloud-through-logstash/297419/3 "2022-02-17T13:48:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![daniel.talbot](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@daniel.talbot](https://discuss.elastic.co/u/daniel.talbot)\
**Post date:** [February 17, 2022, 2:24pm UTC](https://discuss.elastic.co/t/unable-to-migrate-custom-index-to-cloud-through-logstash/297419/4 "2022-02-17T14:24:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 17, 2022, 6:08pm UTC](https://discuss.elastic.co/t/unable-to-migrate-custom-index-to-cloud-through-logstash/297419/5 "2022-02-17T18:08:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 17, 2022, 6:09pm UTC](https://discuss.elastic.co/t/unable-to-migrate-custom-index-to-cloud-through-logstash/297419/6 "2022-03-17T18:09:22Z")

</div>

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