logstash-output-amazon_es: Failing to install custom template to aws elasticsearch

The new version of the plugin (6.4.0) is failing to install my custom template to my elasticsearch in AWS. I’m using a docker container with logstash, version 6.3.2), installed. I get the failing error message:

[2018-09-26T01:16:31,260][INFO ][logstash.outputs.elasticsearch] Installing amazon_es template to _template/logstash
[2018-09-26T01:16:31,303][WARN ][logstash.outputs.elasticsearch] UNEXPECTED POOL ERROR {:e=>#<URI::InvalidComponentError: bad component(expected absolute path component): _template/logstash>}
[2018-09-26T01:16:31,312][ERROR][logstash.outputs.elasticsearch] Failed to install template. {:message=>"bad component(expected absolute path component): _template/logstash", :class=>"URI::InvalidComponentError", :backtrace=>["uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/uri/generic.rb:769:in `check_path'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/uri/generic.rb:817:in `path='", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/uri/generic.rb:191:in `initialize'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/uri/generic.rb:136:in `build'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/uri/http.rb:63:in `build'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/http_client/manticore_adapter.rb:96:in `perform_request'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/http_client/pool.rb:291:in `perform_request_to_url'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/http_client/pool.rb:278:in `block in perform_request'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/http_client/pool.rb:373:in `with_connection'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/http_client/pool.rb:277:in `perform_request'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/http_client/pool.rb:285:in `block in Pool'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/http_client.rb:365:in `template_put'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/http_client.rb:88:in `template_install'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/template_manager.rb:21:in `install'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/template_manager.rb:9:in `install_template'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/common.rb:118:in `install_template'", "/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-amazon_es-6.4.0-java/lib/logstash/outputs/amazon_es/common.rb:49:in `block in install_template_after_successful_connection'"]}

I have also tried using version 6.4.1 of logstash and still get the same error. I don’t know if the path used to install the template should be /_template/#{name} instead of _template/#{name} in the http_client.rb file (line 363).

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (4 by maintainers)

Commits related to this issue

Most upvoted comments

I install the plugin using logstash-plugin install logstash-output-amazon_es. How can I get this fix in? I can’t run the plugin currently.

The path to the template in my config file is already the absolute path. The plugin is able to locate my template file, but fails to install it in my elasticsearch instance because I think the URI that is being built is wrong. I notice in the http_client file for the template_exists function that it has the path defined as /_template/#{name} where as the template_put function has the path defined as _template/#{name}.

I changed the path for template_put function to /_template/#{name} and it fixed my error.

Did u build the plugin on your own ?

i still see this issue with logstash 6.4.2 & plugin 6.4.0

The path to the template in my config file is already the absolute path. The plugin is able to locate my template file, but fails to install it in my elasticsearch instance because I think the URI that is being built is wrong. I notice in the http_client file for the template_exists function that it has the path defined as /_template/#{name} where as the template_put function has the path defined as _template/#{name}.

I changed the path for template_put function to /_template/#{name} and it fixed my error.