daemon always load old plugins #144

Open
opened 2026-02-16 00:20:06 -05:00 by yindo · 5 comments
Owner

Originally created by @sofs2005 on GitHub (Jun 18, 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.4.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

check daemon log

✔️ Expected Behavior

daemon should only load the plugins I'm currently using

Actual Behavior

daemon loaded every plugin I have ever installed, even those I have uninstalled and updated:
as below shows, many plugins I have unstalled from system, and many have updated to new version, but it still load them

ull_duplex.go:59: [INFO]init environment for plugin langgenius/siliconflow:0.0.6
2025/06/19 00:49:48 stdio.go:182: [INFO]plugin langgenius/feishu_wiki:0.0.1: Installed tool: feishu_wiki
2025/06/19 00:49:49 run.go:147: [INFO]plugin langgenius/siliconflow:0.0.6 started
2025/06/19 00:49:49 full_duplex.go:27: [INFO]new plugin logged in: langgenius/siliconflow_tool:0.0.4
2025/06/19 00:49:49 full_duplex.go:59: [INFO]init environment for plugin langgenius/siliconflow_tool:0.0.4
2025/06/19 00:49:50 stdio.go:182: [INFO]plugin langgenius/fishaudio:0.0.3: Installed model: fishaudio
2025/06/19 00:49:51 run.go:147: [INFO]plugin langgenius/siliconflow_tool:0.0.4 started
2025/06/19 00:49:51 stdio.go:182: [INFO]plugin langgenius/gaode:0.0.2: Installed tool: gaode
2025/06/19 00:49:52 full_duplex.go:27: [INFO]new plugin logged in: langgenius/tavily:0.0.2
2025/06/19 00:49:52 full_duplex.go:59: [INFO]init environment for plugin langgenius/tavily:0.0.2
2025/06/19 00:49:53 run.go:147: [INFO]plugin langgenius/tavily:0.0.2 started
2025/06/19 00:49:53 full_duplex.go:27: [INFO]new plugin logged in: langgenius/tavily:0.0.5
2025/06/19 00:49:53 full_duplex.go:59: [INFO]init environment for plugin langgenius/tavily:0.0.5
2025/06/19 00:49:54 stdio.go:182: [INFO]plugin langgenius/getimgai:0.0.2: Installed tool: getimgai
2025/06/19 00:49:54 run.go:147: [INFO]plugin langgenius/tavily:0.0.5 started
2025/06/19 00:49:55 full_duplex.go:27: [INFO]new plugin logged in: langgenius/wikipedia:0.0.3
2025/06/19 00:49:55 full_duplex.go:59: [INFO]init environment for plugin langgenius/wikipedia:0.0.3
2025/06/19 00:49:55 stdio.go:182: [INFO]plugin langgenius/gitee_ai:0.0.2: Installed tool: gitee_ai
2025/06/19 00:49:56 run.go:147: [INFO]plugin langgenius/wikipedia:0.0.3 started
2025/06/19 00:49:56 full_duplex.go:27: [INFO]new plugin logged in: langgenius/yahoo:0.0.2
2025/06/19 00:49:56 full_duplex.go:59: [INFO]init environment for plugin langgenius/yahoo:0.0.2
2025/06/19 00:49:57 run.go:147: [INFO]plugin langgenius/yahoo:0.0.2 started
2025/06/19 00:49:57 full_duplex.go:27: [INFO]new plugin logged in: langgenius/zhipuai:0.0.4
2025/06/19 00:49:57 full_duplex.go:59: [INFO]init environment for plugin langgenius/zhipuai:0.0.4
2025/06/19 00:49:58 stdio.go:182: [INFO]plugin langgenius/google:0.0.8: Installed tool: google
2025/06/19 00:49:58 run.go:147: [INFO]plugin langgenius/zhipuai:0.0.4 started
2025/06/19 00:49:59 stdio.go:182: [INFO]plugin langgenius/groq:0.0.4: Installed model: groq
2025/06/19 00:50:00 full_duplex.go:27: [INFO]new plugin logged in: svcvit/artifacts:0.0.3
2025/06/19 00:50:00 full_duplex.go:59: [INFO]init environment for plugin svcvit/artifacts:0.0.3
2025/06/19 00:50:00 environment_python.go:363: [ERROR]failed to get the version of the plugin sdk: failed to find the version of the plugin sdk
2025/06/19 00:50:00 run.go:147: [INFO]plugin svcvit/artifacts:0.0.3 started
2025/06/19 00:50:01 stdio.go:182: [INFO]plugin langgenius/groq:0.0.6: Installed model: groq
2025/06/19 00:50:02 stdio.go:182: [INFO]plugin langgenius/gemini:0.1.6: Installed model: google
2025/06/19 00:50:05 stdio.go:182: [INFO]plugin langgenius/jina_tool:0.0.3: Installed tool: jina
2025/06/19 00:50:06 stdio.go:182: [INFO]plugin langgenius/jina_tool:0.0.7: Installed tool: jina
2025/06/19 00:50:06 stdio.go:182: [INFO]plugin langgenius/moonshot:0.0.3: Installed model: moonshot
2025/06/19 00:50:06 stdio.go:182: [INFO]plugin langgenius/gemini:0.0.5: Installed model: google
2025/06/19 00:50:07 stdio.go:182: [INFO]plugin langgenius/mistralai:0.0.2: Installed model: mistralai
2025/06/19 00:50:07 stdio.go:182: [INFO]plugin langgenius/maths:0.0.3: Installed tool: maths
2025/06/19 00:50:08 stdio.go:182: [INFO]plugin langgenius/nvidia:0.0.2: Installed model: nvidia
2025/06/19 00:50:08 stdio.go:182: [INFO]plugin langgenius/openai_api_compatible:0.0.13: Installed model: openai_api_compatible
2025/06/19 00:50:10 stdio.go:182: [INFO]plugin langgenius/openai_api_compatible:0.0.5: Installed model: openai_api_compatible
2025/06/19 00:50:11 stdio.go:182: [INFO]plugin langgenius/openai_api_compatible:0.0.7: Installed model: openai_api_compatible

Originally created by @sofs2005 on GitHub (Jun 18, 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.4.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce check daemon log ### ✔️ Expected Behavior daemon should only load the plugins I'm currently using ### ❌ Actual Behavior daemon loaded every plugin I have ever installed, even those I have uninstalled and updated: as below shows, many plugins I have unstalled from system, and many have updated to new version, but it still load them ull_duplex.go:59: [INFO]init environment for plugin langgenius/siliconflow:0.0.6 2025/06/19 00:49:48 stdio.go:182: [INFO]plugin langgenius/feishu_wiki:0.0.1: Installed tool: feishu_wiki 2025/06/19 00:49:49 run.go:147: [INFO]plugin langgenius/siliconflow:0.0.6 started 2025/06/19 00:49:49 full_duplex.go:27: [INFO]new plugin logged in: langgenius/siliconflow_tool:0.0.4 2025/06/19 00:49:49 full_duplex.go:59: [INFO]init environment for plugin langgenius/siliconflow_tool:0.0.4 2025/06/19 00:49:50 stdio.go:182: [INFO]plugin langgenius/fishaudio:0.0.3: Installed model: fishaudio 2025/06/19 00:49:51 run.go:147: [INFO]plugin langgenius/siliconflow_tool:0.0.4 started 2025/06/19 00:49:51 stdio.go:182: [INFO]plugin langgenius/gaode:0.0.2: Installed tool: gaode 2025/06/19 00:49:52 full_duplex.go:27: [INFO]new plugin logged in: langgenius/tavily:0.0.2 2025/06/19 00:49:52 full_duplex.go:59: [INFO]init environment for plugin langgenius/tavily:0.0.2 2025/06/19 00:49:53 run.go:147: [INFO]plugin langgenius/tavily:0.0.2 started 2025/06/19 00:49:53 full_duplex.go:27: [INFO]new plugin logged in: langgenius/tavily:0.0.5 2025/06/19 00:49:53 full_duplex.go:59: [INFO]init environment for plugin langgenius/tavily:0.0.5 2025/06/19 00:49:54 stdio.go:182: [INFO]plugin langgenius/getimgai:0.0.2: Installed tool: getimgai 2025/06/19 00:49:54 run.go:147: [INFO]plugin langgenius/tavily:0.0.5 started 2025/06/19 00:49:55 full_duplex.go:27: [INFO]new plugin logged in: langgenius/wikipedia:0.0.3 2025/06/19 00:49:55 full_duplex.go:59: [INFO]init environment for plugin langgenius/wikipedia:0.0.3 2025/06/19 00:49:55 stdio.go:182: [INFO]plugin langgenius/gitee_ai:0.0.2: Installed tool: gitee_ai 2025/06/19 00:49:56 run.go:147: [INFO]plugin langgenius/wikipedia:0.0.3 started 2025/06/19 00:49:56 full_duplex.go:27: [INFO]new plugin logged in: langgenius/yahoo:0.0.2 2025/06/19 00:49:56 full_duplex.go:59: [INFO]init environment for plugin langgenius/yahoo:0.0.2 2025/06/19 00:49:57 run.go:147: [INFO]plugin langgenius/yahoo:0.0.2 started 2025/06/19 00:49:57 full_duplex.go:27: [INFO]new plugin logged in: langgenius/zhipuai:0.0.4 2025/06/19 00:49:57 full_duplex.go:59: [INFO]init environment for plugin langgenius/zhipuai:0.0.4 2025/06/19 00:49:58 stdio.go:182: [INFO]plugin langgenius/google:0.0.8: Installed tool: google 2025/06/19 00:49:58 run.go:147: [INFO]plugin langgenius/zhipuai:0.0.4 started 2025/06/19 00:49:59 stdio.go:182: [INFO]plugin langgenius/groq:0.0.4: Installed model: groq 2025/06/19 00:50:00 full_duplex.go:27: [INFO]new plugin logged in: svcvit/artifacts:0.0.3 2025/06/19 00:50:00 full_duplex.go:59: [INFO]init environment for plugin svcvit/artifacts:0.0.3 2025/06/19 00:50:00 environment_python.go:363: [ERROR]failed to get the version of the plugin sdk: failed to find the version of the plugin sdk 2025/06/19 00:50:00 run.go:147: [INFO]plugin svcvit/artifacts:0.0.3 started 2025/06/19 00:50:01 stdio.go:182: [INFO]plugin langgenius/groq:0.0.6: Installed model: groq 2025/06/19 00:50:02 stdio.go:182: [INFO]plugin langgenius/gemini:0.1.6: Installed model: google 2025/06/19 00:50:05 stdio.go:182: [INFO]plugin langgenius/jina_tool:0.0.3: Installed tool: jina 2025/06/19 00:50:06 stdio.go:182: [INFO]plugin langgenius/jina_tool:0.0.7: Installed tool: jina 2025/06/19 00:50:06 stdio.go:182: [INFO]plugin langgenius/moonshot:0.0.3: Installed model: moonshot 2025/06/19 00:50:06 stdio.go:182: [INFO]plugin langgenius/gemini:0.0.5: Installed model: google 2025/06/19 00:50:07 stdio.go:182: [INFO]plugin langgenius/mistralai:0.0.2: Installed model: mistralai 2025/06/19 00:50:07 stdio.go:182: [INFO]plugin langgenius/maths:0.0.3: Installed tool: maths 2025/06/19 00:50:08 stdio.go:182: [INFO]plugin langgenius/nvidia:0.0.2: Installed model: nvidia 2025/06/19 00:50:08 stdio.go:182: [INFO]plugin langgenius/openai_api_compatible:0.0.13: Installed model: openai_api_compatible 2025/06/19 00:50:10 stdio.go:182: [INFO]plugin langgenius/openai_api_compatible:0.0.5: Installed model: openai_api_compatible 2025/06/19 00:50:11 stdio.go:182: [INFO]plugin langgenius/openai_api_compatible:0.0.7: Installed model: openai_api_compatible
Author
Owner

@dosubot[bot] commented on GitHub (Jun 18, 2025):

This issue is likely caused by the plugin daemon not fully cleaning up old plugin records or files when you uninstall or update plugins. As a result, the daemon continues to load every plugin it finds in its persistent storage, regardless of their current status. This is a known behavior in self-hosted Docker setups and is not handled by the main Dify backend, but by the separate plugin daemon service.

To resolve this, you should manually clean up both the plugin database and the plugin directories used by the daemon:

  1. Clear plugin database entries:
    Connect to your dify_plugin database and run:

    delete from plugin_installations where plugin_unique_identifier is not null;
    delete from plugin_declarations where plugin_unique_identifier is not null;
    delete from ai_model_installations where plugin_unique_identifier is not null;
    delete from plugins where plugin_unique_identifier is not null;
    delete from install_tasks;
    

    Reference

  2. Remove plugin files:
    Delete the contents of these directories in your plugin daemon's storage path (typically /app/storage/cwd/plugins/):

    • plugin
    • plugin-working
    • persistence
    • plugin-root
      Reference
  3. Restart the plugin daemon service to ensure it reloads only the current plugins.

  4. Make sure you are using dify-plugin-sdk version 0.2.4 or later for plugin development and management.

If you continue to see old plugins being loaded after this cleanup, it may indicate a bug or missing feature in the plugin daemon's state management. Upgrading to the latest Dify version is also recommended to avoid related issues.

Let me know if you need the exact Docker commands for these steps.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 18, 2025): <!-- Answer --> This issue is likely caused by the plugin daemon not fully cleaning up old plugin records or files when you uninstall or update plugins. As a result, the daemon continues to load every plugin it finds in its persistent storage, regardless of their current status. This is a known behavior in self-hosted Docker setups and is not handled by the main Dify backend, but by the separate plugin daemon service. To resolve this, you should manually clean up both the plugin database and the plugin directories used by the daemon: 1. **Clear plugin database entries**: Connect to your `dify_plugin` database and run: ```sql delete from plugin_installations where plugin_unique_identifier is not null; delete from plugin_declarations where plugin_unique_identifier is not null; delete from ai_model_installations where plugin_unique_identifier is not null; delete from plugins where plugin_unique_identifier is not null; delete from install_tasks; ``` [Reference](https://github.com/langgenius/dify/issues/19639) 2. **Remove plugin files**: Delete the contents of these directories in your plugin daemon's storage path (typically `/app/storage/cwd/plugins/`): - `plugin` - `plugin-working` - `persistence` - `plugin-root` [Reference](https://github.com/langgenius/dify/issues/19086) 3. **Restart the plugin daemon service** to ensure it reloads only the current plugins. 4. Make sure you are using `dify-plugin-sdk` version 0.2.4 or later for plugin development and management. If you continue to see old plugins being loaded after this cleanup, it may indicate a bug or missing feature in the plugin daemon's state management. Upgrading to the latest Dify version is also recommended to avoid related issues. Let me know if you need the exact Docker commands for these steps. <!-- 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/119822ee-8589-4de5-bbc0-525b42bf3dfd?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/119822ee-8589-4de5-bbc0-525b42bf3dfd?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/119822ee-8589-4de5-bbc0-525b42bf3dfd?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/119822ee-8589-4de5-bbc0-525b42bf3dfd?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/119822ee-8589-4de5-bbc0-525b42bf3dfd?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/119822ee-8589-4de5-bbc0-525b42bf3dfd?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/119822ee-8589-4de5-bbc0-525b42bf3dfd?feedback_type=other)</sup>&nbsp;&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/21195)
Author
Owner

@sofs2005 commented on GitHub (Jun 30, 2025):

Very good, I followed your instructions and deleted all the plugins on my system. Do you think clearing plugins is your solution? So I have to reinstall them one by one?? What kind of design is this?? Can't you just clean up old data?
Now I have no plugins left and can't install any, so I have to restore the system. Thanks a lot.@dosu.

@sofs2005 commented on GitHub (Jun 30, 2025): Very good, I followed your instructions and deleted all the plugins on my system. Do you think clearing plugins is your solution? So I have to reinstall them one by one?? What kind of design is this?? Can't you just clean up old data? Now I have no plugins left and can't install any, so I have to restore the system. Thanks a lot.[@dosu](https://go.dosu.dev/dosubot).
Author
Owner

@sofs2005 commented on GitHub (Jul 3, 2025):

you should give out a full solution

@sofs2005 commented on GitHub (Jul 3, 2025): you should give out a full solution
Author
Owner

@xiaomeixw commented on GitHub (Aug 12, 2025):

Very good, I followed your instructions and deleted all the plugins on my system. Do you think clearing plugins is your solution? So I have to reinstall them one by one?? What kind of design is this?? Can't you just clean up old data? Now I have no plugins left and can't install any, so I have to restore the system. Thanks a lot.@dosu.

He is a very foolish robot. Why would you listen to him?

@xiaomeixw commented on GitHub (Aug 12, 2025): > Very good, I followed your instructions and deleted all the plugins on my system. Do you think clearing plugins is your solution? So I have to reinstall them one by one?? What kind of design is this?? Can't you just clean up old data? Now I have no plugins left and can't install any, so I have to restore the system. Thanks a lot.[@dosu](https://go.dosu.dev/dosubot). He is a very foolish robot. Why would you listen to him?
Author
Owner

@xiaomeixw commented on GitHub (Aug 12, 2025):

Go to the cwd directory and delete the old version.

@xiaomeixw commented on GitHub (Aug 12, 2025): Go to the cwd directory and delete the old version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#144