-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recursive invalid byte sequence is replaced
logs in kubernetes
#3595
Comments
Encountered this same issue with the latest version (1.4.15) of splunk-connect-for-kubernetes:
This issue is causing our log files to grow massively. As a workaround, since these logs appear as info, I set the logging level to warn in our
Example log from app:
My error log (replaced (``) with ('') for formatting purposes)
|
Describe the bug
When trying to process a string that contains an invalid byte sequence,
fluentd
logs out an info level line that contains the original problematic string. If it is also handling its own log forwarding, this leads to recursive logging.To Reproduce
Run Splunk Connect for Kubernetes in a kubernetes cluster
Produce an application log with a non-UTF-8 character
a. Fluentd picks it up as a part of SCK and produces the
invalid byte sequence is replaced
log lineb. That log line is picked up bu fluentd.
c. Repeats indefinitely
Expected behavior
The
invalid byte sequence is replaced
log line is produced once.Your Environment
This is run as a part of Splunk Connect for Kubernetes v1.4.10
Your Configuration
Default helm installation for Splunk connect for Kubernetes.
ConfigMap from CSK: https://github.com/splunk/splunk-connect-for-kubernetes/blob/1.4.10/manifests/splunk-kubernetes-logging/configMap.yaml
Your Error Log
2022-01-05 14:55:38 +0000 [info]: #0 invalid byte sequence is replaced in `2022-01-05 14:55:37 +0000 [info]: #0 invalid byte sequence is replaced in `2022-01-05 14:55:36 +0000 [info]: #0 invalid byte sequence is replaced in `2022-01-05 14:55:35 +0000 [info]: #0 invalid byte sequence is replaced in `2022-01-05 14:55:34 +0000 [info]: #0 invalid byte sequence is replaced in `2022-01-05 14:55:33 +0000 [info]: #0 invalid byte sequence is replaced in `2022-01-05 14:55:32 +0000 [info]: #0 invalid byte sequence is replaced in `2022-01-05 14:55:31 +0000 [info]: #0 invalid byte sequence is replaced in `2022-01-05 14:55:30 +0000 [info]: #0 invalid byte sequence is replaced in ............ `{ "bytes_in": "483", "bytes_out": "233", "http_method": "GET", "status": "404", "uri_path": "/�", "uri_query": ""}`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
Additional context
The function that seems to be producing the issue is
string_safe_encoding
. The log line is produced before the invalid character is replaced in the string.I am also raising a PR with the simple fix.
The text was updated successfully, but these errors were encountered: