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
We get the following warning out scalyr from the 2.2.17-alpine image:
Detected a non UTF-8 locale (unknown) being used. You are strongly encouraged to set the locale / coding for the agent process to UTF-8. Otherwise things won't work when trying to monitor files with non-ascii content or non-ascii characters in the log file names. On Linux you can do that by setting LANG and LC_ALL environment variable: e.g. export LC_ALL=en_US.UTF-8.
IMO this should be baked into the image (especially if there are any compiled components/extensions as they would have to be set before compiling C that may leverage locales).
For example on Debian/Ubuntu base there is the locales and locales-all packages and the following env vars required to make this work:
ENV LANG "en_US.UTF-8"
ENV LANGUAGE "en_US.UTF-8"
ENV LC_ALL "en_US.UTF-8"
Is the expectation that we should be setting these after the fact?
[edit] It looks like 2.1.40-alpine had this correctly set as ENV LANG=C.UTF-8 and then it was removed in subsequent releases.
The text was updated successfully, but these errors were encountered:
@weilliu Yes thats correct, this message is coming from 2.2.17-alpine.
Its being forwarded from the agent log (/var/log/scalyr-agent-2/agent.log).
The full log line is:
2024-10-22 23:36:50.139Z WARNING [core] [scalyr-agent-2:1659] Detected a non UTF-8 locale (unknown) being used. You are strongly encouraged to set the locale / coding for the agent process to UTF-8. Otherwise things won't work when trying to monitor files with non-ascii content or non-ascii characters in the log file names. On Linux you can do that by setting LANG and LC_ALL environment variable: e.g. export LC_ALL=en_US.UTF-8.
I dont need to exec into the container to see it, its part of the logs we are forwarding to scalyr. It seems to be logged on initial start of the Docker container.
We get the following warning out scalyr from the
2.2.17-alpine
image:IMO this should be baked into the image (especially if there are any compiled components/extensions as they would have to be set before compiling C that may leverage locales).
For example on Debian/Ubuntu base there is the
locales
andlocales-all
packages and the following env vars required to make this work:Is the expectation that we should be setting these after the fact?
[edit] It looks like
2.1.40-alpine
had this correctly set asENV LANG=C.UTF-8
and then it was removed in subsequent releases.The text was updated successfully, but these errors were encountered: