debug plugin error:no available node, plugin runtime not found #232

Open
opened 2026-02-16 01:15:03 -05:00 by yindo · 3 comments
Owner

Originally created by @gaoding-hailang on GitHub (Jan 23, 2026).

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 0.5.2
  2. dify-api 1.11.2

Describe the bug
Environment:

  • Deployment: Kubernetes (K8s) cluster
  • Network: Plugin service port forwarded via SLB (Server Load Balancer)
  • Replicas: 1 pod (works) / multiple pods (issue occurs)
  • Dify-plugin-daemon Version: Version after v0.5.2 (problematic); v0.4.2 (works fine)
  • Code Change: No code modifications made between versions

Description
I have identified a potential bug related to plugin debugging in a Kubernetes cluster deployment with SLB port forwarding.
The issue manifests as follows:

  • Single-pod scenario: The plugin service runs with only one pod, and there is no "plugin not found" error; all requests work as expected.
  • Cluster scenario (multiple pods): When the plugin service is scaled to multiple pods in K8s (with SLB forwarding the plugin installation port), most requests return a "plugin not found" error. However, a small number of requests will occasionally succeed.

Suspected Root Cause

  • My hypothesis is that during the plugin registration process, the plugin establishes a TCP connection with a specific pod in the K8s cluster. The connection information (or related registration metadata) is not synchronized across other pods in the cluster. Since SLB distributes requests across all pods, only the pod that holds the TCP connection can handle the plugin request successfully, while other pods fail to recognize the plugin and throw errors.

Key Observation

  • This issue does NOT exist in version v0.4.2. When I roll back the plugin service to v0.4.2 (with exactly the same K8s/SLB configuration and no code changes), the "plugin not found" error disappears completely in both single-pod and multi-pod cluster modes.
  • Expected Behavior
  • Plugin registration and connection information should be synchronized across all pods in the K8s cluster, ensuring consistent plugin availability for all requests regardless of which pod the SLB routes the traffic to.

Steps to Reproduce

  • Deploy dify-plugin-daemon (version > v0.4.2) to a K8s cluster with multiple replicas (≥2 pods).
  • Configure SLB to forward the plugin installation port to the K8s service of the plugin daemon.
  • Send consecutive requests to invoke/install the plugin via the SLB endpoint.
  • Observe that most requests fail with "plugin not found", while a few requests succeed randomly (likely routed to the pod with the established TCP connection).
  • Roll back the deployment to v0.4.2 (same K8s/SLB configuration, no code changes).
  • Verify that all requests succeed consistently in both single-pod and multi-pod modes.

Additional Context

  • The plugin service is exposed via a K8s Service (ClusterIP/NodePort) and fronted by SLB for external access.
  • No network policies are blocking pod-to-pod communication within the cluster.
  • SLB uses standard round-robin load balancing (no sticky session/configured affinity).
Originally created by @gaoding-hailang on GitHub (Jan 23, 2026). **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,否则会被关闭。谢谢!:) - [ ] "Please do not modify this template :) and fill in all the required fields." **Versions** 1. dify-plugin-daemon 0.5.2 2. dify-api 1.11.2 **Describe the bug** **Environment:** - Deployment: Kubernetes (K8s) cluster - Network: Plugin service port forwarded via SLB (Server Load Balancer) - Replicas: 1 pod (works) / multiple pods (issue occurs) - Dify-plugin-daemon Version: Version after v0.5.2 (problematic); v0.4.2 (works fine) - Code Change: No code modifications made between versions **Description** I have identified a potential bug related to plugin debugging in a Kubernetes cluster deployment with SLB port forwarding. The issue manifests as follows: - Single-pod scenario: The plugin service runs with only one pod, and there is no "plugin not found" error; all requests work as expected. - Cluster scenario (multiple pods): When the plugin service is scaled to multiple pods in K8s (with SLB forwarding the plugin installation port), most requests return a "plugin not found" error. However, a small number of requests will occasionally succeed. **Suspected Root Cause** - My hypothesis is that during the plugin registration process, the plugin establishes a TCP connection with a specific pod in the K8s cluster. The connection information (or related registration metadata) is not synchronized across other pods in the cluster. Since SLB distributes requests across all pods, only the pod that holds the TCP connection can handle the plugin request successfully, while other pods fail to recognize the plugin and throw errors. **Key Observation** - This issue does NOT exist in version v0.4.2. When I roll back the plugin service to v0.4.2 (with exactly the same K8s/SLB configuration and no code changes), the "plugin not found" error disappears completely in both single-pod and multi-pod cluster modes. - Expected Behavior - Plugin registration and connection information should be synchronized across all pods in the K8s cluster, ensuring consistent plugin availability for all requests regardless of which pod the SLB routes the traffic to. **Steps to Reproduce** - Deploy dify-plugin-daemon (version > v0.4.2) to a K8s cluster with multiple replicas (≥2 pods). - Configure SLB to forward the plugin installation port to the K8s service of the plugin daemon. - Send consecutive requests to invoke/install the plugin via the SLB endpoint. - Observe that most requests fail with "plugin not found", while a few requests succeed randomly (likely routed to the pod with the established TCP connection). - Roll back the deployment to v0.4.2 (same K8s/SLB configuration, no code changes). - Verify that all requests succeed consistently in both single-pod and multi-pod modes. **Additional Context** - The plugin service is exposed via a K8s Service (ClusterIP/NodePort) and fronted by SLB for external access. - No network policies are blocking pod-to-pod communication within the cluster. - SLB uses standard round-robin load balancing (no sticky session/configured affinity).
yindo added the plugin-daemonbug labels 2026-02-16 01:15:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 23, 2026):

