Dify Daemon Gets Stuck Lanuching Local Plugins on Failure #138

Closed
opened 2026-02-16 00:20:03 -05:00 by yindo · 0 comments
Owner

Originally created by @nht1206 on GitHub (Jun 9, 2025).

Self Checks

To make sure we get to you in time, please check the following :)

  • 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."

Versions

  1. dify-plugin-daemon v0.1.1
  2. dify-api v1.4.1

Describe the bug
When launching multiple local plugins, if one plugin encounters an error during its launch process, all subsequent plugins will fail to launch.
The daemon gets stuck on the broken plugin, preventing any further plugin initialization.

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to launch a local plugin that is corrupted or invalid
  2. Observe that the plugin launch process appears to freeze

Expected behavior
When an error during the launch of a new local plugin, the daemon should handle the error and continue its operation withou getting stuck.

Screenshots
N/A

Additional context

2025/06/05 03:35:48 pool.go:32: [INFO]init routine pool, size: 10000
2025/06/05 03:35:49 init.go:99: [INFO]dify plugin db initialized
2025/06/05 03:35:49 manager.go:176: [INFO]start plugin manager daemon...
2025/06/05 03:35:49 init.go:19: [INFO]Persistence initialized
2025/06/05 03:35:49 watcher.go:16: [INFO]start to handle new plugins in path: plugin
2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: antv/visualization:0.1.3
2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin antv/visualization:0.1.3
2025/06/05 03:35:49 run.go:147: [INFO]plugin antv/visualization:0.1.3 started
[gnet] 2025-06-05T03:35:49.104294717Z   INFO    logging/logger.go:256   Launching gnet with 8 event-loops, listening on: tcp://0.0.0.0:5003
2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: bowenliang123/md_exporter:1.5.0
2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin bowenliang123/md_exporter:1.5.0
2025/06/05 03:35:49 run.go:147: [INFO]plugin bowenliang123/md_exporter:1.5.0 started
2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: hjlarry/knowledge:0.0.1
2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin hjlarry/knowledge:0.0.1
2025/06/05 03:35:49 run.go:147: [INFO]plugin hjlarry/knowledge:0.0.1 started
2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: junjiem/knowledge_extractor:0.0.2
2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin junjiem/knowledge_extractor:0.0.2
2025/06/05 03:35:49 run.go:147: [INFO]plugin junjiem/knowledge_extractor:0.0.2 started
2025/06/05 03:35:49 cluster_lifetime.go:113: [INFO]current node has become the master of the cluster
2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: langgenius/agent:0.0.15
2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin langgenius/agent:0.0.15
2025/06/05 03:35:49 run.go:147: [INFO]plugin langgenius/agent:0.0.15 started
2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: langgenius/arxiv:0.0.2
2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin langgenius/arxiv:0.0.2
2025/06/05 03:35:49 run.go:147: [INFO]plugin langgenius/arxiv:0.0.2 started
2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: langgenius/azure_ai_studio:0.0.3
2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin langgenius/azure_ai_studio:0.0.3
2025/06/05 03:35:50 run.go:147: [INFO]plugin langgenius/azure_ai_studio:0.0.3 started
2025/06/05 03:35:50 full_duplex.go:27: [INFO]new plugin logged in: langgenius/azure_openai:0.0.16
2025/06/05 03:35:50 full_duplex.go:59: [INFO]init environment for plugin langgenius/azure_openai:0.0.16
2025/06/05 03:35:50 run.go:147: [INFO]plugin langgenius/azure_openai:0.0.16 started
2025/06/05 03:35:50 full_duplex.go:27: [INFO]new plugin logged in: langgenius/azuredalle:0.0.3
2025/06/05 03:35:50 full_duplex.go:59: [INFO]init environment for plugin langgenius/azuredalle:0.0.3
2025/06/05 03:35:50 run.go:147: [INFO]plugin langgenius/azuredalle:0.0.3 started
2025/06/05 03:35:50 full_duplex.go:27: [INFO]new plugin logged in: langgenius/bing:0.0.4
2025/06/05 03:35:50 full_duplex.go:59: [INFO]init environment for plugin langgenius/bing:0.0.4
2025/06/05 03:35:51 run.go:147: [INFO]plugin langgenius/bing:0.0.4 started
2025/06/05 03:35:51 full_duplex.go:27: [INFO]new plugin logged in: langgenius/devdocs:0.0.2
2025/06/05 03:35:51 full_duplex.go:59: [INFO]init environment for plugin langgenius/devdocs:0.0.2
2025/06/05 03:35:51 run.go:147: [INFO]plugin langgenius/devdocs:0.0.2 started
2025/06/05 03:35:51 full_duplex.go:27: [INFO]new plugin logged in: langgenius/duckduckgo:0.0.5
2025/06/05 03:35:51 full_duplex.go:59: [INFO]init environment for plugin langgenius/duckduckgo:0.0.5
2025/06/05 03:35:52 run.go:147: [INFO]plugin langgenius/duckduckgo:0.0.5 started
2025/06/05 03:35:52 full_duplex.go:27: [INFO]new plugin logged in: langgenius/google_translate:0.0.2
2025/06/05 03:35:52 full_duplex.go:59: [INFO]init environment for plugin langgenius/google_translate:0.0.2
2025/06/05 03:35:53 run.go:147: [INFO]plugin langgenius/google_translate:0.0.2 started
2025/06/05 03:35:53 full_duplex.go:27: [INFO]new plugin logged in: langgenius/json_process:0.0.2
2025/06/05 03:35:53 full_duplex.go:59: [INFO]init environment for plugin langgenius/json_process:0.0.2
2025/06/05 03:35:53 run.go:147: [INFO]plugin langgenius/json_process:0.0.2 started
2025/06/05 03:35:53 full_duplex.go:27: [INFO]new plugin logged in: langgenius/maths:0.0.3
2025/06/05 03:35:53 full_duplex.go:59: [INFO]init environment for plugin langgenius/maths:0.0.3
2025/06/05 03:35:54 run.go:147: [INFO]plugin langgenius/maths:0.0.3 started
2025/06/05 03:35:54 full_duplex.go:27: [INFO]new plugin logged in: langgenius/notion:0.0.1
2025/06/05 03:35:54 full_duplex.go:59: [INFO]init environment for plugin langgenius/notion:0.0.1
2025/06/05 03:35:54 watcher.go:80: [ERROR]launch local plugin failed: difypkg: not a valid difypkg file
create plugin decoder error
2025/06/05 03:35:54 run.go:147: [INFO]plugin langgenius/notion:0.0.1 started
2025/06/05 03:35:58 stdio.go:182: [INFO]plugin hjlarry/knowledge:0.0.1: Installed tool: knowledge
2025/06/05 03:35:59 node.go:213: [INFO]node d710db6d-3380-42fc-8764-80693dbe7867 has been removed from the cluster due to being disconnected
2025/06/05 03:35:59 stdio.go:182: [INFO]plugin antv/visualization:0.1.3: Installed tool: visualization
2025/06/05 03:35:59 stdio.go:182: [INFO]plugin junjiem/knowledge_extractor:0.0.2: Installed tool: knowledge_extractor
2025/06/05 03:36:00 stdio.go:182: [INFO]plugin langgenius/agent:0.0.15: Installed agent: agent
2025/06/05 03:36:02 stdio.go:182: [INFO]plugin langgenius/arxiv:0.0.2: Installed tool: arxiv
2025/06/05 03:36:02 stdio.go:182: [INFO]plugin langgenius/azure_ai_studio:0.0.3: Installed model: azure_ai_studio
2025/06/05 03:36:03 stdio.go:182: [INFO]plugin langgenius/bing:0.0.4: Installed tool: bing
2025/06/05 03:36:04 stdio.go:182: [INFO]plugin langgenius/devdocs:0.0.2: Installed tool: devdocs
2025/06/05 03:36:04 stdio.go:182: [INFO]plugin langgenius/duckduckgo:0.0.5: Installed tool: duckduckgo
2025/06/05 03:36:04 stdio.go:182: [INFO]plugin langgenius/google_translate:0.0.2: Installed tool: google_translate
2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/json_process:0.0.2: Installed tool: json_process
2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/notion:0.0.1: Installed tool: notion
2025/06/05 03:36:05 stdio.go:182: [INFO]plugin bowenliang123/md_exporter:1.5.0: Installed tool: md_exporter
2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/azuredalle:0.0.3: Installed tool: azuredalle
2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/azure_openai:0.0.16: Installed model: azure_openai
2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/maths:0.0.3: Installed tool: maths

