社区版 1.0.0 本地部署后无法配置模型秘钥 #8794

Closed
opened 2026-02-21 18:27:38 -05:00 by yindo · 74 comments
Owner

Originally created by @dukun1224 on GitHub (Mar 1, 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.0.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Image

报错:Uncaught (in promise) TimeoutError: Request timed out: POST http://localhost/console/api/workspaces/current/model-providers/langgenius/tongyi/tongyi
at 3451-f3b01e497296e6f6.js:1:4366

无法配置模型apikey,导致整个流程无法使用

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @dukun1224 on GitHub (Mar 1, 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.0.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce <img width="720" alt="Image" src="https://github.com/user-attachments/assets/80704a28-19cc-4229-ac70-6943684bbb68" /> 报错:Uncaught (in promise) TimeoutError: Request timed out: POST http://localhost/console/api/workspaces/current/model-providers/langgenius/tongyi/tongyi at 3451-f3b01e497296e6f6.js:1:4366 无法配置模型apikey,导致整个流程无法使用 ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:27:38 -05:00
yindo closed this issue 2026-02-21 18:27:39 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 1, 2025):

Hello, @dukun1224! I'm here to help you with any bugs, questions, or contributions you have regarding Dify. I can assist you while we wait for a human maintainer.

There are similar issues related to configuring model API keys and encountering timeout errors. One open issue suggests ensuring that you configure the model provider through the Dify web interface under 'Settings > Workspace > Model Providers' instead of using environment variables in the .env or docker-compose files. Additionally, checking the logs of the 'api' container using the command docker-compose logs api might provide more information about the error [1].

Another suggestion for a similar issue is to check the timeout settings for API requests in the api/core/tools/custom_tool/tool.py file. The default timeout values are set using the API_TOOL_DEFAULT_TIMEOUT variable, which includes a 10-second connect timeout and a 60-second read timeout. You might want to adjust these settings if necessary and ensure that your network conditions are stable [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] commented on GitHub (Mar 1, 2025): <!-- Greeting --> Hello, @dukun1224! I'm here to help you with any bugs, questions, or contributions you have regarding Dify. I can assist you while we wait for a human maintainer. <!-- Answer --> There are similar issues related to configuring model API keys and encountering timeout errors. One open issue suggests ensuring that you configure the model provider through the Dify web interface under 'Settings > Workspace > Model Providers' instead of using environment variables in the .env or docker-compose files. Additionally, checking the logs of the 'api' container using the command `docker-compose logs api` might provide more information about the error <sup>[[1]](https://github.com/langgenius/dify/issues/14599)</sup>. Another suggestion for a similar issue is to check the timeout settings for API requests in the `api/core/tools/custom_tool/tool.py` file. The default timeout values are set using the `API_TOOL_DEFAULT_TIMEOUT` variable, which includes a 10-second connect timeout and a 60-second read timeout. You might want to adjust these settings if necessary and ensure that your network conditions are stable <sup>[[2]](https://github.com/langgenius/dify/issues/14536)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/14ce3dcc-e85c-4a64-9d1d-65c79304e57e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/14ce3dcc-e85c-4a64-9d1d-65c79304e57e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/14ce3dcc-e85c-4a64-9d1d-65c79304e57e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/14ce3dcc-e85c-4a64-9d1d-65c79304e57e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/14ce3dcc-e85c-4a64-9d1d-65c79304e57e?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/14ce3dcc-e85c-4a64-9d1d-65c79304e57e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/14ce3dcc-e85c-4a64-9d1d-65c79304e57e?feedback_type=other)</sup>
Author
Owner

@YunFenLei commented on GitHub (Mar 1, 2025):

@dosu 我也遇到这个问题,新安装绑定了域名,但是提示500错误,如下图:

Image

同时,设置里面不能正常加载出模型供应商,点击市场的话地址是127...本地地址如下图:

Image

@YunFenLei commented on GitHub (Mar 1, 2025): @dosu 我也遇到这个问题,新安装绑定了域名,但是提示500错误,如下图: ![Image](https://github.com/user-attachments/assets/77f3c36a-aebe-4910-a596-c3487b9dcf4f) 同时,设置里面不能正常加载出模型供应商,点击市场的话地址是127...本地地址如下图: ![Image](https://github.com/user-attachments/assets/39776fec-371a-4253-b30e-9fbdf576b618)
Author
Owner

@AreChen commented on GitHub (Mar 1, 2025):

@dosu 我也遇到这个问题,新安装绑定了域名,但是提示500错误,如下图:

Image

同时,设置里面不能正常加载出模型供应商,点击市场的话地址是127...本地地址如下图:

Image

你这个应该是没做插件迁移安装

@AreChen commented on GitHub (Mar 1, 2025): > [@dosu](https://github.com/dosu) 我也遇到这个问题,新安装绑定了域名,但是提示500错误,如下图: > > ![Image](https://github.com/user-attachments/assets/77f3c36a-aebe-4910-a596-c3487b9dcf4f) > > 同时,设置里面不能正常加载出模型供应商,点击市场的话地址是127...本地地址如下图: > > ![Image](https://github.com/user-attachments/assets/39776fec-371a-4253-b30e-9fbdf576b618) 你这个应该是没做插件迁移安装
Author
Owner

@YunFenLei commented on GitHub (Mar 1, 2025):

@AreChen 我这个是全新安装,不存在插件迁移吧?

@YunFenLei commented on GitHub (Mar 1, 2025): @AreChen 我这个是全新安装,不存在插件迁移吧?
Author
Owner

@xuesd commented on GitHub (Mar 1, 2025):

The issue of not finding the plugin can be checked to see if there is an. env. local file in the web folder

@xuesd commented on GitHub (Mar 1, 2025): The issue of not finding the plugin can be checked to see if there is an. env. local file in the web folder
Author
Owner

@YunFenLei commented on GitHub (Mar 1, 2025):

@xuesd 我删除镜像重新安装看看,反正是学习测试。

@YunFenLei commented on GitHub (Mar 1, 2025): @xuesd 我删除镜像重新安装看看,反正是学习测试。
Author
Owner

@xuesd commented on GitHub (Mar 1, 2025):

Docker deployment method, please check if cp. env. example. env has been executed in the Docker folder

@xuesd commented on GitHub (Mar 1, 2025): Docker deployment method, please check if cp. env. example. env has been executed in the Docker folder
Author
Owner

@crazyFeng commented on GitHub (Mar 1, 2025):

same problem, 重启后正常了

@crazyFeng commented on GitHub (Mar 1, 2025): same problem, 重启后正常了
Author
Owner

@YunFenLei commented on GitHub (Mar 1, 2025):

@crazyFeng 重启docker 还是dify容器~

@YunFenLei commented on GitHub (Mar 1, 2025): @crazyFeng 重启docker 还是dify容器~
Author
Owner

@crazyFeng commented on GitHub (Mar 1, 2025):

@YunFenLei
steps:

  1. docker compose stop
  2. docker compose up -d
@crazyFeng commented on GitHub (Mar 1, 2025): @YunFenLei steps: 1. docker compose stop 2. docker compose up -d
Author
Owner

@YunFenLei commented on GitHub (Mar 1, 2025):

@crazyFeng 重装,重启都未能解决这个问题,感谢解答,等官方看看吧!

@YunFenLei commented on GitHub (Mar 1, 2025): @crazyFeng 重装,重启都未能解决这个问题,感谢解答,等官方看看吧!
Author
Owner

@xuesd commented on GitHub (Mar 1, 2025):

@YunFenLei 检查是否存在.env文件

@xuesd commented on GitHub (Mar 1, 2025): @YunFenLei 检查是否存在.env文件
Author
Owner

@YunFenLei commented on GitHub (Mar 1, 2025):

@xuesd

Image

@YunFenLei commented on GitHub (Mar 1, 2025): @xuesd ![Image](https://github.com/user-attachments/assets/08777e70-41cc-4e42-ad05-d2d29dc46aef)
Author
Owner

@dukun1224 commented on GitHub (Mar 1, 2025):

api日志:

2025-03-01 16:33:52 2025-03-01 08:33:52.226 ERROR [Dummy-13] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/tongyi/tongyi [POST]
2025-03-01 16:33:52 Traceback (most recent call last):
2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
2025-03-01 16:33:52 rv = self.dispatch_request()
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
2025-03-01 16:33:52 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 489, in wrapper
2025-03-01 16:33:52 resp = resource(*args, **kwargs)
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
2025-03-01 16:33:52 return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
2025-03-01 16:33:52 resp = meth(*args, **kwargs)
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/controllers/console/wraps.py", line 147, in decorated
2025-03-01 16:33:52 return view(*args, **kwargs)
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/libs/login.py", line 94, in decorated_view
2025-03-01 16:33:52 return current_app.ensure_sync(func)(*args, **kwargs)
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/controllers/console/wraps.py", line 27, in decorated
2025-03-01 16:33:52 return view(*args, **kwargs)
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/controllers/console/workspace/model_providers.py", line 102, in post
2025-03-01 16:33:52 model_provider_service.save_provider_credentials(
2025-03-01 16:33:52 File "/app/api/services/model_provider_service.py", line 145, in save_provider_credentials
2025-03-01 16:33:52 provider_configuration.add_or_update_custom_credentials(credentials)
2025-03-01 16:33:52 File "/app/api/core/entities/provider_configuration.py", line 248, in add_or_update_custom_credentials
2025-03-01 16:33:52 provider_record, credentials = self.custom_credentials_validate(credentials)
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/core/entities/provider_configuration.py", line 231, in custom_credentials_validate
2025-03-01 16:33:52 credentials = model_provider_factory.provider_credentials_validate(
2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-01 16:33:52 File "/app/api/core/model_runtime/model_providers/model_provider_factory.py", line 155, in provider_credentials_validate
2025-03-01 16:33:52 self.plugin_model_manager.validate_provider_credentials(
2025-03-01 16:33:52 File "/app/api/core/plugin/manager/model.py", line 97, in validate_provider_credentials
2025-03-01 16:33:52 for resp in response:
2025-03-01 16:33:52 ^^^^^^^^
2025-03-01 16:33:52 File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream
2025-03-01 16:33:52 self._handle_plugin_daemon_error(error.error_type, error.message)
2025-03-01 16:33:52 File "/app/api/core/plugin/manager/base.py", line 223, in _handle_plugin_daemon_error
2025-03-01 16:33:52 raise PluginDaemonInternalServerError(description=message)
2025-03-01 16:33:52 core.plugin.manager.exc.PluginDaemonInternalServerError: PluginDaemonInternalServerError: killed by timeout

@dukun1224 commented on GitHub (Mar 1, 2025): api日志: 2025-03-01 16:33:52 2025-03-01 08:33:52.226 ERROR [Dummy-13] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/tongyi/tongyi [POST] 2025-03-01 16:33:52 Traceback (most recent call last): 2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request 2025-03-01 16:33:52 rv = self.dispatch_request() 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request 2025-03-01 16:33:52 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 489, in wrapper 2025-03-01 16:33:52 resp = resource(*args, **kwargs) 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view 2025-03-01 16:33:52 return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return] 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 604, in dispatch_request 2025-03-01 16:33:52 resp = meth(*args, **kwargs) 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/controllers/console/wraps.py", line 147, in decorated 2025-03-01 16:33:52 return view(*args, **kwargs) 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/libs/login.py", line 94, in decorated_view 2025-03-01 16:33:52 return current_app.ensure_sync(func)(*args, **kwargs) 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/controllers/console/wraps.py", line 27, in decorated 2025-03-01 16:33:52 return view(*args, **kwargs) 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/controllers/console/workspace/model_providers.py", line 102, in post 2025-03-01 16:33:52 model_provider_service.save_provider_credentials( 2025-03-01 16:33:52 File "/app/api/services/model_provider_service.py", line 145, in save_provider_credentials 2025-03-01 16:33:52 provider_configuration.add_or_update_custom_credentials(credentials) 2025-03-01 16:33:52 File "/app/api/core/entities/provider_configuration.py", line 248, in add_or_update_custom_credentials 2025-03-01 16:33:52 provider_record, credentials = self.custom_credentials_validate(credentials) 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/core/entities/provider_configuration.py", line 231, in custom_credentials_validate 2025-03-01 16:33:52 credentials = model_provider_factory.provider_credentials_validate( 2025-03-01 16:33:52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/core/model_runtime/model_providers/model_provider_factory.py", line 155, in provider_credentials_validate 2025-03-01 16:33:52 self.plugin_model_manager.validate_provider_credentials( 2025-03-01 16:33:52 File "/app/api/core/plugin/manager/model.py", line 97, in validate_provider_credentials 2025-03-01 16:33:52 for resp in response: 2025-03-01 16:33:52 ^^^^^^^^ 2025-03-01 16:33:52 File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream 2025-03-01 16:33:52 self._handle_plugin_daemon_error(error.error_type, error.message) 2025-03-01 16:33:52 File "/app/api/core/plugin/manager/base.py", line 223, in _handle_plugin_daemon_error 2025-03-01 16:33:52 raise PluginDaemonInternalServerError(description=message) 2025-03-01 16:33:52 core.plugin.manager.exc.PluginDaemonInternalServerError: PluginDaemonInternalServerError: killed by timeout
Author
Owner

@dosubot[bot] commented on GitHub (Mar 1, 2025):

To resolve the 500 Internal Server Error and issues with loading model providers in Dify, you can try the following steps:

  1. Environment Configuration: Ensure that your environment is correctly set up:

    • Make sure there is an .env.local file in the web folder.
    • Execute cp .env.example .env in the Docker folder to ensure the environment variables are correctly configured.
  2. Restart Docker Containers:

    docker compose stop
    docker compose up -d
    
  3. DNS Resolution: If you suspect DNS resolution issues, especially if marketplace.dify.ai is blocked by the Great Firewall (GFW), use a VPN or configure DNS settings to bypass these restrictions.

  4. API Server Configuration: Fix ERR_CONNECTION_REFUSED errors by starting the API server with the correct host and port:

    flask run --host 0.0.0.0 --port=5001 --debug
    
  5. Middleware Services: Ensure middleware services are running:

    cd docker
    cp middleware.env.example middleware.env
    docker compose -f docker-compose.middleware.yaml up -d
    
  6. Firewall and Dependencies: Check that no firewall rules are blocking port 5001, and ensure your Python environment is set up with Python 3.12. Install all dependencies using Poetry:

    poetry env use 3.12
    poetry install
    

These steps should help address the server error and model provider loading issues [1][2][3].

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] commented on GitHub (Mar 1, 2025): <!-- Answer --> To resolve the 500 Internal Server Error and issues with loading model providers in Dify, you can try the following steps: 1. **Environment Configuration**: Ensure that your environment is correctly set up: - Make sure there is an `.env.local` file in the web folder. - Execute `cp .env.example .env` in the Docker folder to ensure the environment variables are correctly configured. 2. **Restart Docker Containers**: ```bash docker compose stop docker compose up -d ``` 3. **DNS Resolution**: If you suspect DNS resolution issues, especially if marketplace.dify.ai is blocked by the Great Firewall (GFW), use a VPN or configure DNS settings to bypass these restrictions. 4. **API Server Configuration**: Fix ERR_CONNECTION_REFUSED errors by starting the API server with the correct host and port: ```bash flask run --host 0.0.0.0 --port=5001 --debug ``` 5. **Middleware Services**: Ensure middleware services are running: ```bash cd docker cp middleware.env.example middleware.env docker compose -f docker-compose.middleware.yaml up -d ``` 6. **Firewall and Dependencies**: Check that no firewall rules are blocking port 5001, and ensure your Python environment is set up with Python 3.12. Install all dependencies using Poetry: ```bash poetry env use 3.12 poetry install ``` These steps should help address the server error and model provider loading issues <sup>[[1]](https://github.com/langgenius/dify/issues/14603)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/12617)</sup><sup>[[3]](https://github.com/langgenius/dify/issues/13806)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/678c588d-d403-4ced-80d4-ea160b779da2?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/678c588d-d403-4ced-80d4-ea160b779da2?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/678c588d-d403-4ced-80d4-ea160b779da2?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/678c588d-d403-4ced-80d4-ea160b779da2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/678c588d-d403-4ced-80d4-ea160b779da2?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/678c588d-d403-4ced-80d4-ea160b779da2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/678c588d-d403-4ced-80d4-ea160b779da2?feedback_type=other)</sup>
Author
Owner

@hjqcn commented on GitHub (Mar 1, 2025):

昨天安装了1.0.0,好垃圾,
1是原来旧版的数据没了,
2模型做为插件安装两次才装上,安装上插件之后是模型死活都添加不上

@hjqcn commented on GitHub (Mar 1, 2025): 昨天安装了1.0.0,好垃圾, 1是原来旧版的数据没了, 2模型做为插件安装两次才装上,安装上插件之后是模型死活都添加不上
Author
Owner

@ft4710403 commented on GitHub (Mar 1, 2025):

me too

@ft4710403 commented on GitHub (Mar 1, 2025): me too
Author
Owner

@maruilav commented on GitHub (Mar 1, 2025):

me too

@maruilav commented on GitHub (Mar 1, 2025): me too
Author
Owner

@dukun1224 commented on GitHub (Mar 1, 2025):

大家都遇到模型秘钥不可以配置的问题了吗

@dukun1224 commented on GitHub (Mar 1, 2025): 大家都遇到模型秘钥不可以配置的问题了吗
Author
Owner

@52learn commented on GitHub (Mar 1, 2025):

me too . that is a serious issue , pls resolve it as soon as possible!!!
2025-03-01 00:00:33.961 ERROR [Dummy-11] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/tongyi/tongyi/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: killed by timeout

@52learn commented on GitHub (Mar 1, 2025): me too . that is a serious issue , pls resolve it as soon as possible!!! ` 2025-03-01 00:00:33.961 ERROR [Dummy-11] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/tongyi/tongyi/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: killed by timeout `
Author
Owner

@martin666888 commented on GitHub (Mar 1, 2025):

我也是,本地部署无法配置大模型

@martin666888 commented on GitHub (Mar 1, 2025): 我也是,本地部署无法配置大模型
Author
Owner

@52learn commented on GitHub (Mar 1, 2025):

Too many people have encountered the same problem, why hasn't there been any progress yet!!! we are all waiting for it online!!!!

@52learn commented on GitHub (Mar 1, 2025): Too many people have encountered the same problem, why hasn't there been any progress yet!!! we are all waiting for it online!!!!
Author
Owner

@martin666888 commented on GitHub (Mar 1, 2025):

Is version 1.0.0 not yet ready?

@martin666888 commented on GitHub (Mar 1, 2025): Is version 1.0.0 not yet ready?
Author
Owner

@AreChen commented on GitHub (Mar 1, 2025):

  # Frontend web application.
  web:
    image: langgenius/dify-web:1.0.0
    restart: always
    environment:
      CONSOLE_API_URL: ${CONSOLE_API_URL:-}
      APP_API_URL: ${APP_API_URL:-}
      SENTRY_DSN: ${WEB_SENTRY_DSN:-}
      NEXT_TELEMETRY_DISABLED: ${NEXT_TELEMETRY_DISABLED:-0}
      TEXT_GENERATION_TIMEOUT_MS: ${TEXT_GENERATION_TIMEOUT_MS:-60000}
      CSP_WHITELIST: ${CSP_WHITELIST:-}
      MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
      MARKETPLACE_URL: ${MARKETPLACE_URL:-https://marketplace.dify.ai}
      TOP_K_MAX_VALUE: ${TOP_K_MAX_VALUE:-}
      INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: ${INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH:-}
      PM2_INSTANCES: ${PM2_INSTANCES:-2}
      # example: http://udify.app/api
      NEXT_PUBLIC_PUBLIC_API_PREFIX: https://your.domin.com/api
      # The API PREFIX for MARKETPLACE
      NEXT_PUBLIC_MARKETPLACE_API_PREFIX: https://marketplace.dify.ai/api/v1
      # The URL for MARKETPLACE
      NEXT_PUBLIC_MARKETPLACE_URL_PREFIX: https://marketplace.dify.ai

docker compose里更新以下这些环境参数试试
Try updating these environment variables in docker compose.

@AreChen commented on GitHub (Mar 1, 2025): ``` # Frontend web application. web: image: langgenius/dify-web:1.0.0 restart: always environment: CONSOLE_API_URL: ${CONSOLE_API_URL:-} APP_API_URL: ${APP_API_URL:-} SENTRY_DSN: ${WEB_SENTRY_DSN:-} NEXT_TELEMETRY_DISABLED: ${NEXT_TELEMETRY_DISABLED:-0} TEXT_GENERATION_TIMEOUT_MS: ${TEXT_GENERATION_TIMEOUT_MS:-60000} CSP_WHITELIST: ${CSP_WHITELIST:-} MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai} MARKETPLACE_URL: ${MARKETPLACE_URL:-https://marketplace.dify.ai} TOP_K_MAX_VALUE: ${TOP_K_MAX_VALUE:-} INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: ${INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH:-} PM2_INSTANCES: ${PM2_INSTANCES:-2} # example: http://udify.app/api NEXT_PUBLIC_PUBLIC_API_PREFIX: https://your.domin.com/api # The API PREFIX for MARKETPLACE NEXT_PUBLIC_MARKETPLACE_API_PREFIX: https://marketplace.dify.ai/api/v1 # The URL for MARKETPLACE NEXT_PUBLIC_MARKETPLACE_URL_PREFIX: https://marketplace.dify.ai ``` docker compose里更新以下这些环境参数试试 Try updating these environment variables in docker compose.
Author
Owner

@hjqcn commented on GitHub (Mar 1, 2025):

昨天安装了1.0.0,好垃圾, 1是原来旧版的数据没了, 2模型做为插件安装两次才装上,安装上插件之后是模型死活都添加不上

模型插件安装的很慢,没有进度显示,所以点了两次等了很久才行。
模型Key设置时要打开5003端口,否则就是设置不上去,
两大坑

@hjqcn commented on GitHub (Mar 1, 2025): > 昨天安装了1.0.0,好垃圾, 1是原来旧版的数据没了, 2模型做为插件安装两次才装上,安装上插件之后是模型死活都添加不上 模型插件安装的很慢,没有进度显示,所以点了两次等了很久才行。 模型Key设置时要打开5003端口,否则就是设置不上去, 两大坑
Author
Owner

@YunFenLei commented on GitHub (Mar 1, 2025):

昨天安装了1.0.0,好垃圾, 1是原来旧版的数据没了, 2模型做为插件安装两次才装上,安装上插件之后是模型死活都添加不上

模型插件安装的很慢,没有进度显示,所以点了两次等了很久才行。 模型Key设置时要打开5003端口,否则就是设置不上去, 两大坑

我是安装都没装好哈哈,这个1.0太草率拉!

@YunFenLei commented on GitHub (Mar 1, 2025): > > 昨天安装了1.0.0,好垃圾, 1是原来旧版的数据没了, 2模型做为插件安装两次才装上,安装上插件之后是模型死活都添加不上 > > 模型插件安装的很慢,没有进度显示,所以点了两次等了很久才行。 模型Key设置时要打开5003端口,否则就是设置不上去, 两大坑 我是安装都没装好哈哈,这个1.0太草率拉!
Author
Owner

@dukun1224 commented on GitHub (Mar 1, 2025):

昨天安装了1.0.0,好垃圾, 1是原来旧版的数据没了, 2模型做为插件安装两次才装上,安装上插件之后是模型死活都添加不上

模型插件安装的很慢,没有进度显示,所以点了两次等了很久才行。 模型Key设置时要打开5003端口,否则就是设置不上去, 两大坑

你可以添加模型秘钥了吗?你是windows 部署的还是?

@dukun1224 commented on GitHub (Mar 1, 2025): > > 昨天安装了1.0.0,好垃圾, 1是原来旧版的数据没了, 2模型做为插件安装两次才装上,安装上插件之后是模型死活都添加不上 > > 模型插件安装的很慢,没有进度显示,所以点了两次等了很久才行。 模型Key设置时要打开5003端口,否则就是设置不上去, 两大坑 你可以添加模型秘钥了吗?你是windows 部署的还是?
Author
Owner

@xuesd commented on GitHub (Mar 1, 2025):

不论是本地的ollama还是阿里云的通义千问api,我都还添加不了。windows和Ubuntu我都部署了

@xuesd commented on GitHub (Mar 1, 2025): 不论是本地的ollama还是阿里云的通义千问api,我都还添加不了。windows和Ubuntu我都部署了
Author
Owner

@xuesd commented on GitHub (Mar 1, 2025):

这几天已经部署好多次了,都是这个问题。一开始没人问过这个问题我就已经遇到了。我还怀疑是我自己的问题,重新部署了好几次
I have deployed it many times in the past few days, and it has always been this issue. At the beginning, no one asked me this question, but I already encountered it. I still suspected it was my own fault and redeployed several times

@xuesd commented on GitHub (Mar 1, 2025): 这几天已经部署好多次了,都是这个问题。一开始没人问过这个问题我就已经遇到了。我还怀疑是我自己的问题,重新部署了好几次 I have deployed it many times in the past few days, and it has always been this issue. At the beginning, no one asked me this question, but I already encountered it. I still suspected it was my own fault and redeployed several times
Author
Owner

@52learn commented on GitHub (Mar 1, 2025):

5003

你好,dify相关容器如图所示:

Image

也打开了5003端口,还是存在一样问题

@52learn commented on GitHub (Mar 1, 2025): > 5003 你好,dify相关容器如图所示: ![Image](https://github.com/user-attachments/assets/a0451675-f37b-4878-bac7-bba396aa1126) 也打开了5003端口,还是存在一样问题
Author
Owner

@YunFenLei commented on GitHub (Mar 1, 2025):

5003

你好,dify相关容器如图所示:

Image

也打开了5003端口,还是存在一样问题

感觉这是官方的bug 不是我们的问题嘿嘿!

@YunFenLei commented on GitHub (Mar 1, 2025): > > 5003 > > 你好,dify相关容器如图所示: > > ![Image](https://github.com/user-attachments/assets/a0451675-f37b-4878-bac7-bba396aa1126) > > 也打开了5003端口,还是存在一样问题 感觉这是官方的bug 不是我们的问题嘿嘿!
Author
Owner

@51302890 commented on GitHub (Mar 1, 2025):

安装了1.0.0用不了,又从新安装0.15.3,也不行了,很无语

@51302890 commented on GitHub (Mar 1, 2025): 安装了1.0.0用不了,又从新安装0.15.3,也不行了,很无语
Author
Owner

@J7503303 commented on GitHub (Mar 1, 2025):

绝对是个大坑,玛德!验证API Key怎么走的是本地的URL啊?

@J7503303 commented on GitHub (Mar 1, 2025): 绝对是个大坑,玛德!验证API Key怎么走的是本地的URL啊?
Author
Owner

@cwjcharles commented on GitHub (Mar 2, 2025):

我也是这个问题 dify更新到1.0后,火山模型无法使用,添加模式的时候,提示internal server error,之前是正常的,而且我重新添加了其他模型也是正常的,用兼容 openai 的接口添加火山模型反而是正常的

@cwjcharles commented on GitHub (Mar 2, 2025): 我也是这个问题 dify更新到1.0后,火山模型无法使用,添加模式的时候,提示internal server error,之前是正常的,而且我重新添加了其他模型也是正常的,用兼容 openai 的接口添加火山模型反而是正常的
Author
Owner

@JasonkayZK commented on GitHub (Mar 2, 2025):

Same issue here, any solution?

@JasonkayZK commented on GitHub (Mar 2, 2025): Same issue here, any solution?
Author
Owner

@zorn-zhao commented on GitHub (Mar 2, 2025):

1、docker compose 方式本地部署dify 1.0版本 模型的api key 添加不上
2、安装模型插件时打开代理安装的很快,但不开代理安装不上,下载模型插件到本地,从本地安装,不成功

@zorn-zhao commented on GitHub (Mar 2, 2025): 1、docker compose 方式本地部署dify 1.0版本 模型的api key 添加不上 2、安装模型插件时打开代理安装的很快,但不开代理安装不上,下载模型插件到本地,从本地安装,不成功
Author
Owner

@YunFenLei commented on GitHub (Mar 2, 2025):

1、docker compose 方式本地部署dify 1.0版本 模型的api key 添加不上 2、安装模型插件时打开代理安装的很快,但不开代理安装不上,下载模型插件到本地,从本地安装,不成功

周末,等他们上班吧,估计在处理商业版的bug!

@YunFenLei commented on GitHub (Mar 2, 2025): > 1、docker compose 方式本地部署dify 1.0版本 模型的api key 添加不上 2、安装模型插件时打开代理安装的很快,但不开代理安装不上,下载模型插件到本地,从本地安装,不成功 周末,等他们上班吧,估计在处理商业版的bug!
Author
Owner

@hjqcn commented on GitHub (Mar 2, 2025):

1、docker compose 方式本地部署dify 1.0版本 模型的api key 添加不上 2、安装模型插件时打开代理安装的很快,但不开代理安装不上,下载模型插件到本地,从本地安装,不成功

周末,等他们上班吧,估计在处理商业版的bug!

啊?,商业片还有很多BUG吗?这次1.0.0真的有点急躁和草率啊。

@hjqcn commented on GitHub (Mar 2, 2025): > > 1、docker compose 方式本地部署dify 1.0版本 模型的api key 添加不上 2、安装模型插件时打开代理安装的很快,但不开代理安装不上,下载模型插件到本地,从本地安装,不成功 > > 周末,等他们上班吧,估计在处理商业版的bug! 啊?,商业片还有很多BUG吗?这次1.0.0真的有点急躁和草率啊。
Author
Owner

@FerretAngel commented on GitHub (Mar 2, 2025):

+1

@FerretAngel commented on GitHub (Mar 2, 2025): +1
Author
Owner

@qzzq2002 commented on GitHub (Mar 2, 2025):

me too

@qzzq2002 commented on GitHub (Mar 2, 2025): me too
Author
Owner

@LanYu4qz commented on GitHub (Mar 2, 2025):

me too

@LanYu4qz commented on GitHub (Mar 2, 2025): me too
Author
Owner

@wubucheng commented on GitHub (Mar 2, 2025):

点击安装插件提示成功,实际上是出于安装过程中,去插件管理看了一下,安装过程很慢,而且容易安装失败

@wubucheng commented on GitHub (Mar 2, 2025): 点击安装插件提示成功,实际上是出于安装过程中,去插件管理看了一下,安装过程很慢,而且容易安装失败
Author
Owner

@caixiaomao commented on GitHub (Mar 3, 2025):

一样的问题,停止、重启也还是一样的问题

@caixiaomao commented on GitHub (Mar 3, 2025): 一样的问题,停止、重启也还是一样的问题
Author
Owner

@HeartIsBeat commented on GitHub (Mar 3, 2025):

+1 模型供应商配不了

Image

@HeartIsBeat commented on GitHub (Mar 3, 2025): +1 模型供应商配不了 ![Image](https://github.com/user-attachments/assets/1cc2563f-3985-4720-a958-805f39262a32)
Author
Owner

@LZW-Andrewlu commented on GitHub (Mar 3, 2025):

问题原因是内部插件初始化过程异常。

Image
下载python 依赖逻辑的超时时间太短,导致每次依赖没下载完就超时了,而且超时的时候还会把已下载的依赖全部清空,重试时又重新下载拷贝(可能走了缓存)。这里一直超时,插件系统一直无法正常使用。

@LZW-Andrewlu commented on GitHub (Mar 3, 2025): 问题原因是内部插件初始化过程异常。 ![Image](https://github.com/user-attachments/assets/c717ab8c-2667-4c73-a97a-df3c6aded48a) 下载python 依赖逻辑的超时时间太短,导致每次依赖没下载完就超时了,而且超时的时候还会把已下载的依赖全部清空,重试时又重新下载拷贝(可能走了缓存)。这里一直超时,插件系统一直无法正常使用。
Author
Owner
@crazywoola commented on GitHub (Mar 3, 2025): Try https://github.com/langgenius/dify/issues/14736#issuecomment-2693905382 & https://github.com/langgenius/dify/issues/14682#issuecomment-2694019566
Author
Owner

@yangshuo-1004 commented on GitHub (Mar 3, 2025):

大家都遇到模型秘钥不可以配置的问题了吗

遇到了,解决不了啊

@yangshuo-1004 commented on GitHub (Mar 3, 2025): > 大家都遇到模型秘钥不可以配置的问题了吗 遇到了,解决不了啊
Author
Owner

@dcxs commented on GitHub (Mar 4, 2025):

+1

@dcxs commented on GitHub (Mar 4, 2025): +1
Author
Owner

@hunkwang commented on GitHub (Mar 4, 2025):

  1. Check if /dify/docker/.env exists - it does
  2. Restart
    docker compose stop
    docker compose up -d
  3. Uninstall the plugin and reinstall it
  4. The Tongyi Qianwen plugin still reports an error, downgrade to version 0.4 and continue installation
  5. Success
@hunkwang commented on GitHub (Mar 4, 2025): 1. Check if /dify/docker/.env exists - it does 2. Restart docker compose stop docker compose up -d 3. Uninstall the plugin and reinstall it 4. The Tongyi Qianwen plugin still reports an error, downgrade to version 0.4 and continue installation 5. Success
Author
Owner

@leadroy commented on GitHub (Mar 5, 2025):

This 1.0 release is very disappointing and I hope to complete the fix soon. It was originally planned to go online, but now it seems that it will have to wait, and it is very unstable.

@leadroy commented on GitHub (Mar 5, 2025): This 1.0 release is very disappointing and I hope to complete the fix soon. It was originally planned to go online, but now it seems that it will have to wait, and it is very unstable.
Author
Owner

@huangsijun17 commented on GitHub (Mar 6, 2025):

查阅Docker下插件相关容器日志docker logs docker-plugin_daemon-1,若存在大量近期日志,切分部存在初始化错误,则大概率为插件初始化问题。等待若干小时,有概率初始化成功。对应插件初始化成功后即可导入秘钥。


个人怀疑,插件初始化时需要下载文件,网络问题导致初始化超时?插件初始化状态不在插件列表显示,导致误以为“安装成功“?

@huangsijun17 commented on GitHub (Mar 6, 2025): 查阅Docker下插件相关容器日志`docker logs docker-plugin_daemon-1`,若存在大量近期日志,切分部存在初始化错误,则大概率为插件初始化问题。等待若干小时,有概率初始化成功。对应插件初始化成功后即可导入秘钥。 --- 个人怀疑,插件初始化时需要下载文件,网络问题导致初始化超时?插件初始化状态不在插件列表显示,导致误以为“安装成功“?
Author
Owner

@sevck commented on GitHub (Mar 6, 2025):

+1
I have a question, why do I need to request “Marketplaces.dify.ai” when I add AI model keys

requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='marketplace.dify.ai', port=443): Max retries exceeded with url: /api/v1/plugins/batch (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f457e784f20>, 'Connection to marketplace.dify.ai timed out. (connect timeout=None)')) 2025-03-06 10:45:29.325 ERROR [Dummy-4] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/azure_openai/azure_openai/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: killed by timeout

@sevck commented on GitHub (Mar 6, 2025): +1 I have a question, why do I need to request “Marketplaces.dify.ai” when I add AI model keys ================== `requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='marketplace.dify.ai', port=443): Max retries exceeded with url: /api/v1/plugins/batch (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f457e784f20>, 'Connection to marketplace.dify.ai timed out. (connect timeout=None)')) 2025-03-06 10:45:29.325 ERROR [Dummy-4] [app.py:875] - Exception on /console/api/workspaces/current/model-providers/langgenius/azure_openai/azure_openai/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: killed by timeout`
Author
Owner

@dofospider commented on GitHub (Mar 6, 2025):

官方对于windows的docker部署推荐在wsl2的子系统内建立docker 容器,这样建立后的文件都在wsl的内部,大家尝试一下,可以解决很多问题。

@dofospider commented on GitHub (Mar 6, 2025): 官方对于windows的docker部署推荐在wsl2的子系统内建立docker 容器,这样建立后的文件都在wsl的内部,大家尝试一下,可以解决很多问题。
Author
Owner

@xinbs commented on GitHub (Mar 7, 2025):

同样的问题

@xinbs commented on GitHub (Mar 7, 2025): 同样的问题
Author
Owner

@cleverdouble commented on GitHub (Mar 7, 2025):

Image

@cleverdouble commented on GitHub (Mar 7, 2025): ![Image](https://github.com/user-attachments/assets/c237a432-0619-468a-b5c3-27ae0fd9c52e)
Author
Owner

@jackyzzy commented on GitHub (Mar 9, 2025):

同样的问题,想退回到0.15.3,发现还退回不了。

@jackyzzy commented on GitHub (Mar 9, 2025): 同样的问题,想退回到0.15.3,发现还退回不了。
Author
Owner

@sevck commented on GitHub (Mar 10, 2025):

我解决了,插件的docker配置http/https代理,配置一下pip的源环境变量就可以了
方法如下:

 plugin_daemon:
    image: langgenius/dify-plugin-daemon:0.0.3-local
    restart: always
    environment:
      # Use the shared environment variables.
      <<: *shared-api-worker-env
      HTTP_PROXY:    you proxy_host:port
      HTTPS_PROXY: you proxy_host:port
      PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/'
      PYTHON_ENV_INIT_TIMEOUT: 640
@sevck commented on GitHub (Mar 10, 2025): 我解决了,插件的docker配置http/https代理,配置一下pip的源环境变量就可以了 方法如下: ``` plugin_daemon: image: langgenius/dify-plugin-daemon:0.0.3-local restart: always environment: # Use the shared environment variables. <<: *shared-api-worker-env HTTP_PROXY: you proxy_host:port HTTPS_PROXY: you proxy_host:port PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/' PYTHON_ENV_INIT_TIMEOUT: 640 ```
Author
Owner

@shiliu2023 commented on GitHub (Mar 12, 2025):

还没好吗?!1.0.1也还是不行!

@shiliu2023 commented on GitHub (Mar 12, 2025): 还没好吗?!1.0.1也还是不行!
Author
Owner

@sevck commented on GitHub (Mar 12, 2025):

我解决了,插件的docker配置http/https代理,配置一下pip的源环境变量就可以了 方法如下:

 plugin_daemon:
    image: langgenius/dify-plugin-daemon:0.0.3-local
    restart: always
    environment:
      # Use the shared environment variables.
      <<: *shared-api-worker-env
      HTTP_PROXY:    you proxy_host:port
      HTTPS_PROXY: you proxy_host:port
      PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/'
      PYTHON_ENV_INIT_TIMEOUT: 640

:( 1.0.0 is work, but in version 1.0.1 has error,

[ERROR]init environment failed: failed to install dependencies: exit status 2, output: error: unexpected argument '--proxy' found

  tip: a similar argument exists: '--prefix'

Usage: uv pip install --prefix <PREFIX> <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>>

For more information, try '--help'.
, retry in 30s

@sevck commented on GitHub (Mar 12, 2025): > 我解决了,插件的docker配置http/https代理,配置一下pip的源环境变量就可以了 方法如下: > > ``` > plugin_daemon: > image: langgenius/dify-plugin-daemon:0.0.3-local > restart: always > environment: > # Use the shared environment variables. > <<: *shared-api-worker-env > HTTP_PROXY: you proxy_host:port > HTTPS_PROXY: you proxy_host:port > PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/' > PYTHON_ENV_INIT_TIMEOUT: 640 > ``` :( 1.0.0 is work, but in version 1.0.1 has error, ``` [ERROR]init environment failed: failed to install dependencies: exit status 2, output: error: unexpected argument '--proxy' found tip: a similar argument exists: '--prefix' Usage: uv pip install --prefix <PREFIX> <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>> For more information, try '--help'. , retry in 30s ```
Author
Owner

@wengmankai commented on GitHub (Mar 12, 2025):

1.0.1 有解决办法吗?

@wengmankai commented on GitHub (Mar 12, 2025): 1.0.1 有解决办法吗?
Author
Owner

@sevck commented on GitHub (Mar 13, 2025):

in version 1.0.1:

 # plugin daemon
  plugin_daemon:
    image: langgenius/dify-plugin-daemon:07d13bfb59acc422afa06436c7fdc5f3bc7e6554-local
    restart: always
    environment:
      # Use the shared environment variables.
      <<: *shared-api-worker-env
      PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/'
      DB_DATABASE: ${DB_PLUGIN_DATABASE:-dify_plugin}
      SERVER_PORT: ${PLUGIN_DAEMON_PORT:-5002}
      SERVER_KEY: ${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi}
      MAX_PLUGIN_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800}
      PPROF_ENABLED: ${PLUGIN_PPROF_ENABLED:-false}
      DIFY_INNER_API_URL: ${PLUGIN_DIFY_INNER_API_URL:-http://api:5001}
      DIFY_INNER_API_KEY: ${PLUGIN_DIFY_INNER_API_KEY:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1}
      PLUGIN_REMOTE_INSTALLING_HOST: ${PLUGIN_DEBUGGING_HOST:-0.0.0.0}
      PLUGIN_REMOTE_INSTALLING_PORT: ${PLUGIN_DEBUGGING_PORT:-5003}
      PLUGIN_WORKING_PATH: ${PLUGIN_WORKING_PATH:-/app/storage/cwd}
      FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
      PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
      PLUGIN_MAX_EXECUTION_TIMEOUT: ${PLUGIN_MAX_EXECUTION_TIMEOUT:-600}
      PIP_MIRROR_URL: ${PIP_MIRROR_URL:-}
      http_proxy: 1xxxxx5:6666
      https_proxy: 1xxx.xxx.xx.x:6666
    ports:
      - "${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}:${PLUGIN_DEBUGGING_PORT:-5003}"
    volumes:
      - ./volumes/plugin_daemon:/app/storage
    depends_on:
      - db

@sevck commented on GitHub (Mar 13, 2025): in version 1.0.1: ``` # plugin daemon plugin_daemon: image: langgenius/dify-plugin-daemon:07d13bfb59acc422afa06436c7fdc5f3bc7e6554-local restart: always environment: # Use the shared environment variables. <<: *shared-api-worker-env PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/' DB_DATABASE: ${DB_PLUGIN_DATABASE:-dify_plugin} SERVER_PORT: ${PLUGIN_DAEMON_PORT:-5002} SERVER_KEY: ${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi} MAX_PLUGIN_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800} PPROF_ENABLED: ${PLUGIN_PPROF_ENABLED:-false} DIFY_INNER_API_URL: ${PLUGIN_DIFY_INNER_API_URL:-http://api:5001} DIFY_INNER_API_KEY: ${PLUGIN_DIFY_INNER_API_KEY:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1} PLUGIN_REMOTE_INSTALLING_HOST: ${PLUGIN_DEBUGGING_HOST:-0.0.0.0} PLUGIN_REMOTE_INSTALLING_PORT: ${PLUGIN_DEBUGGING_PORT:-5003} PLUGIN_WORKING_PATH: ${PLUGIN_WORKING_PATH:-/app/storage/cwd} FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true} PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120} PLUGIN_MAX_EXECUTION_TIMEOUT: ${PLUGIN_MAX_EXECUTION_TIMEOUT:-600} PIP_MIRROR_URL: ${PIP_MIRROR_URL:-} http_proxy: 1xxxxx5:6666 https_proxy: 1xxx.xxx.xx.x:6666 ports: - "${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}:${PLUGIN_DEBUGGING_PORT:-5003}" volumes: - ./volumes/plugin_daemon:/app/storage depends_on: - db ```
Author
Owner

@wengmankai commented on GitHub (Mar 13, 2025):

你好,我是啊铠,你的来信我已收到。谢谢, 辛苦了~
@wengmankai commented on GitHub (Mar 13, 2025): 你好,我是啊铠,你的来信我已收到。谢谢, 辛苦了~
Author
Owner

@leadroy commented on GitHub (Mar 13, 2025):

我解决了,插件的docker配置http/https代理,配置一下pip的源环境变量就可以了 方法如下:

 plugin_daemon:
    image: langgenius/dify-plugin-daemon:0.0.3-local
    restart: always
    environment:
      # Use the shared environment variables.
      <<: *shared-api-worker-env
      HTTP_PROXY:    you proxy_host:port
      HTTPS_PROXY: you proxy_host:port
      PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/'
      PYTHON_ENV_INIT_TIMEOUT: 640

docker配置http/https代理这个要如何操作啊?我对DOCKER不熟悉,找了半天都没找到在什么地方配置。

@leadroy commented on GitHub (Mar 13, 2025): > 我解决了,插件的docker配置http/https代理,配置一下pip的源环境变量就可以了 方法如下: > > ``` > plugin_daemon: > image: langgenius/dify-plugin-daemon:0.0.3-local > restart: always > environment: > # Use the shared environment variables. > <<: *shared-api-worker-env > HTTP_PROXY: you proxy_host:port > HTTPS_PROXY: you proxy_host:port > PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/' > PYTHON_ENV_INIT_TIMEOUT: 640 > ``` docker配置http/https代理这个要如何操作啊?我对DOCKER不熟悉,找了半天都没找到在什么地方配置。
Author
Owner

@leeseng-nie commented on GitHub (Mar 14, 2025):

Still seeing error in docker compose logs -f as following:

sandbox-1 | [GIN] 2025/03/14 - 06:13:33 | 200 | 30.047µs | 127.0.0.1 | GET "/health"
sandbox-1 | [GIN] 2025/03/14 - 06:14:03 | 200 | 29.096µs | 127.0.0.1 | GET "/health"
plugin_daemon-1 | 2025/03/14 06:14:04 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: signal: killed, output: init process exited due to no activity
for 120 seconds, retry in 30s
sandbox-1 | [GIN] 2025/03/14 - 06:14:33 | 200 | 27.519µs | 127.0.0.1 | GET "/health"
plugin_daemon-1 | 2025/03/14 06:14:34 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/arxiv:0.0.2
sandbox-1 | [GIN] 2025/03/14 - 06:15:03 | 200 | 25.009µs | 127.0.0.1 | GET "/health"
sandbox-1 | [GIN] 2025/03/14 - 06:15:33 | 200 | 24.688µs | 127.0.0.1 | GET "/health"
sandbox-1 | [GIN] 2025/03/14 - 06:16:03 | 200 | 83.72µs | 127.0.0.1 | GET "/health"
sandbox-1 | [GIN] 2025/03/14 - 06:16:33 | 200 | 48.448µs | 127.0.0.1 | GET "/health"
plugin_daemon-1 | 2025/03/14 06:16:34 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: signal: killed, output: init process exited due to no activity
for 120 seconds, retry in 30s

@leeseng-nie commented on GitHub (Mar 14, 2025): Still seeing error in docker compose logs -f as following: sandbox-1 | [GIN] 2025/03/14 - 06:13:33 | 200 | 30.047µs | 127.0.0.1 | GET "/health" sandbox-1 | [GIN] 2025/03/14 - 06:14:03 | 200 | 29.096µs | 127.0.0.1 | GET "/health" plugin_daemon-1 | 2025/03/14 06:14:04 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: signal: killed, output: init process exited due to no activity for 120 seconds, retry in 30s sandbox-1 | [GIN] 2025/03/14 - 06:14:33 | 200 | 27.519µs | 127.0.0.1 | GET "/health" plugin_daemon-1 | 2025/03/14 06:14:34 runtime_lifetime.go:70: [INFO]init environment for plugin langgenius/arxiv:0.0.2 sandbox-1 | [GIN] 2025/03/14 - 06:15:03 | 200 | 25.009µs | 127.0.0.1 | GET "/health" sandbox-1 | [GIN] 2025/03/14 - 06:15:33 | 200 | 24.688µs | 127.0.0.1 | GET "/health" sandbox-1 | [GIN] 2025/03/14 - 06:16:03 | 200 | 83.72µs | 127.0.0.1 | GET "/health" sandbox-1 | [GIN] 2025/03/14 - 06:16:33 | 200 | 48.448µs | 127.0.0.1 | GET "/health" plugin_daemon-1 | 2025/03/14 06:16:34 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: signal: killed, output: init process exited due to no activity for 120 seconds, retry in 30s
Author
Owner

@java668-real1 commented on GitHub (Mar 14, 2025):

Image
遇到同样的问题设置不了密钥,问题都没解决 怎么就把问题给关了,服了

@java668-real1 commented on GitHub (Mar 14, 2025): ![Image](https://github.com/user-attachments/assets/bb650106-acaf-4498-8dd4-262ad1ab931a) 遇到同样的问题设置不了密钥,问题都没解决 怎么就把问题给关了,服了
Author
Owner

@hjs3077125227 commented on GitHub (Mar 14, 2025):

Image 遇到同样的问题设置不了密钥,问题都没解决 怎么就把问题给关了,服了

我也是,
本地部署dify开代理调用api显示
[models] Connection Error, Request timed out.
必须得关掉代理使用。
昨天凌晨开代理可以用,今天开代理又不能用了

@hjs3077125227 commented on GitHub (Mar 14, 2025): > ![Image](https://github.com/user-attachments/assets/bb650106-acaf-4498-8dd4-262ad1ab931a) 遇到同样的问题设置不了密钥,问题都没解决 怎么就把问题给关了,服了 我也是, 本地部署dify开代理调用api显示 [models] Connection Error, Request timed out. 必须得关掉代理使用。 昨天凌晨开代理可以用,今天开代理又不能用了
Author
Owner

@java668-real1 commented on GitHub (Mar 14, 2025):

Image 遇到同样的问题设置不了密钥,问题都没解决 怎么就把问题给关了,服了

我也是, 本地部署dify开代理调用api显示 [models] Connection Error, Request timed out. 必须得关掉代理使用。 昨天凌晨开代理可以用,今天开代理又不能用了

解决了么?这个问题卡了我一天

@java668-real1 commented on GitHub (Mar 14, 2025): > > ![Image](https://github.com/user-attachments/assets/bb650106-acaf-4498-8dd4-262ad1ab931a) 遇到同样的问题设置不了密钥,问题都没解决 怎么就把问题给关了,服了 > > 我也是, 本地部署dify开代理调用api显示 [models] Connection Error, Request timed out. 必须得关掉代理使用。 昨天凌晨开代理可以用,今天开代理又不能用了 解决了么?这个问题卡了我一天
Author
Owner

@louxingyu380 commented on GitHub (Mar 16, 2025):

api-1 | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
api-1 | 2025-03-16 11:07:17.612 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 4 threads.
api-1 | 2025-03-16 11:07:26.568 WARNING [Dummy-1] [version.py:37] - Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.15.3 (Caused by ProxyError('Unable to connect to proxy', NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xe01f8049c3b0>: Failed to resolve 'hub-mirror.c.163.com' ([Errno -2] Name or service not known)"))).
api-1 | 2025-03-16 11:07:36.388 INFO [Dummy-2] [_base_client.py:1092] - Retrying request to /chat/completions in 0.481134 seconds
api-1 | 2025-03-16 11:07:47.653 ERROR [Dummy-3] [http_request.py:230] - HTTPSConnectionPool(host='dashscope.aliyuncs.com', port=443): Max retries exceeded with url: /api/v1/services/aigc/text-generation/generation (Caused by ProxyError('Unable to connect to proxy', NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xe01f803e9e50>: Failed to resolve 'hub-mirror.c.163.com' ([Errno -2] Name or service not known)")))
api-1 | 2025-03-16 11:08:03.063 ERROR [Dummy-4] [http_request.py:230] - HTTPSConnectionPool(host='dashscope.aliyuncs.com', port=443): Max retries exceeded with url: /api/v1/services/aigc/text-generation/generation (Caused by ProxyError('Unable to connect to proxy', NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xe01f803f5850>: Failed to resolve 'hub-mirror.c.163.com' ([Errno -2] Name or service not known)")))
@dosu 我本地部署后一直遇到这个问题。无法配置apikey。 因为公司电脑不允许装dockerdestop。 我使用的mac+colima+部署的docker。

@louxingyu380 commented on GitHub (Mar 16, 2025): api-1 | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. api-1 | 2025-03-16 11:07:17.612 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 4 threads. api-1 | 2025-03-16 11:07:26.568 WARNING [Dummy-1] [version.py:37] - Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.15.3 (Caused by ProxyError('Unable to connect to proxy', NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xe01f8049c3b0>: Failed to resolve 'hub-mirror.c.163.com' ([Errno -2] Name or service not known)"))). api-1 | 2025-03-16 11:07:36.388 INFO [Dummy-2] [_base_client.py:1092] - Retrying request to /chat/completions in 0.481134 seconds api-1 | 2025-03-16 11:07:47.653 ERROR [Dummy-3] [http_request.py:230] - HTTPSConnectionPool(host='dashscope.aliyuncs.com', port=443): Max retries exceeded with url: /api/v1/services/aigc/text-generation/generation (Caused by ProxyError('Unable to connect to proxy', NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xe01f803e9e50>: Failed to resolve 'hub-mirror.c.163.com' ([Errno -2] Name or service not known)"))) api-1 | 2025-03-16 11:08:03.063 ERROR [Dummy-4] [http_request.py:230] - HTTPSConnectionPool(host='dashscope.aliyuncs.com', port=443): Max retries exceeded with url: /api/v1/services/aigc/text-generation/generation (Caused by ProxyError('Unable to connect to proxy', NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xe01f803f5850>: Failed to resolve 'hub-mirror.c.163.com' ([Errno -2] Name or service not known)"))) @dosu 我本地部署后一直遇到这个问题。无法配置apikey。 因为公司电脑不允许装dockerdestop。 我使用的mac+colima+部署的docker。
Author
Owner

@jessiimay commented on GitHub (Mar 18, 2025):

The same issue, have been stuck for 2 days.
I'm using Dify1.0.1 on a client windows11, with Ollama running on a server.
Does anyone know if I can just roll back to earlier version Dify to solve it?

@jessiimay commented on GitHub (Mar 18, 2025): The same issue, have been stuck for 2 days. I'm using Dify1.0.1 on a client windows11, with Ollama running on a server. Does anyone know if I can just roll back to earlier version Dify to solve it?
Author
Owner

@louxingyu380 commented on GitHub (Mar 18, 2025):

我已收到,谢谢

@louxingyu380 commented on GitHub (Mar 18, 2025): 我已收到,谢谢
Author
Owner

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

To address the issue of being unable to configure model API keys in Dify version 1.0.0, especially when encountering timeout errors and internal server errors, you can try the following steps:

  1. Increase Timeout Settings: Modify your docker-compose.yaml to increase the execution timeout and Python environment initialization timeout:

    plugin_daemon:
      environment:
        PLUGIN_MAX_EXECUTION_TIMEOUT: 2400
        PYTHON_ENV_INIT_TIMEOUT: 320
    

    This can help resolve timeout-related errors during credential validation [1].

  2. Restart Docker Containers: Apply the changes by restarting your Docker containers:

    docker compose stop
    docker compose up -d
    
  3. Upgrade or Downgrade Dify Version: Consider upgrading to version 1.0.1 where some bugs have been fixed, or downgrading to version 0.15.3 if the issue persists:

    • Stop the current Dify instance:
      docker compose down
      
    • Clone the specific version:
      git clone https://github.com/langgenius/dify.git --branch 0.15.3
      
    • Navigate to the docker directory and start the container:
      cd dify/docker
      docker compose up -d
      
  4. Check Network and Proxy Settings: Ensure that your network settings are correct and that any necessary proxies are configured. This can be crucial if you're behind a corporate firewall or using a proxy server [1].

These steps should help mitigate the issues with configuring model API keys in Dify 1.0.0. If problems persist, consider checking for any additional updates or patches that may have been released.

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] commented on GitHub (Mar 18, 2025): <!-- Answer --> To address the issue of being unable to configure model API keys in Dify version 1.0.0, especially when encountering timeout errors and internal server errors, you can try the following steps: 1. **Increase Timeout Settings**: Modify your `docker-compose.yaml` to increase the execution timeout and Python environment initialization timeout: ```yaml plugin_daemon: environment: PLUGIN_MAX_EXECUTION_TIMEOUT: 2400 PYTHON_ENV_INIT_TIMEOUT: 320 ``` This can help resolve timeout-related errors during credential validation <sup>[[1]](https://github.com/langgenius/dify/discussions/14671)</sup>. 2. **Restart Docker Containers**: Apply the changes by restarting your Docker containers: ```bash docker compose stop docker compose up -d ``` 3. **Upgrade or Downgrade Dify Version**: Consider upgrading to version 1.0.1 where some bugs have been fixed, or downgrading to version 0.15.3 if the issue persists: - Stop the current Dify instance: ```bash docker compose down ``` - Clone the specific version: ```bash git clone https://github.com/langgenius/dify.git --branch 0.15.3 ``` - Navigate to the docker directory and start the container: ```bash cd dify/docker docker compose up -d ``` 4. **Check Network and Proxy Settings**: Ensure that your network settings are correct and that any necessary proxies are configured. This can be crucial if you're behind a corporate firewall or using a proxy server <sup>[[1]](https://github.com/langgenius/dify/discussions/14671)</sup>. These steps should help mitigate the issues with configuring model API keys in Dify 1.0.0. If problems persist, consider checking for any additional updates or patches that may have been released. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/bfd87254-49f7-4cb0-89f9-11a9ad82772f?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/bfd87254-49f7-4cb0-89f9-11a9ad82772f?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/bfd87254-49f7-4cb0-89f9-11a9ad82772f?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/bfd87254-49f7-4cb0-89f9-11a9ad82772f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/bfd87254-49f7-4cb0-89f9-11a9ad82772f?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/bfd87254-49f7-4cb0-89f9-11a9ad82772f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/bfd87254-49f7-4cb0-89f9-11a9ad82772f?feedback_type=other)</sup>
Author
Owner

@flowing-water1 commented on GitHub (Mar 19, 2025):

大家可以参考一下下面这个方法,我结合前面两个大佬的评论搞定了。服务器允许5001~5003端口通过,我不知道是哪个端口起作用了(可能是5003),都让他们通过了。
然后打开dify目录下的docker-compose.yml文件,将里面的web和plugin_daemon替换成下面的,然后重启docker+容器试试,api就能添加成功了。我测试的版本:1.0.0。
修改之后,无论开不开代理都可以添加成功。

修改的部分:


  # Frontend web application.
  web:
    image: langgenius/dify-web:1.0.0
    restart: always
    environment:
      CONSOLE_API_URL: ${CONSOLE_API_URL:-}
      APP_API_URL: ${APP_API_URL:-}
      SENTRY_DSN: ${WEB_SENTRY_DSN:-}
      NEXT_TELEMETRY_DISABLED: ${NEXT_TELEMETRY_DISABLED:-0}
      TEXT_GENERATION_TIMEOUT_MS: ${TEXT_GENERATION_TIMEOUT_MS:-60000}
      CSP_WHITELIST: ${CSP_WHITELIST:-}
      MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
      MARKETPLACE_URL: ${MARKETPLACE_URL:-https://marketplace.dify.ai}
      TOP_K_MAX_VALUE: ${TOP_K_MAX_VALUE:-}
      INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: ${INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH:-}
      PM2_INSTANCES: ${PM2_INSTANCES:-2}
      # example: http://udify.app/api
      NEXT_PUBLIC_PUBLIC_API_PREFIX: https://your.domin.com/api
      # The API PREFIX for MARKETPLACE
      NEXT_PUBLIC_MARKETPLACE_API_PREFIX: https://marketplace.dify.ai/api/v1
      # The URL for MARKETPLACE
      NEXT_PUBLIC_MARKETPLACE_URL_PREFIX: https://marketplace.dify.ai
    labels:
      createdBy: "bt_apps"
    networks:
      - baota_net


  # plugin daemon
  plugin_daemon:
    image: langgenius/dify-plugin-daemon:0.0.3-local
    restart: always
    environment:
      # Use the shared environment variables.
      <<: *shared-api-worker-env
      HTTP_PROXY:    you proxy_host:port
      HTTPS_PROXY: you proxy_host:port
      PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/'
      PLUGIN_MAX_EXECUTION_TIMEOUT: 2400
      PYTHON_ENV_INIT_TIMEOUT: 640
      DB_DATABASE: ${DB_PLUGIN_DATABASE:-dify_plugin}
      SERVER_PORT: ${PLUGIN_DAEMON_PORT:-5002}
      SERVER_KEY: ${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi}
      MAX_PLUGIN_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800}
      PPROF_ENABLED: ${PLUGIN_PPROF_ENABLED:-false}
      DIFY_INNER_API_URL: ${PLUGIN_DIFY_INNER_API_URL:-http://api:5001}
      DIFY_INNER_API_KEY: ${INNER_API_KEY_FOR_PLUGIN:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1}
      PLUGIN_REMOTE_INSTALLING_HOST: ${PLUGIN_REMOTE_INSTALL_HOST:-0.0.0.0}
      PLUGIN_REMOTE_INSTALLING_PORT: ${PLUGIN_REMOTE_INSTALL_PORT:-5003}
      PLUGIN_WORKING_PATH: ${PLUGIN_WORKING_PATH:-/app/storage/cwd}
      FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}

    ports:
      - "${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}:${PLUGIN_DEBUGGING_PORT:-5003}"
    volumes:
      - ${APP_PATH}/plugin_daemon:/app/storage
    labels:
      createdBy: "bt_apps"
    networks:
      - baota_net

重启docker:

docker compose stop
docker compose up -d

重启容器:
我用的是宝塔面板里面的重启服务

@flowing-water1 commented on GitHub (Mar 19, 2025): 大家可以参考一下下面这个方法,我结合前面两个大佬的评论搞定了。服务器允许5001~5003端口通过,我不知道是哪个端口起作用了(可能是5003),都让他们通过了。 然后打开dify目录下的docker-compose.yml文件,将里面的web和plugin_daemon替换成下面的,然后重启docker+容器试试,api就能添加成功了。我测试的版本:1.0.0。 修改之后,无论开不开代理都可以添加成功。 修改的部分: ``` # Frontend web application. web: image: langgenius/dify-web:1.0.0 restart: always environment: CONSOLE_API_URL: ${CONSOLE_API_URL:-} APP_API_URL: ${APP_API_URL:-} SENTRY_DSN: ${WEB_SENTRY_DSN:-} NEXT_TELEMETRY_DISABLED: ${NEXT_TELEMETRY_DISABLED:-0} TEXT_GENERATION_TIMEOUT_MS: ${TEXT_GENERATION_TIMEOUT_MS:-60000} CSP_WHITELIST: ${CSP_WHITELIST:-} MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai} MARKETPLACE_URL: ${MARKETPLACE_URL:-https://marketplace.dify.ai} TOP_K_MAX_VALUE: ${TOP_K_MAX_VALUE:-} INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: ${INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH:-} PM2_INSTANCES: ${PM2_INSTANCES:-2} # example: http://udify.app/api NEXT_PUBLIC_PUBLIC_API_PREFIX: https://your.domin.com/api # The API PREFIX for MARKETPLACE NEXT_PUBLIC_MARKETPLACE_API_PREFIX: https://marketplace.dify.ai/api/v1 # The URL for MARKETPLACE NEXT_PUBLIC_MARKETPLACE_URL_PREFIX: https://marketplace.dify.ai labels: createdBy: "bt_apps" networks: - baota_net ``` ``` # plugin daemon plugin_daemon: image: langgenius/dify-plugin-daemon:0.0.3-local restart: always environment: # Use the shared environment variables. <<: *shared-api-worker-env HTTP_PROXY: you proxy_host:port HTTPS_PROXY: you proxy_host:port PIP_INDEX_URL: 'https://mirrors.aliyun.com/pypi/simple/' PLUGIN_MAX_EXECUTION_TIMEOUT: 2400 PYTHON_ENV_INIT_TIMEOUT: 640 DB_DATABASE: ${DB_PLUGIN_DATABASE:-dify_plugin} SERVER_PORT: ${PLUGIN_DAEMON_PORT:-5002} SERVER_KEY: ${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi} MAX_PLUGIN_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800} PPROF_ENABLED: ${PLUGIN_PPROF_ENABLED:-false} DIFY_INNER_API_URL: ${PLUGIN_DIFY_INNER_API_URL:-http://api:5001} DIFY_INNER_API_KEY: ${INNER_API_KEY_FOR_PLUGIN:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1} PLUGIN_REMOTE_INSTALLING_HOST: ${PLUGIN_REMOTE_INSTALL_HOST:-0.0.0.0} PLUGIN_REMOTE_INSTALLING_PORT: ${PLUGIN_REMOTE_INSTALL_PORT:-5003} PLUGIN_WORKING_PATH: ${PLUGIN_WORKING_PATH:-/app/storage/cwd} FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true} ports: - "${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}:${PLUGIN_DEBUGGING_PORT:-5003}" volumes: - ${APP_PATH}/plugin_daemon:/app/storage labels: createdBy: "bt_apps" networks: - baota_net ``` 重启docker: ``` docker compose stop docker compose up -d ``` 重启容器: 我用的是宝塔面板里面的重启服务
Author
Owner

@quanzheng520 commented on GitHub (Mar 21, 2025):

在局域网无法上互联网的电脑上。在使用聊天助手时,知识检索的节点会报这个错,怎么解决
Run failed: [tongyi] Error: HTTPSConnectionPool(host='dashscope.aliyuncs.com', port=443): Max retries exceeded with url: /api/v1/services/rerank/text-rerank/text-rerank (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff6fbc2360>: Failed to resolve 'dashscope.aliyuncs.com' ([Errno -2] Name or service not known)"))

@quanzheng520 commented on GitHub (Mar 21, 2025): 在局域网无法上互联网的电脑上。在使用聊天助手时,知识检索的节点会报这个错,怎么解决 Run failed: [tongyi] Error: HTTPSConnectionPool(host='dashscope.aliyuncs.com', port=443): Max retries exceeded with url: /api/v1/services/rerank/text-rerank/text-rerank (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff6fbc2360>: Failed to resolve 'dashscope.aliyuncs.com' ([Errno -2] Name or service not known)"))
Author
Owner

@yuejiyueren commented on GitHub (Mar 24, 2025):

@dosu 我也遇到这个问题,新安装绑定了域名,但是提示500错误,如下图:

Image

同时,设置里面不能正常加载出模型供应商,点击市场的话地址是127... 本地地址如下图:

Image

我遇到并解决了这个问题,我是因为web目录下.env.local文件缺少NEXT_PUBLIC_MARKETPLACE_API_PREFIX=https://marketplace.dify.ai/api/v1

The URL for MARKETPLACE

NEXT_PUBLIC_MARKETPLACE_URL_PREFIX=https://marketplace.dify.ai这两个配置,添加后重启web服务,模型供应商显示正常

@yuejiyueren commented on GitHub (Mar 24, 2025): > [@dosu](https://github.com/dosu) 我也遇到这个问题,新安装绑定了域名,但是提示500错误,如下图: > > ![Image](https://github.com/user-attachments/assets/77f3c36a-aebe-4910-a596-c3487b9dcf4f) > > 同时,设置里面不能正常加载出模型供应商,点击市场的话地址是127... 本地地址如下图: > > ![Image](https://github.com/user-attachments/assets/39776fec-371a-4253-b30e-9fbdf576b618) 我遇到并解决了这个问题,我是因为web目录下.env.local文件缺少NEXT_PUBLIC_MARKETPLACE_API_PREFIX=https://marketplace.dify.ai/api/v1 # The URL for MARKETPLACE NEXT_PUBLIC_MARKETPLACE_URL_PREFIX=https://marketplace.dify.ai这两个配置,添加后重启web服务,模型供应商显示正常
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8794