dify icon indicating copy to clipboard operation
dify copied to clipboard

Can not set the plugin params

Open kelvenlaw opened this issue 9 months ago • 3 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

v1.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I upgraded from 0.15.3. I found my models are gone. After I setup model plugin, and want to set the models params, It failed. The error is below:

2025-03-03 08:22:26.771 ERROR [Dummy-33] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/volcengine_maas/volcengine_maas/models [POST]
Traceback (most recent call last):
  File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 489, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/controllers/console/wraps.py", line 147, in decorated
    return view(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/libs/login.py", line 94, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/controllers/console/wraps.py", line 27, in decorated
    return view(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/controllers/console/workspace/models.py", line 154, in post
    model_provider_service.save_model_credentials(
  File "/app/api/services/model_provider_service.py", line 237, in save_model_credentials
    provider_configuration.add_or_update_custom_model_credentials(
  File "/app/api/core/entities/provider_configuration.py", line 406, in add_or_update_custom_model_credentials
    provider_model_record, credentials = self.custom_model_credentials_validate(model_type, model, credentials)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/entities/provider_configuration.py", line 386, in custom_model_credentials_validate
    credentials = model_provider_factory.model_credentials_validate(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/model_runtime/model_providers/model_provider_factory.py", line 190, in model_credentials_validate
    self.plugin_model_manager.validate_model_credentials(
  File "/app/api/core/plugin/manager/model.py", line 137, in validate_model_credentials
    for resp in response:
                ^^^^^^^^
  File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream
    self._handle_plugin_daemon_error(error.error_type, error.message)
  File "/app/api/core/plugin/manager/base.py", line 223, in _handle_plugin_daemon_error
    raise PluginDaemonInternalServerError(description=message)
core.plugin.manager.exc.PluginDaemonInternalServerError: PluginDaemonInternalServerError: no available node, plugin not found

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

kelvenlaw avatar Mar 03 '25 08:03 kelvenlaw

Hello @kelvenlaw! I'm here to help you with any issues you're experiencing. If you need help with bug fixes, have questions about the software, or want to become a contributor, I'm here to assist you.

To resolve the "PluginDaemonInternalServerError: no available node, plugin not found" error after upgrading to Dify version 1.0.0, you can try the following solutions:

  1. Increase Python Environment Initialization Timeout: Add the following configuration line to your docker-compose.yaml file after line 560:

    PYTHON_ENV_INIT_TIMEOUT: 320
    

    This increases the Python environment initialization timeout, which should help resolve the error.

  2. Downgrade Dify Services: If the error persists, consider downgrading the dify-api and dify-web services to version 0.15.3 in your docker-compose.yaml file. This workaround has been confirmed to resolve similar issues related to database connection problems in the plugin_daemon component in version 1.0.0-beta. The error seems to be a bug in v1.0.0-beta related to the plugin daemon's database connectivity rather than a configuration issue [1][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] avatar Mar 03 '25 08:03 dosubot[bot]

config your pip source host in docker-compose.yml//plugin_daemon//volumes ‘’‘ - ./.pip:/root/.pip ‘’’

leechedan avatar Mar 03 '25 13:03 leechedan

config your pip source host in docker-compose.yml//plugin_daemon//volumes ‘’‘ - ./.pip:/root/.pip ‘’’

Sorry, I don't quite understand what you mean. Do you mean to execute this command in the "docker/volumes/plugin_daemon" directory?

Ljx-007 avatar Mar 03 '25 13:03 Ljx-007

Try to set PLUGIN_MAX_EXECUTION_TIMEOUT in .env, the unit is second, default is 240s.

And read this thread https://github.com/langgenius/dify/issues/14736

crazywoola avatar Mar 05 '25 01:03 crazywoola