dify部署问题:plugin launch error: init environment for plugin langgenius/tongyi:0.1.3 failed too many
分析: 从报错日志上看,是网络引起的。而且是plugin_daemon-1容器引发的错误,下载“包”导致的错误,初步诊断应该是由于镜像仓库地址,默认使用了是pip官方镜像仓库地址,国内可能连不上或者连接不稳定。
·
init environment for plugin langgenius/tongyi:0.1.3 failed too many times, you should consider the package is corrupted or your network is unstable

查看日志
docker-compose logs -f
sandbox-1 | [GIN] 2025/11/22 - 02:57:11 | 200 | 23.119µs | 127.0.0.1 | GET "/health"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:14 +0000] "GET /console/api/apps/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflows/draft HTTP/1.1" 200 3052 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:17 | 200 | 586.458µs | 172.27.0.9 | POST "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/installation/fetch/batch"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:17 +0000] "POST /console/api/workspaces/current/plugin/list/installations/ids HTTP/1.1" 200 16 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:17 | 200 | 335.866µs | 172.27.0.9 | GET "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/models?page=1&page_size=256"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:17 +0000] "GET /console/api/workspaces/current/models/model-types/llm HTTP/1.1" 200 13 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:17 | 200 | 347.824µs | 172.27.0.9 | GET "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/models?page=1&page_size=256"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:17 | 200 | 543.64µs | 172.27.0.9 | GET "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/models?page=1&page_size=256"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:17 +0000] "GET /console/api/workspaces/current/models/model-types/text-embedding HTTP/1.1" 200 13 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:17 +0000] "GET /console/api/workspaces/current/models/model-types/rerank HTTP/1.1" 200 13 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:19 | 200 | 12.941002ms | 172.27.0.9 | GET "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/fetch/manifest?plugin_unique_identifier=langgenius%2Ftongyi%3A0.1.3%4008f25a10c0617a3512fac091a0f0d894925357e965efe40fdf95cb48e09b62d1"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:19 | 404 | 430ns | 172.27.0.9 | GET "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/decode/from_identifier"
api-1 | 2025-11-22 02:57:19.106 ERROR [Dummy-8] [base.py:144] - Failed to request plugin daemon, status: 404, url: plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/decode/from_identifier
api-1 | Traceback (most recent call last):
api-1 | File "/app/api/core/plugin/impl/base.py", line 141, in _request_with_plugin_daemon_response
api-1 | response.raise_for_status()
api-1 | File "/app/api/.venv/lib/python3.12/site-packages/requests/models.py", line 1026, in raise_for_status
api-1 | raise HTTPError(http_error_msg, response=self)
api-1 | requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://plugin_daemon:5002/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/decode/from_identifier
api-1 | 2025-11-22 02:57:20.093 INFO [Dummy-8] [_client.py:1038] - HTTP Request: GET https://marketplace.dify.ai/api/v1/plugins/download?unique_identifier=langgenius/tongyi:0.1.3@08f25a10c0617a3512fac091a0f0d894925357e965efe40fdf95cb48e09b62d1 "HTTP/1.1 200 OK"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:20 +0000] "POST /console/api/apps/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflows/draft?_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMjY2OWU3YmEtNmE0Yi00NzY1LTg3YjktYmM4YzVlYmZmOTQ1IiwiZXhwIjoxNzYzNzgyOTg3LCJpc3MiOiJTRUxGX0hPU1RFRCIsInN1YiI6IkNvbnNvbGUgQVBJIFBhc3Nwb3J0In0.FUnmSluegsxNokTqj5ox7wvSpy3HVHag35ceUS4BNmE HTTP/1.1" 200 124 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:20 | 200 | 194.087129ms | 172.27.0.9 | POST "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/install/upload/package"
plugin_daemon-1 |
plugin_daemon-1 | 2025/11/22 02:57:20 /app/internal/db/executor.go:259 record not found
plugin_daemon-1 | [0.433ms] [rows:0] SELECT * FROM "plugins" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.1.3@08f25a10c0617a3512fac091a0f0d894925357e965efe40fdf95cb48e09b62d1' ORDER BY "plugins"."id" LIMIT 1
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:20 | 200 | 17.747358ms | 172.27.0.9 | POST "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/install/identifiers"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:20 +0000] "POST /console/api/workspaces/current/plugin/install/marketplace HTTP/1.1" 200 76 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:20 | 200 | 435.817µs | 172.27.0.9 | GET "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/install/tasks/06877ac8-e9e2-4269-a55e-1c3bac08fb8c"
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:20 | 200 | 648.039µs | 172.27.0.9 | GET "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/install/tasks?page=1&page_size=100"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:20 +0000] "GET /console/api/workspaces/current/plugin/tasks/06877ac8-e9e2-4269-a55e-1c3bac08fb8c HTTP/1.1" 200 615 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:20 +0000] "GET /console/api/workspaces/current/plugin/tasks?page=1&page_size=100 HTTP/1.1" 200 2132 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:27: [INFO]new plugin logged in: langgenius/tongyi:0.1.3
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:59: [INFO]init environment for plugin langgenius/tongyi:0.1.3
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:65: [ERROR]init environment failed: failed to create virtual environment: exit status 101, output:
plugin_daemon-1 | thread 'main' panicked at /home/runner/work/uv/uv/crates/uv/src/lib.rs:2225:10:
plugin_daemon-1 | Tokio executor failed, was there a panic?: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }
plugin_daemon-1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
plugin_daemon-1 | , retrying
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:59: [INFO]init environment for plugin langgenius/tongyi:0.1.3
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:65: [ERROR]init environment failed: failed to create virtual environment: exit status 101, output:
plugin_daemon-1 | thread 'main' panicked at /home/runner/work/uv/uv/crates/uv/src/lib.rs:2225:10:
plugin_daemon-1 | Tokio executor failed, was there a panic?: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }
plugin_daemon-1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
plugin_daemon-1 | , retrying
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:59: [INFO]init environment for plugin langgenius/tongyi:0.1.3
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:65: [ERROR]init environment failed: failed to create virtual environment: exit status 101, output:
plugin_daemon-1 | thread 'main' panicked at /home/runner/work/uv/uv/crates/uv/src/lib.rs:2225:10:
plugin_daemon-1 | Tokio executor failed, was there a panic?: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }
plugin_daemon-1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
plugin_daemon-1 | , retrying
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:59: [INFO]init environment for plugin langgenius/tongyi:0.1.3
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:65: [ERROR]init environment failed: failed to create virtual environment: exit status 101, output:
plugin_daemon-1 | thread 'main' panicked at /home/runner/work/uv/uv/crates/uv/src/lib.rs:2225:10:
plugin_daemon-1 | Tokio executor failed, was there a panic?: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }
plugin_daemon-1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
plugin_daemon-1 | , retrying
plugin_daemon-1 | 2025/11/22 02:57:21 full_duplex.go:29: [INFO]plugin langgenius/tongyi:0.1.3 has exited
ssrf_proxy-1 | 1763780240.697 1522 172.27.0.9 TCP_TUNNEL/200 624852 CONNECT marketplace.dify.ai:443 - HIER_DIRECT/104.26.8.156 -
plugin_daemon-1 | [GIN] 2025/11/22 - 02:57:31 | 200 | 624.539µs | 172.27.0.9 | GET "/plugin/edc0e374-a419-4ccd-aea6-7452d53e2db0/management/install/tasks/06877ac8-e9e2-4269-a55e-1c3bac08fb8c"
nginx-1 | 10.37.40.179 - - [22/Nov/2025:02:57:31 +0000] "GET /console/api/workspaces/current/plugin/tasks/06877ac8-e9e2-4269-a55e-1c3bac08fb8c HTTP/1.1" 200 750 "http://10.2.106.53:1080/app/3b84fb77-b34e-4d89-b60a-74d611e74b20/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0" "-"
解决方式
分析: 从报错日志上看,是网络引起的。而且是plugin_daemon-1容器引发的错误,下载“包”导致的错误,初步诊断应该是由于镜像仓库地址,默认使用了是pip官方镜像仓库地址,国内可能连不上或者连接不稳定。解决方式如下:
cd /opt/dify/docker
cp .env.example .env # 从模板拷贝一份
vim .env
# 修改配置项:注意若使用PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple会有认证问题,建议使用aliyun
PIP_MIRROR_URL=https://mirrors.aliyun.com/pypi/simple/
重启
[root@lys docker]# docker-compose down
[+] Running 12/12
✔ Container docker-nginx-1 Removed 10.5s
✔ Container docker-plugin_daemon-1 Removed 10.5s
✔ Container docker-weaviate-1 Removed 0.4s
✔ Container docker-ssrf_proxy-1 Removed 10.6s
✔ Container docker-worker-1 Removed 4.4s
✔ Container docker-sandbox-1 Removed 0.3s
✔ Container docker-web-1 Removed 10.3s
✔ Container docker-api-1 Removed 2.1s
✔ Container docker-db-1 Removed 0.3s
✔ Container docker-redis-1 Removed 0.3s
✔ Network docker_ssrf_proxy_network Removed 0.1s
✔ Network docker_default Removed 0.0s
[root@lys docker]# docker-compose up -d
[+] Running 12/12
✔ Network docker_default Created 0.0s
✔ Network docker_ssrf_proxy_network Created 0.0s
✔ Container docker-weaviate-1 Started 0.3s
✔ Container docker-ssrf_proxy-1 Started 0.3s
✔ Container docker-web-1 Started 0.3s
✔ Container docker-sandbox-1 Started 0.3s
✔ Container docker-redis-1 Started 0.3s
✔ Container docker-db-1 Healthy 0.2s
✔ Container docker-plugin_daemon-1 Started 0.2s
✔ Container docker-worker-1 Started 0.2s
✔ Container docker-api-1 Started 0.2s
✔ Container docker-nginx-1 Started

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)