Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot install template for OpenSearch 2.x #145

Closed
shdubsh opened this issue Jun 2, 2022 · 6 comments · Fixed by #150
Closed

[BUG] Cannot install template for OpenSearch 2.x #145

shdubsh opened this issue Jun 2, 2022 · 6 comments · Fixed by #150
Labels
bug Something isn't working
Milestone

Comments

@shdubsh
Copy link
Contributor

shdubsh commented Jun 2, 2022

Describe the bug
Logstash is unable to install a template against OpenSearch 2.0.0 due to a missing template file.

To Reproduce

  1. Install opensearch 2.0.0 and logstash-oss 7.16.3 and logstash-output-opensearch plugin 1.2.0
  2. Configure an input and a minimal opensearch output excluding template settings
  3. Start OpenSearch then Logstash
  4. Observe logstash logs:
[2022-06-02T21:49:18,561][ERROR][logstash.outputs.opensearch][main] Failed to install template {
  :message=>"Failed to load default template for OpenSearch v2 with ECS disabled; caused by: #<ArgumentError: Template file '/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-opensearch-1.2.0-java/lib/logstash/outputs/opensearch/templates/ecs-disabled/2x.json' could not be found>", 
  :exception=>RuntimeError, 
  :backtrace=>[
      "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-opensearch-1.2.0-java/lib/logstash/outputs/opensearch/template_manager.rb:33:in `load_default_template'",
      "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-opensearch-1.2.0-java/lib/logstash/outputs/opensearch/template_manager.rb:21:in `install_template'",
      "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-opensearch-1.2.0-java/lib/logstash/outputs/opensearch.rb:412:in `install_template'",
      "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-opensearch-1.2.0-java/lib/logstash/outputs/opensearch.rb:247:in `finish_register'",
      "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-opensearch-1.2.0-java/lib/logstash/outputs/opensearch.rb:224:in `block in register'",
      "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-opensearch-1.2.0-java/lib/logstash/plugin_mixins/opensearch/common.rb:83:in `block in after_successful_connection'"
    ]
  }

Expected behavior
Logstash should install a template and start successfully

Plugins
logstash-output-opensearch

Screenshots
N/A

Host/Environment (please complete the following information):

  • OS: Debian Buster

Additional Context
The user can configure the 1.x template (template => "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-opensearch-1.2.0-java/lib/logstash/outputs/opensearch/templates/ecs-disabled/1x.json") and Logstash will install it and start processing.

@shdubsh shdubsh added bug Something isn't working untriaged labels Jun 2, 2022
@nickytd
Copy link

nickytd commented Jun 3, 2022

Hi

Same observation with the respective logstash 7.16.3 docker image. Please add the expected 2x.json template.
Thanks

@brijos
Copy link

brijos commented Jun 23, 2022

The team released 2.0.1 on 6/16 which address some compatibility issues. After upgrading are you still running into the same issue?

@abbeNation
Copy link

Hello,

Same observation.
Used logstash 7.16.3 and tested with both opensearch 2.0.0 and 2.0.1, the problem persists unfortunately.
Doesn't logstash needs update to be shipped with a new 2x.json template file in order to fix this issue?

/Albin.

shdubsh added a commit to shdubsh/logstash-output-opensearch that referenced this issue Jul 1, 2022
Closes: opensearch-project#145

Signed-off-by: Cole White <cwhite@wikimedia.org>
@shdubsh shdubsh mentioned this issue Jul 1, 2022
5 tasks
@datrh
Copy link

datrh commented Jul 26, 2022

Any news about this?

@trunet
Copy link

trunet commented Jul 26, 2022

Not exactly this, but another problem regarding template installation was fixed on #146 but there's no release with it.

dlvenable pushed a commit that referenced this issue Aug 8, 2022
Closes: #145

Signed-off-by: Cole White <cwhite@wikimedia.org>
@deepdatta deepdatta added this to the v1.3 milestone Aug 10, 2022
@prudhvigodithi
Copy link
Member

One more issue released to this topic
opensearch-project/opensearch-devops#85
@bbarani @dk-do @dblock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants