Fluentd not able to authenticate when forwarding logs to Elasticsearch using PKI authentication
Issue
-
After configuring
Cluster Loggingfor forwarding the logs to one externalElasticsearchusingPKIauthentication, it fails with an authentication error:2021-01-22 08:17:06 +0000 [warn]: [elasticsearch_onprem_secure] failed to flush the buffer. retry_time=10 next_retry_seconds=2021-01-22 08:22:02 +0000 chunk="5b68f908f8fc670c5f84991151a12440" error_class=Fluent::Plugin::ElasticsearchOutput::RecoverableRequestFailure error="could not push logs to Elasticsearch cluster ({:host=>\"elasticsearch.example.com\", :port=>9200, :scheme=>\"https\", :user=>\"fluentd\", :password=>\"obfuscated\"}): [401] {\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"unable to authenticate user [fluentd] for REST request [/_bulk]\",\"header\":{\"WWW-Authenticate\":[\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\",\"Bearer realm=\\\"security\\\"\",\"ApiKey\"]}}],\"type\":\"security_exception\",\"reason\":\"unable to authenticate user [fluentd] for REST request [/_bulk]\",\"header\":{\"WWW-Authenticate\":[\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\",\"Bearer realm=\\\"security\\\"\",\"ApiKey\"]}},\"status\":401}" - Not able to forward the logs to an external
Elasticsearchconfigured for usingPKIauthentication
Environment
- Red Hat OpenShift Container Platform 4.6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.