Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
An error occurred during credentials validation: HTTPConnectionPool(host='localhost', port=6337): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x79235a8b7130>: Failed to establish a new connection: [Errno 111] Connection refused')) #4905
[X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
[X] Please do not modify this template :) and fill in all the required fields.
Dify version
0.6.9
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
curl http://124.xxx.66.xxx:7004/api/chat -d '{
"model": "qwen:32b-chat-v1.5-q5_K_M",
"messages": [
{
"role": "user",
"content": "hello"
}
]
}'
It works well.
When add ollama model provider from UI(ollama url:http://134.xxx.66.xxx:7004/), i get "An error occurred during credentials validation: HTTPConnectionPool(host='localhost', port=6337): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x79235a8b7130>: Failed to establish a new connection: [Errno 111] Connection refused'))"
It's really not 'localhost' in the UI, but i get "HTTPConnectionPool(host='localhost', port=6337): ..." error information.
Not Bug.
My ollama listen on 0.0.0.0.
With frp , public ip map to localhost.
I let ollama listening on 192.168.x.x, and changed local_port in frp, It become ok.
Self Checks
Dify version
0.6.9
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
curl http://124.xxx.66.xxx:7004/api/chat -d '{ "model": "qwen:32b-chat-v1.5-q5_K_M", "messages": [ { "role": "user", "content": "hello" } ] }' It works well.
When add ollama model provider from UI(ollama url:http://134.xxx.66.xxx:7004/), i get "An error occurred during credentials validation: HTTPConnectionPool(host='localhost', port=6337): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x79235a8b7130>: Failed to establish a new connection: [Errno 111] Connection refused'))" It's really not 'localhost' in the UI, but i get "HTTPConnectionPool(host='localhost', port=6337): ..." error information.
But it work fine 5 days ago.
my ip is not localhost. its http://134.xxx.66.xxx:7004/
my installation: git clone https://github.com/langgenius/dify.git cd dify/docker docker compose up -d
✔️ Expected Behavior
No response
❌ Actual Behavior
No response