en_US.UTF-8 load failed #21468

Closed
opened 2026-02-21 20:12:43 -05:00 by yindo · 1 comment
Owner

Originally created by @fatelei on GitHub (Jan 6, 2026).

Originally assigned to: @fatelei on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. docker compose up -d
  2. check the container log
Image

load en_US.UTF-8 failed

✔️ Expected Behavior

load en_US.UTF-8 success

Actual Behavior

load en_US.UTF-8 failed

Originally created by @fatelei on GitHub (Jan 6, 2026). Originally assigned to: @fatelei on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. docker compose up -d 2. check the container log 3. <img width="1252" height="536" alt="Image" src="https://github.com/user-attachments/assets/c94dd518-7b7d-4cdc-9fdd-78ec019a9c73" /> load en_US.UTF-8 failed ### ✔️ Expected Behavior load en_US.UTF-8 success ### ❌ Actual Behavior load en_US.UTF-8 failed
yindo added the 🐞 bug label 2026-02-21 20:12:43 -05:00
yindo closed this issue 2026-02-21 20:12:43 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 6, 2026):

The "load en_US.UTF-8 failed" warning happens because the Docker image sets LANG and LC_ALL to en_US.UTF-8, but the locale isn't actually installed or generated inside the container. This is common with minimal images like python:3.12-slim or Alpine—setting environment variables alone isn't enough. The warning is usually harmless and doesn't affect Dify's core functionality unless you run code that depends on locale support (like in the sandbox container) source.

To fix it, you need to rebuild the relevant Docker image(s) with locale installation and generation steps. For Debian/Ubuntu-based images, add to your Dockerfile:

ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
RUN apt-get update && apt-get install -y locales && locale-gen en_US.UTF-8

For Alpine-based images:

ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
RUN apk add --no-cache libc6-compat

Then rebuild and redeploy your container(s). This will ensure the en_US.UTF-8 locale is available and the warning disappears source.

If you only see the warning and Dify works as expected, you can safely ignore it for API, web, and worker containers. Only the sandbox/code execution container strictly requires the locale to be present source.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 6, 2026): <!-- Answer --> The "load en_US.UTF-8 failed" warning happens because the Docker image sets LANG and LC_ALL to en_US.UTF-8, but the locale isn't actually installed or generated inside the container. This is common with minimal images like python:3.12-slim or Alpine—setting environment variables alone isn't enough. The warning is usually harmless and doesn't affect Dify's core functionality unless you run code that depends on locale support (like in the sandbox container) [source](https://github.com/langgenius/dify/discussions/28350). To fix it, you need to rebuild the relevant Docker image(s) with locale installation and generation steps. For Debian/Ubuntu-based images, add to your Dockerfile: ```dockerfile ENV LANG=en_US.UTF-8 ENV LC_ALL=en_US.UTF-8 RUN apt-get update && apt-get install -y locales && locale-gen en_US.UTF-8 ``` For Alpine-based images: ```dockerfile ENV LANG=en_US.UTF-8 ENV LC_ALL=en_US.UTF-8 RUN apk add --no-cache libc6-compat ``` Then rebuild and redeploy your container(s). This will ensure the en_US.UTF-8 locale is available and the warning disappears [source](https://github.com/langgenius/dify/discussions/23184). If you only see the warning and Dify works as expected, you can safely ignore it for API, web, and worker containers. Only the sandbox/code execution container strictly requires the locale to be present [source](https://github.com/langgenius/dify/issues/25754). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/8dd01868-ffb7-45a8-8fda-30dbdfe5522e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8dd01868-ffb7-45a8-8fda-30dbdfe5522e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8dd01868-ffb7-45a8-8fda-30dbdfe5522e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8dd01868-ffb7-45a8-8fda-30dbdfe5522e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8dd01868-ffb7-45a8-8fda-30dbdfe5522e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8dd01868-ffb7-45a8-8fda-30dbdfe5522e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8dd01868-ffb7-45a8-8fda-30dbdfe5522e?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20%22load%20en_US.UTF-8%20failed%22%20warning%20happens%20because%20the%20Docker%20image%20sets%20LANG%20and%20LC_ALL%20to%20en_US.UTF-8%2C%20but%20the%20locale%20isn%27t%20actually%20installed%20or%20generated%20inside%20the%20container.%20This%20is%20common%20with%20minimal%20images%20like%20python%3A3.12-slim%20or%20Alpine%E2%80%94setting%20environment%20variables%20alone%20isn%27t%20enough.%20The%20warning%20is%20usually%20harmless%20and%20doesn%27t%20affect%20Dify%27s%20core%20functionality%20unless%20you%20run%20code%20that%20depends%20on%20locale%20support%20%28like%20in%20the%20sandbox%20container%29%20%5Bsource%5D%28https%3A//github.com/langgenius/dify/discussions/28350%29.%0A%0ATo%20fix%20it%2C%20you%20need%20to%20rebuild%20the%20relevant%20Docker%20image%28s%29%20with%20locale%20installation%20and%20generation%20steps.%20For%20Debian/Ubuntu-based%20images%2C%20add%20to%20your%20Dockerfile%3A%0A%0A%60%60%60dockerfile%0AENV%20LANG%3Den_US.UTF-8%0AENV%20LC_ALL%3Den_US.UTF-8%0ARUN%20apt-get%20update%20%26%26%20apt-get%20install%20-y%20locales%20%26%26%20locale-gen%20en_US.UTF-8%0A%60%60%60%0A%0AFor%20Alpine-based%20images%3A%0A%0A%60%60%60dockerfile%0AENV%20LANG%3Den_US.UTF-8%0AENV%20LC_ALL%3Den_US.UTF-8%0ARUN%20apk%20add%20--no-cache%20libc6-compat%0A%60%60%60%0A%0AThen%20rebuild%20and%20redeploy%20your%20container%28s%29.%20This%20will%20ensure%20the%20en_US.UTF-8%20locale%20is%20available%20and%20the%20warning%20disappears%20%5Bsource%5D%28https%3A//github.com/langgenius/dify/discussions/23184%29.%0A%0AIf%20you%20only%20see%20the%20warning%20and%20Dify%20works%20as%20expected%2C%20you%20can%20safely%20ignore%20it%20for%20API%2C%20web%2C%20and%20worker%20containers.%20Only%20the%20sandbox/code%20execution%20container%20strictly%20requires%20the%20locale%20to%20be%20present%20%5Bsource%5D%28https%3A//github.com/langgenius/dify/issues/25754%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/30620)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21468