Illegal Base64 Data Error When Exporting Logs from Fluentd

Solution Unverified - Updated -

Issue

  • We currently have Openshift's EFK (logging) stack running, and are trying to configure the internal fluentd to send logs to an external fluentd process
  • The certificate and key that we've obtained were generated from the command:
# openssl genrsa -des3 -out fluentca.key 4096
# openssl req -newkey rsa:2048 -nodes -keyout fluentca.key -x509 -out fluentca.crt
  • The documentation mentions patching the logging-fluentd secrets using the oc patch command. We attempted to run the first one for the certificate using the keys generated above as follows:
# oc patch secrets/logging-fluentd --type=json \
  --patch "[{'op':'add','path':'/data/fluentca.crt','value':'$(base64 /etc/fluent/keys/fluentca.crt)'}]"

But we get the error:

Error from server: [pos 7039]: json: error decoding base64 binary '---long-key-string-snipped---': illegal base64 data at input byte 76

Environment

  • Red Hat OpenShift Container Platform
    • 3.4.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content