[ERROR]init environment failed: failed to pre-compile the plugin: , retry in 30s #114

Closed
opened 2026-02-16 10:18:06 -05:00 by yindo · 3 comments
Owner

Originally created by @YDandRX2018 on GitHub (Mar 24, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

2025/03/24 03:42:43 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[216.932ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:42:43 | 200 |  229.310779ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"

2025/03/24 03:42:43 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[224.543ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:42:43 | 200 |  235.330995ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"

2025/03/24 03:42:43 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[226.948ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:42:43 | 200 |   236.47223ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"

2025/03/24 03:42:43 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[228.590ms] [rows:0] SELECT * FROM "plugin_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' AND plugin_id IN ('langgenius/tongyi') LIMIT 256
[GIN] 2025/03/24 - 03:42:43 | 200 |  245.017858ms |      172.18.0.9 | POST     "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/installation/fetch/batch"

2025/03/24 03:42:46 /app/internal/db/pgsql.go:259 record not found
[23.620ms] [rows:0] SELECT * FROM "plugin_declarations" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.0.14@d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb' ORDER BY "plugin_declarations"."id" LIMIT 1
[GIN] 2025/03/24 - 03:42:46 | 200 |   29.125315ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/fetch/manifest?plugin_unique_identifier=langgenius%2Ftongyi%3A0.0.14%40d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb"

2025/03/24 03:42:50 /app/internal/db/pgsql.go:259 record not found
[2.276ms] [rows:0] SELECT * FROM "plugin_declarations" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.0.14@d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb' ORDER BY "plugin_declarations"."id" LIMIT 1
[GIN] 2025/03/24 - 03:42:50 | 200 |  912.886546ms |      172.18.0.9 | POST     "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/upload/package"

2025/03/24 03:42:51 /app/internal/db/pgsql.go:259 SLOW SQL >= 200ms
[278.879ms] [rows:1] SELECT * FROM "plugin_declarations" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.0.14@d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb' ORDER BY "plugin_declarations"."id" LIMIT 1

2025/03/24 03:42:51 /app/internal/db/pgsql.go:259 record not found
[12.037ms] [rows:0] SELECT * FROM "plugins" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.0.14@d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb' ORDER BY "plugins"."id" LIMIT 1
[GIN] 2025/03/24 - 03:42:51 | 200 |  336.974296ms |      172.18.0.9 | POST     "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/identifiers"
[GIN] 2025/03/24 - 03:42:51 | 200 |    8.402141ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:42:51 | 200 |   25.048256ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks?page=1&page_size=100"
2025/03/24 03:42:52 runtime_lifetime.go:40: [INFO]new plugin logged in: langgenius/tongyi:0.0.14
2025/03/24 03:42:52 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/tongyi:0.0.14
[GIN] 2025/03/24 - 03:43:02 | 200 |   18.764103ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:43:13 | 200 |    6.301797ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:43:24 | 200 |    4.277999ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:43:35 | 200 |    4.238457ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:43:46 | 200 |    4.458065ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:43:56 | 200 |    4.970519ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks?page=1&page_size=100"
[GIN] 2025/03/24 - 03:43:57 | 200 |    5.108578ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
2025/03/24 03:44:05 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing '.'......
[GIN] 2025/03/24 - 03:44:08 | 200 |    2.629058ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:44:19 | 200 |    3.086184ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:44:30 | 200 |    2.663247ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
2025/03/24 03:44:37 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/anyio/pytest_plugin.py'......
[GIN] 2025/03/24 - 03:44:41 | 200 |     2.42755ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:44:52 | 200 |    2.649265ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
2025/03/24 03:44:53 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing './.venv/lib/python3.12/site-packages/dashscope/audio/asr'......
[GIN] 2025/03/24 - 03:45:03 | 200 |    2.428865ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
2025/03/24 03:45:07 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/core/plugin_executor.py'......
[GIN] 2025/03/24 - 03:45:14 | 200 |    2.701835ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:45:25 | 200 |    2.873603ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:45:36 | 200 |    2.509097ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
2025/03/24 03:45:45 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/invocations/model/__init__.py'......
[GIN] 2025/03/24 - 03:45:47 | 200 |    3.466155ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:45:58 | 200 |    2.575443ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:46:09 | 200 |    2.962394ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:46:20 | 200 |    3.202106ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
2025/03/24 03:46:21 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/flask/ctx.py'......
[GIN] 2025/03/24 - 03:46:31 | 200 |    2.742065ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
2025/03/24 03:46:42 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/gevent/testing/errorhandler.py'......
[GIN] 2025/03/24 - 03:46:42 | 200 |    2.984379ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:46:53 | 200 |    5.544734ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802"
[GIN] 2025/03/24 - 03:46:53 | 200 |    3.310477ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks?page=1&page_size=100"
[GIN] 2025/03/24 - 03:46:54 | 200 |   14.126311ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/list?page=1&page_size=256"
[GIN] 2025/03/24 - 03:46:54 | 200 |    2.958433ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/list?page=1&page_size=256"

2025/03/24 03:46:54 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[256.151ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:46:54 | 200 |  257.376269ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"

2025/03/24 03:46:54 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[258.765ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:46:54 | 200 |  259.797302ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"

2025/03/24 03:46:54 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[261.099ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:46:54 | 200 |  261.780381ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"

2025/03/24 03:46:54 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[268.126ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:46:54 | 200 |  269.029395ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"
[GIN] 2025/03/24 - 03:46:54 | 200 |    3.824456ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"
[GIN] 2025/03/24 - 03:46:54 | 200 |    3.065721ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"

2025/03/24 03:46:55 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[242.056ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:46:55 | 200 |  242.939479ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"

2025/03/24 03:46:55 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms
[251.178ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256
[GIN] 2025/03/24 - 03:46:55 | 200 |   251.87316ms |      172.18.0.9 | GET      "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256"
2025/03/24 03:47:07 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/gevent/tests/test__issue330.py'......
2025/03/24 03:47:41 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/greenlet/tests/fail_switch_three_greenlets.py'......

2025/03/24 03:48:52 /app/internal/db/pgsql.go:39 SLOW SQL >= 200ms
[319.308ms] [rows:1] DELETE FROM "install_tasks" WHERE "install_tasks"."id" = 'b08b0fc4-2b14-45fd-b92f-827a2dfbd802'
2025/03/24 03:48:59 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/httpx/_utils.py'......
2025/03/24 03:51:02 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/_core/tests/examples/cython/setup.py'......
2025/03/24 03:51:30 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py'......
2025/03/24 03:52:52 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_isoc.py'......
2025/03/24 03:53:02 runtime_lifetime.go:42: [INFO]plugin langgenius/tongyi:0.0.14 has exited
2025/03/24 03:53:17 runtime_lifetime.go:40: [INFO]new plugin logged in: langgenius/tongyi:0.0.14
2025/03/24 03:53:17 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/tongyi:0.0.14
2025/03/24 03:54:34 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing '.'......
2025/03/24 03:55:05 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/anyio/pytest_plugin.py'......
2025/03/24 03:55:21 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing './.venv/lib/python3.12/site-packages/dashscope/audio/asr'......
2025/03/24 03:55:34 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/core/plugin_executor.py'......
2025/03/24 03:56:07 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/invocations/model/__init__.py'......
2025/03/24 03:56:42 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/flask/ctx.py'......
2025/03/24 03:57:06 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/gevent/testing/errorhandler.py'......
2025/03/24 03:57:31 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/gevent/tests/test__issue330.py'......
2025/03/24 03:58:03 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/greenlet/tests/fail_switch_three_greenlets.py'......
2025/03/24 03:59:05 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/httpx/_utils.py'......
2025/03/24 04:01:15 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/_core/tests/examples/cython/setup.py'......
2025/03/24 04:01:43 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py'......
2025/03/24 04:03:04 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_isoc.py'......
2025/03/24 04:03:29 runtime_lifetime.go:76: [ERROR]init environment failed: failed to pre-compile the plugin: , retry in 30s
2025/03/24 04:03:59 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/tongyi:0.0.14
2025/03/24 04:05:56 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing '.'......
2025/03/24 04:06:42 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/anyio/pytest_plugin.py'......

✔️ Expected Behavior

Expected successful installation of Tongyi Qianwen plugin

Actual Behavior

[ERROR]init environment failed: failed to pre-compile the plugin: , retry in 30s

Originally created by @YDandRX2018 on GitHub (Mar 24, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ``` 2025/03/24 03:42:43 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [216.932ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:42:43 | 200 | 229.310779ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:42:43 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [224.543ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:42:43 | 200 | 235.330995ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:42:43 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [226.948ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:42:43 | 200 | 236.47223ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:42:43 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [228.590ms] [rows:0] SELECT * FROM "plugin_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' AND plugin_id IN ('langgenius/tongyi') LIMIT 256 [GIN] 2025/03/24 - 03:42:43 | 200 | 245.017858ms | 172.18.0.9 | POST "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/installation/fetch/batch" 2025/03/24 03:42:46 /app/internal/db/pgsql.go:259 record not found [23.620ms] [rows:0] SELECT * FROM "plugin_declarations" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.0.14@d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb' ORDER BY "plugin_declarations"."id" LIMIT 1 [GIN] 2025/03/24 - 03:42:46 | 200 | 29.125315ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/fetch/manifest?plugin_unique_identifier=langgenius%2Ftongyi%3A0.0.14%40d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb" 2025/03/24 03:42:50 /app/internal/db/pgsql.go:259 record not found [2.276ms] [rows:0] SELECT * FROM "plugin_declarations" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.0.14@d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb' ORDER BY "plugin_declarations"."id" LIMIT 1 [GIN] 2025/03/24 - 03:42:50 | 200 | 912.886546ms | 172.18.0.9 | POST "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/upload/package" 2025/03/24 03:42:51 /app/internal/db/pgsql.go:259 SLOW SQL >= 200ms [278.879ms] [rows:1] SELECT * FROM "plugin_declarations" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.0.14@d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb' ORDER BY "plugin_declarations"."id" LIMIT 1 2025/03/24 03:42:51 /app/internal/db/pgsql.go:259 record not found [12.037ms] [rows:0] SELECT * FROM "plugins" WHERE plugin_unique_identifier = 'langgenius/tongyi:0.0.14@d333909fe8d75a335b44da4b878d5120779b8703f12c21cf4730135d6864afbb' ORDER BY "plugins"."id" LIMIT 1 [GIN] 2025/03/24 - 03:42:51 | 200 | 336.974296ms | 172.18.0.9 | POST "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/identifiers" [GIN] 2025/03/24 - 03:42:51 | 200 | 8.402141ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:42:51 | 200 | 25.048256ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks?page=1&page_size=100" 2025/03/24 03:42:52 runtime_lifetime.go:40: [INFO]new plugin logged in: langgenius/tongyi:0.0.14 2025/03/24 03:42:52 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/tongyi:0.0.14 [GIN] 2025/03/24 - 03:43:02 | 200 | 18.764103ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:43:13 | 200 | 6.301797ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:43:24 | 200 | 4.277999ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:43:35 | 200 | 4.238457ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:43:46 | 200 | 4.458065ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:43:56 | 200 | 4.970519ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks?page=1&page_size=100" [GIN] 2025/03/24 - 03:43:57 | 200 | 5.108578ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" 2025/03/24 03:44:05 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing '.'...... [GIN] 2025/03/24 - 03:44:08 | 200 | 2.629058ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:44:19 | 200 | 3.086184ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:44:30 | 200 | 2.663247ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" 2025/03/24 03:44:37 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/anyio/pytest_plugin.py'...... [GIN] 2025/03/24 - 03:44:41 | 200 | 2.42755ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:44:52 | 200 | 2.649265ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" 2025/03/24 03:44:53 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing './.venv/lib/python3.12/site-packages/dashscope/audio/asr'...... [GIN] 2025/03/24 - 03:45:03 | 200 | 2.428865ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" 2025/03/24 03:45:07 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/core/plugin_executor.py'...... [GIN] 2025/03/24 - 03:45:14 | 200 | 2.701835ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:45:25 | 200 | 2.873603ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:45:36 | 200 | 2.509097ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" 2025/03/24 03:45:45 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/invocations/model/__init__.py'...... [GIN] 2025/03/24 - 03:45:47 | 200 | 3.466155ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:45:58 | 200 | 2.575443ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:46:09 | 200 | 2.962394ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:46:20 | 200 | 3.202106ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" 2025/03/24 03:46:21 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/flask/ctx.py'...... [GIN] 2025/03/24 - 03:46:31 | 200 | 2.742065ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" 2025/03/24 03:46:42 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/gevent/testing/errorhandler.py'...... [GIN] 2025/03/24 - 03:46:42 | 200 | 2.984379ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:46:53 | 200 | 5.544734ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks/b08b0fc4-2b14-45fd-b92f-827a2dfbd802" [GIN] 2025/03/24 - 03:46:53 | 200 | 3.310477ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/install/tasks?page=1&page_size=100" [GIN] 2025/03/24 - 03:46:54 | 200 | 14.126311ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/list?page=1&page_size=256" [GIN] 2025/03/24 - 03:46:54 | 200 | 2.958433ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/list?page=1&page_size=256" 2025/03/24 03:46:54 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [256.151ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:46:54 | 200 | 257.376269ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:46:54 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [258.765ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:46:54 | 200 | 259.797302ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:46:54 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [261.099ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:46:54 | 200 | 261.780381ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:46:54 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [268.126ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:46:54 | 200 | 269.029395ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" [GIN] 2025/03/24 - 03:46:54 | 200 | 3.824456ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" [GIN] 2025/03/24 - 03:46:54 | 200 | 3.065721ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:46:55 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [242.056ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:46:55 | 200 | 242.939479ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:46:55 /app/internal/db/pgsql.go:269 SLOW SQL >= 200ms [251.178ms] [rows:0] SELECT * FROM "ai_model_installations" WHERE tenant_id = '0e11f7b9-1553-4733-9c57-5d9a4804056b' LIMIT 256 [GIN] 2025/03/24 - 03:46:55 | 200 | 251.87316ms | 172.18.0.9 | GET "/plugin/0e11f7b9-1553-4733-9c57-5d9a4804056b/management/models?page=1&page_size=256" 2025/03/24 03:47:07 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/gevent/tests/test__issue330.py'...... 2025/03/24 03:47:41 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/greenlet/tests/fail_switch_three_greenlets.py'...... 2025/03/24 03:48:52 /app/internal/db/pgsql.go:39 SLOW SQL >= 200ms [319.308ms] [rows:1] DELETE FROM "install_tasks" WHERE "install_tasks"."id" = 'b08b0fc4-2b14-45fd-b92f-827a2dfbd802' 2025/03/24 03:48:59 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/httpx/_utils.py'...... 2025/03/24 03:51:02 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/_core/tests/examples/cython/setup.py'...... 2025/03/24 03:51:30 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py'...... 2025/03/24 03:52:52 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_isoc.py'...... 2025/03/24 03:53:02 runtime_lifetime.go:42: [INFO]plugin langgenius/tongyi:0.0.14 has exited 2025/03/24 03:53:17 runtime_lifetime.go:40: [INFO]new plugin logged in: langgenius/tongyi:0.0.14 2025/03/24 03:53:17 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/tongyi:0.0.14 2025/03/24 03:54:34 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing '.'...... 2025/03/24 03:55:05 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/anyio/pytest_plugin.py'...... 2025/03/24 03:55:21 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing './.venv/lib/python3.12/site-packages/dashscope/audio/asr'...... 2025/03/24 03:55:34 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/core/plugin_executor.py'...... 2025/03/24 03:56:07 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/invocations/model/__init__.py'...... 2025/03/24 03:56:42 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/flask/ctx.py'...... 2025/03/24 03:57:06 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/gevent/testing/errorhandler.py'...... 2025/03/24 03:57:31 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/gevent/tests/test__issue330.py'...... 2025/03/24 03:58:03 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/greenlet/tests/fail_switch_three_greenlets.py'...... 2025/03/24 03:59:05 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/httpx/_utils.py'...... 2025/03/24 04:01:15 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/_core/tests/examples/cython/setup.py'...... 2025/03/24 04:01:43 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py'...... 2025/03/24 04:03:04 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/numpy/f2py/tests/test_isoc.py'...... 2025/03/24 04:03:29 runtime_lifetime.go:76: [ERROR]init environment failed: failed to pre-compile the plugin: , retry in 30s 2025/03/24 04:03:59 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/tongyi:0.0.14 2025/03/24 04:05:56 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Listing '.'...... 2025/03/24 04:06:42 environment_python.go:275: [INFO]pre-compiling langgenius/tongyi:0.0.14 - Compiling './.venv/lib/python3.12/site-packages/anyio/pytest_plugin.py'...... ``` ### ✔️ Expected Behavior Expected successful installation of Tongyi Qianwen plugin ### ❌ Actual Behavior [ERROR]init environment failed: failed to pre-compile the plugin: , retry in 30s
yindo closed this issue 2026-02-16 10:18:07 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 24, 2025):

Hello, @YDandRX2018! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you've encountered.

I found a similar open issue related to plugin installation failures in Dify. The suggested solutions include:

  1. Increase the Python environment initialization timeout by adding PYTHON_ENV_INIT_TIMEOUT: 320 to your docker-compose.yaml under the plugin_daemon service.
  2. Ensure a stable network connection and verify connectivity to marketplace.dify.ai.
  3. Disable signature verification by adding FORCE_VERIFYING_SIGNATURE=false to your .env file and restarting the Dify service.
  4. If encountering a 'Reached maximum retries (3)' error, download the .difypkg file of the desired plugin from the Dify marketplace and use the local file installation option in the Dify web interface [1].

Additionally, you can try adding PLUGIN_WORKING_PATH=/app/cwd at the end of the /dify/docker/.env file, then restart Docker Compose to see if it resolves the issue [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 24, 2025): <!-- Greeting --> Hello, @YDandRX2018! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you've encountered. <!-- Answer --> I found a similar open issue related to plugin installation failures in Dify. The suggested solutions include: 1. Increase the Python environment initialization timeout by adding `PYTHON_ENV_INIT_TIMEOUT: 320` to your `docker-compose.yaml` under the `plugin_daemon` service. 2. Ensure a stable network connection and verify connectivity to `marketplace.dify.ai`. 3. Disable signature verification by adding `FORCE_VERIFYING_SIGNATURE=false` to your `.env` file and restarting the Dify service. 4. If encountering a 'Reached maximum retries (3)' error, download the `.difypkg` file of the desired plugin from the Dify marketplace and use the local file installation option in the Dify web interface <sup>[[1]](https://github.com/langgenius/dify/issues/15243)</sup>. Additionally, you can try adding `PLUGIN_WORKING_PATH=/app/cwd` at the end of the `/dify/docker/.env` file, then restart Docker Compose to see if it resolves the issue <sup>[[2]](https://github.com/langgenius/dify/issues/14574)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=other)</sup>
Author
Owner

@YDandRX2018 commented on GitHub (Mar 24, 2025):

@do

你好,@YDandRX2018!我在这里帮助您解决任何错误、问题或贡献。让我们一起解决您遇到的问题。

我在 Dify 中发现了一个类似的与插件安装失败相关的未解决的问题。建议的解决方案包括:

  1. 通过在服务下PYTHON_ENV_INIT_TIMEOUT: 320添加来增加 Python 环境初始化超时。docker-compose.yaml``plugin_daemon
  2. 确保网络连接稳定并验证连接性marketplace.dify.ai
  3. FORCE_VERIFYING_SIGNATURE=false通过添加到.env文件并重新启动 Dify 服务来禁用签名验证。
  4. 如果遇到“已达到最大重试次数(3)”错误,请.difypkg从 Dify 市场下载所需插件的文件,并使用 Dify 网页界面[1]中的本地文件安装选项。

此外,您可以尝试PLUGIN_WORKING_PATH=/app/cwd在文件末尾添加/dify/docker/.env,然后重新启动 Docker Compose 以查看它是否能解决问题[2]

要继续与Dosu交谈,请提及@dosu

帮助 Dosu 学习!提供反馈:很好的回应|不相关的答案|不正确的来源|太冗长|幻觉|错误报告|其他

Hello, @YDandRX2018! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you've encountered.

I found a similar open issue related to plugin installation failures in Dify. The suggested solutions include:

  1. Increase the Python environment initialization timeout by adding PYTHON_ENV_INIT_TIMEOUT: 320 to your docker-compose.yaml under the plugin_daemon service.
  2. Ensure a stable network connection and verify connectivity to marketplace.dify.ai.
  3. Disable signature verification by adding FORCE_VERIFYING_SIGNATURE=false to your .env file and restarting the Dify service.
  4. If encountering a 'Reached maximum retries (3)' error, download the .difypkg file of the desired plugin from the Dify marketplace and use the local file installation option in the Dify web interface [1].

Additionally, you can try adding PLUGIN_WORKING_PATH=/app/cwd at the end of the /dify/docker/.env file, then restart Docker Compose to see if it resolves the issue [2].

To continue talking to Dosu, mention @dosu.

Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

I have tried what you said about 1, 2, and 4, but none of them worked

@YDandRX2018 commented on GitHub (Mar 24, 2025): @do > 你好,[@YDandRX2018](https://github.com/YDandRX2018)!我在这里帮助您解决任何错误、问题或贡献。让我们一起解决您遇到的问题。 > > 我在 Dify 中发现了一个类似的与插件安装失败相关的未解决的问题。建议的解决方案包括: > > 1. 通过在服务下`PYTHON_ENV_INIT_TIMEOUT: 320`添加来增加 Python 环境初始化超时。`docker-compose.yaml``plugin_daemon` > 2. 确保网络连接稳定并验证连接性`marketplace.dify.ai`。 > 3. `FORCE_VERIFYING_SIGNATURE=false`通过添加到`.env`文件并重新启动 Dify 服务来禁用签名验证。 > 4. 如果遇到“已达到最大重试次数(3)”错误,请`.difypkg`从 Dify 市场下载所需插件的文件,并使用 Dify 网页界面[[1]](https://github.com/langgenius/dify/issues/15243)中的本地文件安装选项。 > > 此外,您可以尝试`PLUGIN_WORKING_PATH=/app/cwd`在文件末尾添加`/dify/docker/.env`,然后重新启动 Docker Compose 以查看它是否能解决问题[[2]](https://github.com/langgenius/dify/issues/14574)。 > > _要继续与[Dosu](https://dosu.dev)交谈,请提及[@dosu](https://github.com/dosu)。_ > > 帮助 Dosu 学习!提供反馈:[很好的回应](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=great_response)|[不相关的答案](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=irrelevant_answer)|[不正确的来源](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=incorrect_sources)|[太冗长](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=too_verbose)|[幻觉](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=hallucination)|[错误报告](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=bug_report)|[其他](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=other) > Hello, [@YDandRX2018](https://github.com/YDandRX2018)! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you've encountered. > > I found a similar open issue related to plugin installation failures in Dify. The suggested solutions include: > > 1. Increase the Python environment initialization timeout by adding `PYTHON_ENV_INIT_TIMEOUT: 320` to your `docker-compose.yaml` under the `plugin_daemon` service. > 2. Ensure a stable network connection and verify connectivity to `marketplace.dify.ai`. > 3. Disable signature verification by adding `FORCE_VERIFYING_SIGNATURE=false` to your `.env` file and restarting the Dify service. > 4. If encountering a 'Reached maximum retries (3)' error, download the `.difypkg` file of the desired plugin from the Dify marketplace and use the local file installation option in the Dify web interface [[1]](https://github.com/langgenius/dify/issues/15243). > > Additionally, you can try adding `PLUGIN_WORKING_PATH=/app/cwd` at the end of the `/dify/docker/.env` file, then restart Docker Compose to see if it resolves the issue [[2]](https://github.com/langgenius/dify/issues/14574). > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1eb40078-d3fc-440b-84bb-4597da8be07e?feedback_type=other) I have tried what you said about 1, 2, and 4, but none of them worked
Author
Owner

@dosubot[bot] commented on GitHub (Aug 17, 2025):

Hi, @YDandRX2018. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported an error "init environment failed: failed to pre-compile the plugin" on Dify 1.1.0 self-hosted via Docker.
  • Logs indicated slow SQL queries on the "ai_model_installations" table.
  • Suggestions included increasing Python environment timeout, ensuring network stability, disabling signature verification, installing plugins locally, and setting PLUGIN_WORKING_PATH in the Docker environment.
  • You have tried most suggestions except disabling signature verification, but the problem remains unresolved.
  • Further investigation or input from maintainers may be required.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of dify-official-plugins and if you have any new information.
  • If the issue remains important, you can keep the discussion open by commenting; otherwise, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 17, 2025): Hi, @YDandRX2018. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported an error "init environment failed: failed to pre-compile the plugin" on Dify 1.1.0 self-hosted via Docker. - Logs indicated slow SQL queries on the "ai_model_installations" table. - Suggestions included increasing Python environment timeout, ensuring network stability, disabling signature verification, installing plugins locally, and setting PLUGIN_WORKING_PATH in the Docker environment. - You have tried most suggestions except disabling signature verification, but the problem remains unresolved. - Further investigation or input from maintainers may be required. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of dify-official-plugins and if you have any new information. - If the issue remains important, you can keep the discussion open by commenting; otherwise, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#114