unable to install plugin ollama
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
Request to URL https://marketplace.dify.ai/api/v1/plugins/download?unique_identifier=langgenius/ollama:0.0.3@9ded90ac00e8510119a24be7396ba77191c9610d5e1e29f59d68fa1229822fc7 failed on attempt 3: timed out
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
I found a similar issue regarding the timeout problem when installing the Ollama plugin in a self-hosted Dify v1.0.0 environment. Here are some steps you can take to resolve the issue:
-
Modify the timeout in the source code file
api/core/model_runtime/model_providers/ollama/llm/llm.pyby changing line 60 fromtimeout=(10, 300)to a longer duration, such astimeout=(10, 3600)for 60 minutes. -
Update the following environment variables in the
docker/.envfile to increase the timeout limits:APP_MAX_EXECUTION_TIME=3600 API_TOOL_DEFAULT_READ_TIMEOUT=3600 WORKFLOW_MAX_EXECUTION_TIME=3600 HTTP_REQUEST_MAX_CONNECT_TIMEOUT=3600 HTTP_REQUEST_MAX_READ_TIMEOUT=3600 HTTP_REQUEST_MAX_WRITE_TIMEOUT=3600 -
Rebuild the API service from source using
docker-compose.
Additionally, if you are using Docker for Windows, consider moving the 'dify/docker' directory to the WSL filesystem to avoid performance issues related to NTFS. You can also add the following environment variable to your .env file:
PLUGIN_WORKING_PATH=/app/cwd
If you encounter a ConnectTimeoutError, ensure that your service configuration URL uses host.docker.internal instead of localhost (e.g., http://host.docker.internal:11434) to allow the Docker container to access the Ollama service running on the host machine [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
still has the issue
The problem I encountered is that adding the Olama model configuration address will time out. You can check my issues:https://github.com/langgenius/dify/issues/14331
same problem,like installed,but nothing
I checked the docker compose logs and it's likely a network issue. If you're using Clash, try global TUN mode.I solved the problem by doing this.
Please check your internet connection and give it another try. 😊
Please check your internet connection and give it another try. 😊
If internet was the issue, other models shouldnt work right? I am having the same issue with VertexAI
I deleted my dify installation and then went into WSL to clone the repo and set it up again. The plugins are installing for me now but I was having the same problem as you.
You can try to add a network for plugin_daemon service, if still failed, change STORAGE_TYPE to others in .env file. it works for me.
After you change STORAGE_TYPE, it may shows encrypt error, then you reset it:
docker exec -it dify-services-api-xxxxx flask reset-encrypt-key-pair
same problem, can not install any plugins from marketplace
dify api log
2025-03-04 01:46:16.064 WARNING [Thread-465 (process_request_thread)] [ssrf_proxy.py:61] - Request to URL https://marketplace.dify.ai/api/v1/plugins/download?unique_identifier=langgenius/deepseek:0.0.5@fd6efd37c2a931911de8ab9ca3ba2da303bef146d45ee87ad896b04b36d09403 failed on attempt 3: [Errno -2] Name or service not known
2025-03-04 01:46:18.064 DEBUG [Thread-465 (process_request_thread)] [_config.py:82] - load_ssl_context verify=True cert=None trust_env=True http2=False
2025-03-04 01:46:18.066 DEBUG [Thread-465 (process_request_thread)] [_config.py:148] - load_verify_locations cafile='/home/huangjiawen/anaconda3/envs/dify/lib/python3.12/site-packages/certifi/cacert.pem'
2025-03-04 01:46:18.102 DEBUG [Thread-465 (process_request_thread)] [_config.py:82] - load_ssl_context verify=True cert=None trust_env=True http2=False
2025-03-04 01:46:18.103 DEBUG [Thread-465 (process_request_thread)] [_config.py:148] - load_verify_locations cafile='/home/huangjiawen/anaconda3/envs/dify/lib/python3.12/site-packages/certifi/cacert.pem'
2025-03-04 01:46:18.133 DEBUG [Thread-465 (process_request_thread)] [_config.py:82] - load_ssl_context verify=True cert=None trust_env=True http2=False
2025-03-04 01:46:18.134 DEBUG [Thread-465 (process_request_thread)] [_config.py:148] - load_verify_locations cafile='/home/huangjiawen/anaconda3/envs/dify/lib/python3.12/site-packages/certifi/cacert.pem'
2025-03-04 01:46:18.174 DEBUG [Thread-465 (process_request_thread)] [_trace.py:47] - connect_tcp.started host='ssrf_proxy' port=3128 local_address=None timeout=5.0 socket_options=None
2025-03-04 01:46:18.180 DEBUG [Thread-465 (process_request_thread)] [_trace.py:47] - connect_tcp.failed exception=ConnectError(gaierror(-2, 'Name or service not known'))
2025-03-04 01:46:18.181 WARNING [Thread-465 (process_request_thread)] [ssrf_proxy.py:61] - Request to URL https://marketplace.dify.ai/api/v1/plugins/download?unique_identifier=langgenius/deepseek:0.0.5@fd6efd37c2a931911de8ab9ca3ba2da303bef146d45ee87ad896b04b36d09403 failed on attempt 4: [Errno -2] Name or service not known
2025-03-04 01:46:18.183 INFO [Thread-465 (process_request_thread)] [_internal.py:97] - 192.168.1.102 - - [04/Mar/2025 01:46:18] "POST /console/api/workspaces/current/plugin/install/marketplace HTTP/1.1" 400 -
dify plugin container log
...
[GIN] 2025/03/04 - 01:46:13 | 200 | 5.544513ms | 192.168.1.5 | POST "/plugin/84213dd4-f5f6-46ea-baec-c02c75dbefd8/dispatch/model/schema"
[GIN] 2025/03/04 - 01:46:13 | 200 | 5.97392ms | 192.168.1.5 | POST "/plugin/84213dd4-f5f6-46ea-baec-c02c75dbefd8/dispatch/model/schema"
[GIN] 2025/03/04 - 01:46:13 | 200 | 5.843347ms | 192.168.1.5 | POST "/plugin/84213dd4-f5f6-46ea-baec-c02c75dbefd8/dispatch/model/schema"
2025/03/04 01:46:14 /app/internal/db/pgsql.go:259 record not found
[1.710ms] [rows:0] SELECT * FROM "plugin_declarations" WHERE plugin_unique_identifier = 'langgenius/deepseek:0.0.5@fd6efd37c2a931911de8ab9ca3ba2da303bef146d45ee87ad896b04b36d09403' ORDER BY "plugin_declarations"."id" LIMIT 1
[GIN] 2025/03/04 - 01:46:14 | 200 | 2.306266ms | 192.168.1.5 | GET "/plugin/84213dd4-f5f6-46ea-baec-c02c75dbefd8/management/fetch/manifest?plugin_unique_identifier=langgenius%2Fdeepseek%3A0.0.5%40fd6efd37c2a931911de8ab9ca3ba2da303bef146d45ee87ad896b04b36d09403"
but wegt markerpalce zip success
wget https://marketplace.dify.ai/api/v1/plugins/download?unique_identifier=langgenius/tongyi:0.0.5@64fe3d5b02c4bb840d9f458172904d15e3c05f1f930a14a3ee91f82d012a1e05 --no-check-certificate
--2025-03-04 09:57:28-- https://marketplace.dify.ai/api/v1/plugins/download?unique_identifier=langgenius/tongyi:0.0.5@64fe3d5b02c4bb840d9f458172904d15e3c05f1f930a14a3ee91f82d012a1e05
Resolving marketplace.dify.ai (marketplace.dify.ai)... 104.26.8.156, 172.67.71.187, 104.26.9.156, ...
Connecting to marketplace.dify.ai (marketplace.dify.ai)|104.26.8.156|:443... connected.
WARNING: cannot verify marketplace.dify.ai's certificate, issued by ‘CN=WE1,O=Google Trust Services,C=US’:
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘download?unique_identifier=langgenius%2Ftongyi:0.0.5@64fe3d5b02c4bb840d9f458172904d15e3c05f1f930a14a3ee91f82d012a1e05’
download?unique_identifier=langgenius%2Ftongyi:0 [ <=> ] 209.57K 280KB/s in 0.7s
2025-03-04 09:57:30 (280 KB/s) - ‘download?unique_identifier=langgenius%2Ftongyi:0.0.5@64fe3d5b02c4bb840d9f458172904d15e3c05f1f930a14a3ee91f82d012a1e05’ saved **[214596]**
so why api(source code running) request https://marketplace.dify.ai/api/v1/plugins/download?unique_identifier=langgenius/tongyi:0.0.5@64fe3d5b02c4bb840d9f458172904d15e3c05f1f930a14a3ee91f82d012a1e05 failed on Name or service not known? How to fix this problem?
My environment is also pure Intranet, disable the plugin market in the download plugin local installation can bypass python dependency? Or can I leave ollama as the default option instead of installing plug-ins?
I deleted my dify installation and then went into WSL to clone the repo and set it up again. The plugins are installing for me now but I was having the same problem as you.
Same here. It worked for me on Windows originally, but later reported the error, on the same day. It then worked on WSL.