Internal network Plugin Installation TRAP! The web UI display "successful," but the Docker logs actually report an error ! #20971

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

Originally created by @Guofu1149 on GitHub (Dec 11, 2025).

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.10.1.fix.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Plugin Installation TRAP:
When installing locally on an internal network (unable to connect to the marketplace), the web UI display "successful," but the Docker logs actually report an error: plugin_daemon-1 | [ERROR]init environment failed.

Reason:
This is likely because the environment variable PIP_MIRROR_URL in both dify/docker/.env and dify/docker/docker-compose.yaml is left blank!
dify/docker/.env:
1334: # PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
1335: PIP_MIRROR_URL=

Solution:
Fill in the mirror address in .env; then, execute python3 generate_docker_compose to generate the correct docker-compose.yaml file. After doing this, the plugin can be successfully installed and initialized via the web UI!
1334: # PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
1335: PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple

Specific Error Log:
plugin_daemon-1 | [ERROR]init environment failed: failed to install dependencies: signal: killed
plugin_daemon-1 | plugin launch error: init environment for plugin langgenius/xinference:0.0.8 failed too many times
plugin_daemon-1 | you should consider the package is corrupted or your network is unstable

BTW:
It really f k me up! Finally I got it !

✔️ Expected Behavior

Install a plugin like Ollama and run LLM.

Actual Behavior

The web UI display "successful," but the Docker logs actually report an error: plugin_daemon-1 | [ERROR]init environment failed.

Originally created by @Guofu1149 on GitHub (Dec 11, 2025). ### 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.10.1.fix.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce **Plugin Installation TRAP:** When installing locally on an internal network (unable to connect to the marketplace), the web UI display "successful," but the Docker logs actually report an error: plugin_daemon-1 | [ERROR]init environment failed. **Reason:** This is likely because the environment variable PIP_MIRROR_URL in both dify/docker/.env and dify/docker/docker-compose.yaml is left blank! dify/docker/.env: 1334: # PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple 1335: PIP_MIRROR_URL= **Solution:** Fill in the mirror address in .env; then, execute python3 generate_docker_compose to generate the correct docker-compose.yaml file. After doing this, the plugin can be successfully installed and initialized via the web UI! 1334: # PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple 1335: PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple **Specific Error Log:** plugin_daemon-1 | [ERROR]init environment failed: failed to install dependencies: signal: killed plugin_daemon-1 | plugin launch error: init environment for plugin langgenius/xinference:0.0.8 failed too many times plugin_daemon-1 | you should consider the package is corrupted or your network is unstable **BTW:** It really f k me up! Finally I got it ! ### ✔️ Expected Behavior Install a plugin like Ollama and run LLM. ### ❌ Actual Behavior The web UI display "successful," but the Docker logs actually report an error: plugin_daemon-1 | [ERROR]init environment failed.
yindo added the 🐞 bug label 2026-02-21 20:10:04 -05:00
yindo closed this issue 2026-02-21 20:10:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 11, 2025):

Hi @Guofu1149! I'm Dosu and I’m helping the dify team.

This is a well-known issue in self-hosted/internal network Docker setups: if the PIP_MIRROR_URL environment variable is left blank, plugin dependency installation will fail—even though the web UI may optimistically show "successful" because it only reflects the initial acceptance of the install request, not the full backend result. The actual error appears in the Docker logs when the plugin daemon tries (and fails) to install dependencies without a valid PyPI mirror URL.

