fluentd output到es认证报错
Describe the issue
fluentd报错如下: 2023-03-15 2023-03-15 07:06:42 +0000 [warn]: #0 [ClusterFluentdConfig-cluster-fluentd-config::cluster::clusteroutput::fluentd-output-es-0] Remaining retry: 7. Retry to communicate after 256 second(s). 2023-03-15 2023-03-15 07:15:14 +0000 [warn]: #0 [ClusterFluentdConfig-cluster-fluentd-config::cluster::clusteroutput::fluentd-output-es-0] Could not communicate to Elasticsearch, resetting connection and trying again. [401] {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401} 2023-03-15 2023-03-15 07:15:14 +0000 [warn]: #0 [ClusterFluentdConfig-cluster-fluentd-config::cluster::clusteroutput::fluentd-output-es-0] Remaining retry: 6. Retry to communicate after 512 second(s). 2023-03-15 2023-03-15 07:32:18 +0000 [warn]: #0 [ClusterFluentdConfig-cluster-fluentd-config::cluster::clusteroutput::fluentd-output-es-0] Could not communicate to Elasticsearch, resetting connection and trying again. [401] {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401} 2023-03-15 2023-03-15 07:32:18 +0000 [warn]: #0 [ClusterFluentdConfig-cluster-fluentd-config::cluster::clusteroutput::fluentd-output-es-0] Remaining retry: 5. Retry to communicate after 1024 second(s). 2023-03-15 2023-03-15 08:06:26 +0000 [warn]: #0 [ClusterFluentdConfig-cluster-fluentd-config::cluster::clusteroutput::fluentd-output-es-0] Could not communicate to Elasticsearch, resetting connection and trying again. [401] {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401} 2023-03-15 2023-03-15 08:06:26 +0000 [warn]: #0 [ClusterFluentdConfig-cluster-fluentd-config::cluster::clusteroutput::fluentd-output-es-0] Remaining retry: 4. Retry to communicate after 2048 second(s). clusteroutput如下: spec: outputs: - elasticsearch: host: cpaas-elasticsearch.cpaas-system.svc.cluster.local logstashFormat: true logstashPrefix: fluent-log-hybrid-fd password: valueFrom: secretKeyRef: key: password name: es-auth port: 9200 user: valueFrom: secretKeyRef: key: username name: es-auth fluentd pod里面配置: <label @3fbb3ef309bc0ad8a2cb6d23371bea70> <match **> @id FluentdConfig-fluent-namespace-fluentd-config-hybrid::cluster::clusteroutput::cluster-fluentd-output-es-hybrid-0 @type elasticsearch host cpaas-elasticsearch.cpaas-system.svc.cluster.local logstash_format true logstash_prefix fluent-log-hybrid-fd password wnrDfKM0Tfe4Jmma8658YapKpZiiLZRn port 9200 user A6jAEOXz
user和password字段转义正常,该secret用于fluent bit的clusteroutput一切正常
How did you install fluent operator?
helm安装
Additional context
fluentd的版本为: kubesphere/fluentd:v1.15.3
Check the es setting, you can refer to https://discuss.elastic.co/t/missing-authentication-for-rest-request/154807/2