kiwigrid / helm-charts

Helm charts for Kubernetes curated by Kiwigrid
https://kiwigrid.github.io
MIT License
184 stars 210 forks source link

unexpected error error_class=NoMethodError #324

Closed pingrulez closed 4 years ago

pingrulez commented 4 years ago

Is this a request for help?: yes

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Version of Helm and Kubernetes: Helm Client and Server: v2.13.0 Kubernetes Version: 1.15 (Amazon EKS) Which chart in which version: Chart: fluentd-elasticsearch-6.2.3 App: 3.0.0

What happened: I receive the following exception below.

2020-04-11 19:45:59 +0000 [error]: unexpected error error_class=NoMethodError error="undefined method []' for nil:NilClass" 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluent-plugin-elasticsearch-4.0.5/lib/fluent/plugin/out_elasticsearch.rb:426:indetect_es_major_version' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluent-plugin-elasticsearch-4.0.5/lib/fluent/plugin/out_elasticsearch.rb:296:in block in configure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluent-plugin-elasticsearch-4.0.5/lib/fluent/plugin/elasticsearch_index_template.rb:35:inretry_operate' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluent-plugin-elasticsearch-4.0.5/lib/fluent/plugin/out_elasticsearch.rb:295:in configure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/plugin.rb:173:inconfigure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/agent.rb:132:in add_match' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/agent.rb:74:inblock in configure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/agent.rb:64:in each' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/agent.rb:64:inconfigure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/label.rb:31:in configure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:143:inblock in configure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:143:in each' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:143:inconfigure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/engine.rb:105:in configure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/engine.rb:80:inrun_configure' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/supervisor.rb:591:in block in run_worker' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/supervisor.rb:823:inmain_process' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/supervisor.rb:586:in run_worker' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/lib/fluent/command/fluentd.rb:338:in<top (required)>' 2020-04-11 19:45:59 +0000 [error]: /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in require' 2020-04-11 19:45:59 +0000 [error]: /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:inrequire' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/gems/fluentd-1.9.2/bin/fluentd:8:in <top (required)>' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/bin/fluentd:23:inload' 2020-04-11 19:45:59 +0000 [error]: /usr/local/bundle/bin/fluentd:23:in `

'

What you expected to happen: Expected the awsSigningSidecar when set to enabled: true to use the elasticSearch scheme, host, port to successfully connect to ElasticSearch so that fluentd would forward logs.

How to reproduce it (as minimally and precisely as possible): Configured Chart to use awsSigningSidecar as Amazon ElasticSearch cluster is in public VPC.

elasticsearch: host: "search-heartbeat-***.us-east-1.es.amazonaws.com" port: 443 scheme: "https"

Anything else we need to know: I have updated the elasticSearch "access policy" with an IAM role used by the worker nodes instead of configuring an IAM User with credentials set. In other words, no credentials are set, just the scheme, host, and port.

pingrulez commented 4 years ago

And maybe this is easier for folks to try:

helm install --name fluentd kiwigrid/fluentd-elasticsearch --namespace logging --set awsSigningSidecar.enabled=true,elasticsearch.host=search-myelasticsearchhost.us-east-1.es.amazonaws.com,elasticsearch.scheme=https,elasticsearch.port=443

where the elasticsearch instance has been setup in a public VPC as stated above

and results in the same exception above.

If there is some other plugin library which works, please let me know and I will try.

Thank you!

monotek commented 4 years ago

Sorry, eks signing sidecar was a third party contribution. We're not using eks at all so we can't support you here. Sorry.

But parts of the error message ("detect_es_major_version'") might indicate that your es version is not compatible.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.