This error is a known regression in dify-plugin-daemon after v0.5.2 when running multiple pods in Kubernetes. The root cause is that plugin runtime registration and state are stored in local (in-memory) maps per pod, not shared across the cluster. So, when SLB routes requests to different pods, only the pod that registered the plugin runtime can serve requests; others return "plugin not found" errors. This behavior changed after v0.4.2, which did not enforce strict version matching or trigger the same race conditions in environment setup source.

The open-source version does not synchronize plugin runtime state between pods, and there is no built-in distributed locking or coordination for plugin environment initialization. Sharing persistent storage (PVC) helps avoid plugin data loss after restarts, but does not solve runtime registration sync source. The ControlPanel watchdog logic in v0.5.1+ can cause concurrent environment initialization across pods, leading to race conditions and unpredictable failures source.

Workarounds: run a single replica, avoid sharing plugin working directories (but share plugin/package directories), or implement a custom distributed lock (e.g., Redis) for environment setup. If you need true multi-pod support, a distributed locking mechanism is required to serialize plugin environment initialization source. Also, ensure plugin configuration version numbers match exactly in v0.5.2+ source.

There is no official solution for multi-pod runtime registration sync in the open-source codebase as of the latest versions. The enterprise edition may have features to address this, but for open-source, these architectural limitations remain source.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 23, 2026): <!-- Answer --> This error is a known regression in dify-plugin-daemon after v0.5.2 when running multiple pods in Kubernetes. The root cause is that plugin runtime registration and state are stored in local (in-memory) maps per pod, not shared across the cluster. So, when SLB routes requests to different pods, only the pod that registered the plugin runtime can serve requests; others return "plugin not found" errors. This behavior changed after v0.4.2, which did not enforce strict version matching or trigger the same race conditions in environment setup [source](https://github.com/langgenius/dify-plugin-daemon/issues/574). The open-source version does not synchronize plugin runtime state between pods, and there is no built-in distributed locking or coordination for plugin environment initialization. Sharing persistent storage (PVC) helps avoid plugin data loss after restarts, but does not solve runtime registration sync [source](https://github.com/langgenius/dify-plugin-daemon/issues/424). The ControlPanel watchdog logic in v0.5.1+ can cause concurrent environment initialization across pods, leading to race conditions and unpredictable failures [source](https://github.com/langgenius/dify-plugin-daemon/issues/541). Workarounds: run a single replica, avoid sharing plugin working directories (but share plugin/package directories), or implement a custom distributed lock (e.g., Redis) for environment setup. If you need true multi-pod support, a distributed locking mechanism is required to serialize plugin environment initialization [source](https://github.com/langgenius/dify-plugin-daemon/issues/541). Also, ensure plugin configuration version numbers match exactly in v0.5.2+ [source](https://github.com/langgenius/dify-plugin-daemon/issues/574). There is no official solution for multi-pod runtime registration sync in the open-source codebase as of the latest versions. The enterprise edition may have features to address this, but for open-source, these architectural limitations remain [source](https://github.com/langgenius/dify-plugin-daemon/issues/541). <!-- 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/cc404219-38d7-4c60-bb7c-e7cc5d347bef?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cc404219-38d7-4c60-bb7c-e7cc5d347bef?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cc404219-38d7-4c60-bb7c-e7cc5d347bef?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cc404219-38d7-4c60-bb7c-e7cc5d347bef?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cc404219-38d7-4c60-bb7c-e7cc5d347bef?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cc404219-38d7-4c60-bb7c-e7cc5d347bef?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cc404219-38d7-4c60-bb7c-e7cc5d347bef?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20error%20is%20a%20known%20regression%20in%20dify-plugin-daemon%20after%20v0.5.2%20when%20running%20multiple%20pods%20in%20Kubernetes.%20The%20root%20cause%20is%20that%20plugin%20runtime%20registration%20and%20state%20are%20stored%20in%20local%20%28in-memory%29%20maps%20per%20pod%2C%20not%20shared%20across%20the%20cluster.%20So%2C%20when%20SLB%20routes%20requests%20to%20different%20pods%2C%20only%20the%20pod%20that%20registered%20the%20plugin%20runtime%20can%20serve%20requests%3B%20others%20return%20%22plugin%20not%20found%22%20errors.%20This%20behavior%20changed%20after%20v0.4.2%2C%20which%20did%20not%20enforce%20strict%20version%20matching%20or%20trigger%20the%20same%20race%20conditions%20in%20environment%20setup%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-plugin-daemon/issues/574%29.%0A%0AThe%20open-source%20version%20does%20not%20synchronize%20plugin%20runtime%20state%20between%20pods%2C%20and%20there%20is%20no%20built-in%20distributed%20locking%20or%20coordination%20for%20plugin%20environment%20initialization.%20Sharing%20persistent%20storage%20%28PVC%29%20helps%20avoid%20plugin%20data%20loss%20after%20restarts%2C%20but%20does%20not%20solve%20runtime%20registration%20sync%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-plugin-daemon/issues/424%29.%20The%20ControlPanel%20watchdog%20logic%20in%20v0.5.1%2B%20can%20cause%20concurrent%20environment%20initialization%20across%20pods%2C%20leading%20to%20race%20conditions%20and%20unpredictable%20failures%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-plugin-daemon/issues/541%29.%0A%0AWorkarounds%3A%20run%20a%20single%20replica%2C%20avoid%20sharing%20plugin%20working%20directories%20%28but%20share%20plugin/package%20directories%29%2C%20or%20implement%20a%20custom%20distributed%20lock%20%28e.g.%2C%20Redis%29%20for%20environment%20setup.%20If%20you%20need%20true%20multi-pod%20support%2C%20a%20distributed%20locking%20mechanism%20is%20required%20to%20serialize%20plugin%20environment%20initialization%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-plugin-daemon/issues/541%29.%20Also%2C%20ensure%20plugin%20configuration%20version%20numbers%20match%20exactly%20in%20v0.5.2%2B%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-plugin-daemon/issues/574%29.%0A%0AThere%20is%20no%20official%20solution%20for%20multi-pod%20runtime%20registration%20sync%20in%20the%20open-source%20codebase%20as%20of%20the%20latest%20versions.%20The%20enterprise%20edition%20may%20have%20features%20to%20address%20this%2C%20but%20for%20open-source%2C%20these%20architectural%20limitations%20remain%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-plugin-daemon/issues/541%29.)&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-plugin-daemon/issues/577)
Author
Owner

@fatelei commented on GitHub (Jan 28, 2026):

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

Versions

  1. dify-plugin-daemon 0.5.2
  2. dify-api 1.11.2

Describe the bug Environment:

  • Deployment: Kubernetes (K8s) cluster
  • Network: Plugin service port forwarded via SLB (Server Load Balancer)
  • Replicas: 1 pod (works) / multiple pods (issue occurs)
  • Dify-plugin-daemon Version: Version after v0.5.2 (problematic); v0.4.2 (works fine)
  • Code Change: No code modifications made between versions

Description I have identified a potential bug related to plugin debugging in a Kubernetes cluster deployment with SLB port forwarding. The issue manifests as follows:

  • Single-pod scenario: The plugin service runs with only one pod, and there is no "plugin not found" error; all requests work as expected.
  • Cluster scenario (multiple pods): When the plugin service is scaled to multiple pods in K8s (with SLB forwarding the plugin installation port), most requests return a "plugin not found" error. However, a small number of requests will occasionally succeed.

Suspected Root Cause

  • My hypothesis is that during the plugin registration process, the plugin establishes a TCP connection with a specific pod in the K8s cluster. The connection information (or related registration metadata) is not synchronized across other pods in the cluster. Since SLB distributes requests across all pods, only the pod that holds the TCP connection can handle the plugin request successfully, while other pods fail to recognize the plugin and throw errors.

Key Observation

  • This issue does NOT exist in version v0.4.2. When I roll back the plugin service to v0.4.2 (with exactly the same K8s/SLB configuration and no code changes), the "plugin not found" error disappears completely in both single-pod and multi-pod cluster modes.
  • Expected Behavior
  • Plugin registration and connection information should be synchronized across all pods in the K8s cluster, ensuring consistent plugin availability for all requests regardless of which pod the SLB routes the traffic to.

Steps to Reproduce

  • Deploy dify-plugin-daemon (version > v0.4.2) to a K8s cluster with multiple replicas (≥2 pods).
  • Configure SLB to forward the plugin installation port to the K8s service of the plugin daemon.
  • Send consecutive requests to invoke/install the plugin via the SLB endpoint.
  • Observe that most requests fail with "plugin not found", while a few requests succeed randomly (likely routed to the pod with the established TCP connection).
  • Roll back the deployment to v0.4.2 (same K8s/SLB configuration, no code changes).
  • Verify that all requests succeed consistently in both single-pod and multi-pod modes.

Additional Context

  • The plugin service is exposed via a K8s Service (ClusterIP/NodePort) and fronted by SLB for external access.
  • No network policies are blocking pod-to-pod communication within the cluster.
  • SLB uses standard round-robin load balancing (no sticky session/configured affinity).

because the dify-plugin-daemon origin code is not support replica, you can change the code, add app.pluginManager.AddClusterTunnel(app.cluster), you need implement the method AddClusterTunnel, after modify the code, different k8s pod will sync the python package install info, so it will not lead the error: no avaiable node

@fatelei commented on GitHub (Jan 28, 2026): > **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,否则会被关闭。谢谢!:)[ ] "Please do not modify this template :) and fill in all the required fields." > > **Versions** > > 1. dify-plugin-daemon 0.5.2 > 2. dify-api 1.11.2 > > **Describe the bug** **Environment:** > > * Deployment: Kubernetes (K8s) cluster > * Network: Plugin service port forwarded via SLB (Server Load Balancer) > * Replicas: 1 pod (works) / multiple pods (issue occurs) > * Dify-plugin-daemon Version: Version after v0.5.2 (problematic); v0.4.2 (works fine) > * Code Change: No code modifications made between versions > > **Description** I have identified a potential bug related to plugin debugging in a Kubernetes cluster deployment with SLB port forwarding. The issue manifests as follows: > > * Single-pod scenario: The plugin service runs with only one pod, and there is no "plugin not found" error; all requests work as expected. > * Cluster scenario (multiple pods): When the plugin service is scaled to multiple pods in K8s (with SLB forwarding the plugin installation port), most requests return a "plugin not found" error. However, a small number of requests will occasionally succeed. > > **Suspected Root Cause** > > * My hypothesis is that during the plugin registration process, the plugin establishes a TCP connection with a specific pod in the K8s cluster. The connection information (or related registration metadata) is not synchronized across other pods in the cluster. Since SLB distributes requests across all pods, only the pod that holds the TCP connection can handle the plugin request successfully, while other pods fail to recognize the plugin and throw errors. > > **Key Observation** > > * This issue does NOT exist in version v0.4.2. When I roll back the plugin service to v0.4.2 (with exactly the same K8s/SLB configuration and no code changes), the "plugin not found" error disappears completely in both single-pod and multi-pod cluster modes. > * Expected Behavior > * Plugin registration and connection information should be synchronized across all pods in the K8s cluster, ensuring consistent plugin availability for all requests regardless of which pod the SLB routes the traffic to. > > **Steps to Reproduce** > > * Deploy dify-plugin-daemon (version > v0.4.2) to a K8s cluster with multiple replicas (≥2 pods). > * Configure SLB to forward the plugin installation port to the K8s service of the plugin daemon. > * Send consecutive requests to invoke/install the plugin via the SLB endpoint. > * Observe that most requests fail with "plugin not found", while a few requests succeed randomly (likely routed to the pod with the established TCP connection). > * Roll back the deployment to v0.4.2 (same K8s/SLB configuration, no code changes). > * Verify that all requests succeed consistently in both single-pod and multi-pod modes. > > **Additional Context** > > * The plugin service is exposed via a K8s Service (ClusterIP/NodePort) and fronted by SLB for external access. > * No network policies are blocking pod-to-pod communication within the cluster. > * SLB uses standard round-robin load balancing (no sticky session/configured affinity). because the dify-plugin-daemon origin code is not support replica, you can change the code, add `app.pluginManager.AddClusterTunnel(app.cluster)`, you need implement the method `AddClusterTunnel`, after modify the code, different k8s pod will sync the python package install info, so it will not lead the error: no avaiable node
Author
Owner

@fatelei commented on GitHub (Jan 28, 2026):

if you do want modify the code, you need use serverless to deploy plugin

@fatelei commented on GitHub (Jan 28, 2026): if you do want modify the code, you need use serverless to deploy plugin
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#232