I don't know what might cause a .difypkg file to become incorrectlt formated, but regardless of the cause, the plugin launch process should continue its operation for other plugins.

Originally created by @nht1206 on GitHub (Jun 9, 2025). **Self Checks** To make sure we get to you in time, please check the following :) - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify-plugin-daemon/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." **Versions** 1. dify-plugin-daemon v0.1.1 2. dify-api v1.4.1 **Describe the bug** When launching multiple local plugins, if one plugin encounters an error during its launch process, all subsequent plugins will fail to launch. The daemon gets stuck on the broken plugin, preventing any further plugin initialization. **To Reproduce** Steps to reproduce the behavior: 1. Attempt to launch a local plugin that is corrupted or invalid 2. Observe that the plugin launch process appears to freeze **Expected behavior** When an error during the launch of a new local plugin, the daemon should handle the error and continue its operation withou getting stuck. **Screenshots** N/A **Additional context** ``` 2025/06/05 03:35:48 pool.go:32: [INFO]init routine pool, size: 10000 2025/06/05 03:35:49 init.go:99: [INFO]dify plugin db initialized 2025/06/05 03:35:49 manager.go:176: [INFO]start plugin manager daemon... 2025/06/05 03:35:49 init.go:19: [INFO]Persistence initialized 2025/06/05 03:35:49 watcher.go:16: [INFO]start to handle new plugins in path: plugin 2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: antv/visualization:0.1.3 2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin antv/visualization:0.1.3 2025/06/05 03:35:49 run.go:147: [INFO]plugin antv/visualization:0.1.3 started [gnet] 2025-06-05T03:35:49.104294717Z INFO logging/logger.go:256 Launching gnet with 8 event-loops, listening on: tcp://0.0.0.0:5003 2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: bowenliang123/md_exporter:1.5.0 2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin bowenliang123/md_exporter:1.5.0 2025/06/05 03:35:49 run.go:147: [INFO]plugin bowenliang123/md_exporter:1.5.0 started 2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: hjlarry/knowledge:0.0.1 2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin hjlarry/knowledge:0.0.1 2025/06/05 03:35:49 run.go:147: [INFO]plugin hjlarry/knowledge:0.0.1 started 2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: junjiem/knowledge_extractor:0.0.2 2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin junjiem/knowledge_extractor:0.0.2 2025/06/05 03:35:49 run.go:147: [INFO]plugin junjiem/knowledge_extractor:0.0.2 started 2025/06/05 03:35:49 cluster_lifetime.go:113: [INFO]current node has become the master of the cluster 2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: langgenius/agent:0.0.15 2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin langgenius/agent:0.0.15 2025/06/05 03:35:49 run.go:147: [INFO]plugin langgenius/agent:0.0.15 started 2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: langgenius/arxiv:0.0.2 2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin langgenius/arxiv:0.0.2 2025/06/05 03:35:49 run.go:147: [INFO]plugin langgenius/arxiv:0.0.2 started 2025/06/05 03:35:49 full_duplex.go:27: [INFO]new plugin logged in: langgenius/azure_ai_studio:0.0.3 2025/06/05 03:35:49 full_duplex.go:59: [INFO]init environment for plugin langgenius/azure_ai_studio:0.0.3 2025/06/05 03:35:50 run.go:147: [INFO]plugin langgenius/azure_ai_studio:0.0.3 started 2025/06/05 03:35:50 full_duplex.go:27: [INFO]new plugin logged in: langgenius/azure_openai:0.0.16 2025/06/05 03:35:50 full_duplex.go:59: [INFO]init environment for plugin langgenius/azure_openai:0.0.16 2025/06/05 03:35:50 run.go:147: [INFO]plugin langgenius/azure_openai:0.0.16 started 2025/06/05 03:35:50 full_duplex.go:27: [INFO]new plugin logged in: langgenius/azuredalle:0.0.3 2025/06/05 03:35:50 full_duplex.go:59: [INFO]init environment for plugin langgenius/azuredalle:0.0.3 2025/06/05 03:35:50 run.go:147: [INFO]plugin langgenius/azuredalle:0.0.3 started 2025/06/05 03:35:50 full_duplex.go:27: [INFO]new plugin logged in: langgenius/bing:0.0.4 2025/06/05 03:35:50 full_duplex.go:59: [INFO]init environment for plugin langgenius/bing:0.0.4 2025/06/05 03:35:51 run.go:147: [INFO]plugin langgenius/bing:0.0.4 started 2025/06/05 03:35:51 full_duplex.go:27: [INFO]new plugin logged in: langgenius/devdocs:0.0.2 2025/06/05 03:35:51 full_duplex.go:59: [INFO]init environment for plugin langgenius/devdocs:0.0.2 2025/06/05 03:35:51 run.go:147: [INFO]plugin langgenius/devdocs:0.0.2 started 2025/06/05 03:35:51 full_duplex.go:27: [INFO]new plugin logged in: langgenius/duckduckgo:0.0.5 2025/06/05 03:35:51 full_duplex.go:59: [INFO]init environment for plugin langgenius/duckduckgo:0.0.5 2025/06/05 03:35:52 run.go:147: [INFO]plugin langgenius/duckduckgo:0.0.5 started 2025/06/05 03:35:52 full_duplex.go:27: [INFO]new plugin logged in: langgenius/google_translate:0.0.2 2025/06/05 03:35:52 full_duplex.go:59: [INFO]init environment for plugin langgenius/google_translate:0.0.2 2025/06/05 03:35:53 run.go:147: [INFO]plugin langgenius/google_translate:0.0.2 started 2025/06/05 03:35:53 full_duplex.go:27: [INFO]new plugin logged in: langgenius/json_process:0.0.2 2025/06/05 03:35:53 full_duplex.go:59: [INFO]init environment for plugin langgenius/json_process:0.0.2 2025/06/05 03:35:53 run.go:147: [INFO]plugin langgenius/json_process:0.0.2 started 2025/06/05 03:35:53 full_duplex.go:27: [INFO]new plugin logged in: langgenius/maths:0.0.3 2025/06/05 03:35:53 full_duplex.go:59: [INFO]init environment for plugin langgenius/maths:0.0.3 2025/06/05 03:35:54 run.go:147: [INFO]plugin langgenius/maths:0.0.3 started 2025/06/05 03:35:54 full_duplex.go:27: [INFO]new plugin logged in: langgenius/notion:0.0.1 2025/06/05 03:35:54 full_duplex.go:59: [INFO]init environment for plugin langgenius/notion:0.0.1 2025/06/05 03:35:54 watcher.go:80: [ERROR]launch local plugin failed: difypkg: not a valid difypkg file create plugin decoder error 2025/06/05 03:35:54 run.go:147: [INFO]plugin langgenius/notion:0.0.1 started 2025/06/05 03:35:58 stdio.go:182: [INFO]plugin hjlarry/knowledge:0.0.1: Installed tool: knowledge 2025/06/05 03:35:59 node.go:213: [INFO]node d710db6d-3380-42fc-8764-80693dbe7867 has been removed from the cluster due to being disconnected 2025/06/05 03:35:59 stdio.go:182: [INFO]plugin antv/visualization:0.1.3: Installed tool: visualization 2025/06/05 03:35:59 stdio.go:182: [INFO]plugin junjiem/knowledge_extractor:0.0.2: Installed tool: knowledge_extractor 2025/06/05 03:36:00 stdio.go:182: [INFO]plugin langgenius/agent:0.0.15: Installed agent: agent 2025/06/05 03:36:02 stdio.go:182: [INFO]plugin langgenius/arxiv:0.0.2: Installed tool: arxiv 2025/06/05 03:36:02 stdio.go:182: [INFO]plugin langgenius/azure_ai_studio:0.0.3: Installed model: azure_ai_studio 2025/06/05 03:36:03 stdio.go:182: [INFO]plugin langgenius/bing:0.0.4: Installed tool: bing 2025/06/05 03:36:04 stdio.go:182: [INFO]plugin langgenius/devdocs:0.0.2: Installed tool: devdocs 2025/06/05 03:36:04 stdio.go:182: [INFO]plugin langgenius/duckduckgo:0.0.5: Installed tool: duckduckgo 2025/06/05 03:36:04 stdio.go:182: [INFO]plugin langgenius/google_translate:0.0.2: Installed tool: google_translate 2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/json_process:0.0.2: Installed tool: json_process 2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/notion:0.0.1: Installed tool: notion 2025/06/05 03:36:05 stdio.go:182: [INFO]plugin bowenliang123/md_exporter:1.5.0: Installed tool: md_exporter 2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/azuredalle:0.0.3: Installed tool: azuredalle 2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/azure_openai:0.0.16: Installed model: azure_openai 2025/06/05 03:36:05 stdio.go:182: [INFO]plugin langgenius/maths:0.0.3: Installed tool: maths ``` I don't know what might cause a `.difypkg` file to become incorrectlt formated, but regardless of the cause, the plugin launch process should continue its operation for other plugins.
yindo closed this issue 2026-02-16 00:20:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#138