dify icon indicating copy to clipboard operation
dify copied to clipboard

[ERROR]PluginDaemonInternalServerError: no available node, plugin not found

Open Fone520 opened this issue 7 months ago • 7 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] 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,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Image

Image

i have changed the .env and docker-compose.yaml,look down↓

Image

Image

Image

everytimes i restart dify,it will get this error. i have to reinstall my plugins then it can make PluginDeamon succeed. i have readed old problems like this,but i ever dont know how to fix it.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Fone520 avatar May 29 '25 15:05 Fone520

The error [ERROR]PluginDaemonInternalServerError: no available node, plugin not found in Dify (v1.4.1, self-hosted Docker) is often caused by issues with plugin installation persistence, environment variable misconfiguration, or plugin daemon/database connectivity.

Here are steps you can take to resolve this and avoid having to reinstall plugins after every restart:

  1. Check Environment Variables
    Ensure you are using the correct environment variables in your .env and docker-compose.yaml files.

    • Use PLUGIN_DAEMON_URL (not PLUGIN_API_URL) for the plugin daemon connection. If you use the wrong variable, the API will fall back to a default and fail to connect, causing plugin errors.
    • Make sure FORCE_VERIFYING_SIGNATURE is set appropriately. If you encounter signature verification issues, add FORCE_VERIFYING_SIGNATURE=false to your .env file and restart Dify.
    • Double-check that all plugin-related variables (like PLUGIN_DIFY_INNER_API_KEY and PLUGIN_DIFY_INNER_API_URL) are set and consistent across your configuration files.
      Reference Reference
  2. Clear Plugin Data
    If the error persists, clear plugin data from the database and plugin directories:

    • In your dify_plugin database, 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;
      
    • Remove plugin directories:
      /app/storage/cwd/plugins/plugin
      /app/storage/cwd/plugins/plugin-working
      /app/storage/cwd/plugins/persistence
      /app/storage/cwd/plugins/plugin-root
      

    Reference

  3. Restart Plugin Daemon and Reinstall Plugins
    After clearing data, restart the plugin daemon service and reinstall your plugins. This should restore normal operation and allow plugins to persist across restarts.

  4. Timeouts and Dependency Installation
    If plugin installation fails due to Python dependencies not installing within the default 120-second timeout, consider increasing the timeout by setting PLUGIN_PYTHON_ENV_INIT_TIMEOUT to a higher value in your environment configuration.
    Reference

  5. Version Issues
    This error was a known issue in earlier Dify versions and has been addressed in newer releases. Since you are on 1.4.1, ensure all containers are using the correct, matching versions.
    Reference

If you continue to experience issues, review your .env and docker-compose.yaml for any inconsistencies, and consider resetting your .env from the example file and reapplying your customizations.

Let me know if you need more specific guidance on any of these steps.

To reply, just mention my name @dosu.


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

dosubot[bot] avatar May 29 '25 15:05 dosubot[bot]

https://github.com/langgenius/dify/issues/20445 is this a related issue?

RockChinQ avatar May 29 '25 15:05 RockChinQ

#20445 这是一个相关的问题吗?

yes logger is same.

Fone520 avatar May 29 '25 15:05 Fone520

@dosu how to go to my dify_plugin database and run

Fone520 avatar May 29 '25 16:05 Fone520

To access your dify_plugin database and run SQL commands in a self-hosted Docker setup, follow these steps:

  1. Find the name of your database container. By default, it is often called docker-db-1 or db. You can check with:

    docker ps
    
  2. Enter the database container shell:

    docker exec -it docker-db-1 bash
    

    (Replace docker-db-1 with your actual container name if different.)

  3. Connect to the dify_plugin database using the PostgreSQL client:

    psql -U postgres -d dify_plugin
    

    (Default username is postgres, default database is dify_plugin. If you changed these in your docker-compose or .env, use your custom values.)

  4. Now you can run SQL commands, for example:

    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;
    
  5. To exit the PostgreSQL prompt, type:

    \q
    
  6. To exit the container shell, type:

    exit
    

If you need to clear other tables (like install_tasks), use the same process and adjust the SQL command as needed.
Reference: Dify GitHub Issue #17375 and Dify GitHub Issue #19086.

Let me know if you need help with a specific SQL command or if your setup uses a different database!

To reply, just mention my name @dosu.


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

dosubot[bot] avatar May 29 '25 16:05 dosubot[bot]

@dosu where to Remove plugin directories

Fone520 avatar May 29 '25 16:05 Fone520

To remove the plugin directories in your Dify self-hosted Docker setup, follow these steps:

  1. Stop all running Dify containers:

    docker compose stop
    
  2. Enter the main Dify application container (the one running the app, often named something like dify-api-1 or similar; check with docker ps):

    docker exec -it <your-dify-app-container-name> bash
    

    Replace <your-dify-app-container-name> with the actual container name.

  3. Inside the container, remove the following directories:

    rm -rf /app/storage/cwd/plugins/plugin
    rm -rf /app/storage/cwd/plugins/plugin-working
    rm -rf /app/storage/cwd/plugins/persistence
    rm -rf /app/storage/cwd/plugins/plugin-root
    

    These paths are where Dify stores plugin data and working files.

  4. Exit the container:

    exit
    
  5. Restart your Dify services:

    docker compose up -d
    

After this, you can reinstall your plugins as needed. This process ensures all plugin-related files are cleared from the system before a fresh install.
Reference: Dify GitHub Issue #19086

To reply, just mention my name @dosu.


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

dosubot[bot] avatar May 29 '25 16:05 dosubot[bot]

This issue has already been fixed yesterday, please try reinstalling the plugin you needed.

RockChinQ avatar May 31 '25 02:05 RockChinQ

i reinstall the plugins,and docker compose restart,i also met this problem

Image @RockChinQ

Fone520 avatar May 31 '25 03:05 Fone520

作者解决了吗

codeXYW avatar Oct 22 '25 11:10 codeXYW

作者解决了吗

https://github.com/langgenius/dify/issues/24161#issuecomment-3203834041 解决了,看这

Fone520 avatar Oct 22 '25 15:10 Fone520