To fix this, set PIP_MIRROR_URL in your .env file to a valid mirror (like https://pypi.tuna.tsinghua.edu.cn/simple), regenerate your docker-compose.yaml (using python3 generate_docker_compose), and restart the plugin daemon container. This ensures pip can fetch dependencies during plugin setup, resolving the environment initialization errors you saw in the logs. This approach is confirmed by multiple user reports and maintainers as the standard solution for plugin installation failures in restricted networks (example, example).

If you still see timeouts or network errors, check your Docker MTU settings (set to 1450 if needed) and ensure your Docker network config matches (details).

Recent Dify releases have improved UI feedback for plugin install errors, but backend failures may still not always be reflected immediately in the web UI (PR #26293). Always check Docker logs for the real status if something seems off in the UI.

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 (Dec 11, 2025): <!-- Greeting --> Hi @Guofu1149! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> This is a well-known issue in self-hosted/internal network Docker setups: if the `PIP_MIRROR_URL` environment variable is left blank, plugin dependency installation will fail—even though the web UI may optimistically show "successful" because it only reflects the initial acceptance of the install request, not the full backend result. The actual error appears in the Docker logs when the plugin daemon tries (and fails) to install dependencies without a valid PyPI mirror URL. To fix this, set `PIP_MIRROR_URL` in your `.env` file to a valid mirror (like `https://pypi.tuna.tsinghua.edu.cn/simple`), regenerate your `docker-compose.yaml` (using `python3 generate_docker_compose`), and restart the plugin daemon container. This ensures pip can fetch dependencies during plugin setup, resolving the environment initialization errors you saw in the logs. This approach is confirmed by multiple user reports and maintainers as the standard solution for plugin installation failures in restricted networks ([example](https://github.com/langgenius/dify/issues/19571), [example](https://github.com/langgenius/dify-official-plugins/issues/2086)). If you still see timeouts or network errors, check your Docker MTU settings (set to 1450 if needed) and ensure your Docker network config matches ([details](https://github.com/langgenius/dify/issues/19571)). Recent Dify releases have improved UI feedback for plugin install errors, but backend failures may still not always be reflected immediately in the web UI ([PR #26293](https://github.com/langgenius/dify/pull/26293)). Always check Docker logs for the real status if something seems off in the UI. <!-- 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/4b7dbd4e-223e-4537-9bd5-3a4f1875b600?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4b7dbd4e-223e-4537-9bd5-3a4f1875b600?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4b7dbd4e-223e-4537-9bd5-3a4f1875b600?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4b7dbd4e-223e-4537-9bd5-3a4f1875b600?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4b7dbd4e-223e-4537-9bd5-3a4f1875b600?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4b7dbd4e-223e-4537-9bd5-3a4f1875b600?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4b7dbd4e-223e-4537-9bd5-3a4f1875b600?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=This%20is%20a%20well-known%20issue%20in%20self-hosted/internal%20network%20Docker%20setups%3A%20if%20the%20%60PIP_MIRROR_URL%60%20environment%20variable%20is%20left%20blank%2C%20plugin%20dependency%20installation%20will%20fail%E2%80%94even%20though%20the%20web%20UI%20may%20optimistically%20show%20%22successful%22%20because%20it%20only%20reflects%20the%20initial%20acceptance%20of%20the%20install%20request%2C%20not%20the%20full%20backend%20result.%20The%20actual%20error%20appears%20in%20the%20Docker%20logs%20when%20the%20plugin%20daemon%20tries%20%28and%20fails%29%20to%20install%20dependencies%20without%20a%20valid%20PyPI%20mirror%20URL.%20%0A%0ATo%20fix%20this%2C%20set%20%60PIP_MIRROR_URL%60%20in%20your%20%60.env%60%20file%20to%20a%20valid%20mirror%20%28like%20%60https%3A//pypi.tuna.tsinghua.edu.cn/simple%60%29%2C%20regenerate%20your%20%60docker-compose.yaml%60%20%28using%20%60python3%20generate_docker_compose%60%29%2C%20and%20restart%20the%20plugin%20daemon%20container.%20This%20ensures%20pip%20can%20fetch%20dependencies%20during%20plugin%20setup%2C%20resolving%20the%20environment%20initialization%20errors%20you%20saw%20in%20the%20logs.%20This%20approach%20is%20confirmed%20by%20multiple%20user%20reports%20and%20maintainers%20as%20the%20standard%20solution%20for%20plugin%20installation%20failures%20in%20restricted%20networks%20%28%5Bexample%5D%28https%3A//github.com/langgenius/dify/issues/19571%29%2C%20%5Bexample%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2086%29%29.%0A%0AIf%20you%20still%20see%20timeouts%20or%20network%20errors%2C%20check%20your%20Docker%20MTU%20settings%20%28set%20to%201450%20if%20needed%29%20and%20ensure%20your%20Docker%20network%20config%20matches%20%28%5Bdetails%5D%28https%3A//github.com/langgenius/dify/issues/19571%29%29.%20%0A%0ARecent%20Dify%20releases%20have%20improved%20UI%20feedback%20for%20plugin%20install%20errors%2C%20but%20backend%20failures%20may%20still%20not%20always%20be%20reflected%20immediately%20in%20the%20web%20UI%20%28%5BPR%20%2326293%5D%28https%3A//github.com/langgenius/dify/pull/26293%29%29.%20Always%20check%20Docker%20logs%20for%20the%20real%20status%20if%20something%20seems%20off%20in%20the%20UI.)&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/29506)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20971