You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(optional) already reported 3rd party upstream repository or mailing list if you use k8s addon or helm charts.
Problem
In order to increase security, we recently wanted to switch to Consul Transparent Proxy. However, due to that localhost will no longer be properly resolved. Instead we need to use the service name on Kubernetes.
However, due to that change, the fluentd output plugin for elasticsearch does not work anymore. It always complains, that it cannot resolve the hostname. It seems that this is a known issue, as I already found multiple issues here.
Steps to replicate
Deploy Consul with Transparent Proxy
Deploy the Fluentd Helm Chart on K8s
Try to establish a connection between fluentd and elasticsearch, which is protected by transparent proxy.
Other services can resolve the elasticsearch-master service, which results to the following output. However, unfortunately, something seems to be wrong with the way that DNS works in the plugin, if it cannot resolve to localhost.
Below is the nslookup command executed from another pod container
nslookup elasticsearch-master
;; Got recursion not available from 127.0.0.1, trying next server
;; Got recursion not available from 10.0.0.10
Server: 10.0.0.10
Address: 10.0.0.10#53
Name: elasticsearch-master.default.svc.cluster.local
Address: 172.28.160.107
Name: elasticsearch-master.default.svc.cluster.local
Address: 172.28.162.22
Using Fluentd and ES plugin versions
Bare Metal or within Docker or Kubernetes or others? Kubernetes
Fluentd v0.12 or v0.14/v1.0 - fluentd 1.17.0
ES plugin 3.x.y/2.x.y or 1.x.y
paste boot log of fluentd or td-agent
2024-08-07 12:02:45 +0000 [info]: #0 'flush_interval' is configured at out side of <buffer>. 'flush_mode' is set to 'interval' to keep existing behaviour
The client is unable to verify that the server is Elasticsearch. Some functionality may not be compatible if the server is running an unsupported product.
2024-08-07 12:02:46 +0000 [error]: #0 unexpected error error_class=Elastic::Transport::Transport::Error error="no address for elasticsearch-master (Resolv::ResolvError)"
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/elastic-transport-8.3.2/lib/elastic/transport/transport/base.rb:324:in `rescue in perform_request'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/elastic-transport-8.3.2/lib/elastic/transport/transport/base.rb:285:in `perform_request'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/elastic-transport-8.3.2/lib/elastic/transport/transport/http/faraday.rb:36:in `perform_request'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/elastic-transport-8.3.2/lib/elastic/transport/client.rb:197:in `perform_request'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/elasticsearch-8.13.0/lib/elasticsearch.rb:86:in `verify_elasticsearch'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/elasticsearch-8.13.0/lib/elasticsearch.rb:69:in `method_missing'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/elasticsearch-api-8.13.0/lib/elasticsearch/api/actions/info.rb:43:in `info'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/fluent-plugin-elasticsearch-5.4.3/lib/fluent/plugin/out_elasticsearch.rb:498:in `detect_es_major_version'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/fluent-plugin-elasticsearch-5.4.3/lib/fluent/plugin/out_elasticsearch.rb:489:in `block in handle_last_seen_es_major_version'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/fluent-plugin-elasticsearch-5.4.3/lib/fluent/plugin/elasticsearch_index_template.rb:56:in `retry_operate'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/fluent-plugin-elasticsearch-5.4.3/lib/fluent/plugin/out_elasticsearch.rb:486:in `handle_last_seen_es_major_version'
2024-08-07 12:02:46 +0000 [error]: #0 /opt/bitnami/fluentd/gems/fluent-plugin-elasticsearch-5.4.3/lib/fluent/plugin/out_elasticsearch.rb:338:in `configure'
paste result of fluent-gem list, td-agent-gem list or your Gemfile.lock
(check apply)
Problem
In order to increase security, we recently wanted to switch to Consul Transparent Proxy. However, due to that localhost will no longer be properly resolved. Instead we need to use the service name on Kubernetes.
However, due to that change, the fluentd output plugin for elasticsearch does not work anymore. It always complains, that it cannot resolve the hostname. It seems that this is a known issue, as I already found multiple issues here.
Steps to replicate
Deploy Consul with Transparent Proxy
Deploy the Fluentd Helm Chart on K8s
Try to establish a connection between fluentd and elasticsearch, which is protected by transparent proxy.
We are using the following output config:
Expected Behavior or What you need to ask
Other services can resolve the elasticsearch-master service, which results to the following output. However, unfortunately, something seems to be wrong with the way that DNS works in the plugin, if it cannot resolve to localhost.
Below is the nslookup command executed from another pod container
Using Fluentd and ES plugin versions
fluent-gem list
,td-agent-gem list
or your Gemfile.lockThe text was updated successfully, but these errors were encountered: