[GH-ISSUE #1640] Ollama Connection issues FAQ help #1067

Closed
opened 2026-02-22 18:22:58 -05:00 by yindo · 3 comments
Owner

Originally created by @BAK-HOME on GitHub (Jun 8, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1640

How are you running AnythingLLM?

Docker (remote machine)

What happened?

I deployed AnythingLLM on docker on another server in the local area network, and it was all set up, and ollama was also deployed on the server. I could also open AnythingLLM on the web side on another computer. I couldn't connect to 127.0.1: 11434 according to the tutorial, but I had to use 171.0.1: 11434. I could also select the model in ollama, but a dialog would say,"Could not respond to message.An error occurred while streaming response." Error network: Type Error: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11731:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ollamaAIModels (/app/server/utils/helpers/customModels.js:245:18)
at async getCustomModels (/app/server/utils/helpers/customModels.js:33:14)
at async /app/server/endpoints/system.js:929:35 {
cause: Error: connect ECONNREFUSED 127.0.0.1:11434
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 11434”
I also added "Environment="OLLAMA_HOST=0.0.0.0"in ollama.service, but it still doesn't work. Is there any way to solve it?

Are there known steps to reproduce?

No response

Originally created by @BAK-HOME on GitHub (Jun 8, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1640 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? I deployed AnythingLLM on docker on another server in the local area network, and it was all set up, and ollama was also deployed on the server. I could also open AnythingLLM on the web side on another computer. I couldn't connect to 127.0.1: 11434 according to the tutorial, but I had to use 171.0.1: 11434. I could also select the model in ollama, but a dialog would say,"Could not respond to message.An error occurred while streaming response." Error network: Type Error: fetch failed at Object.fetch (node:internal/deps/undici/undici:11731:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ollamaAIModels (/app/server/utils/helpers/customModels.js:245:18) at async getCustomModels (/app/server/utils/helpers/customModels.js:33:14) at async /app/server/endpoints/system.js:929:35 { cause: Error: connect ECONNREFUSED 127.0.0.1:11434 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 11434” I also added "Environment="OLLAMA_HOST=0.0.0.0"in ollama.service, but it still doesn't work. Is there any way to solve it? ### Are there known steps to reproduce? _No response_
yindo added the documentationDocker labels 2026-02-22 18:22:58 -05:00
yindo closed this issue 2026-02-22 18:22:58 -05:00
Author
Owner

@BAK-HOME commented on GitHub (Jun 8, 2024):

I am using ubuntu22.04 server.

@BAK-HOME commented on GitHub (Jun 8, 2024): I am using ubuntu22.04 server.
Author
Owner

@timothycarambat commented on GitHub (Jun 10, 2024):

Looks like the Endpoint never was saved or set?

cause: Error: connect ECONNREFUSED 127.0.0.1:11434

You are indeed correct that on Ubuntu Docker you will need to use 171.0.1:11434 to map to localhost on the host. IIRC that IP though maps to 127.0.0.1 and not localhost or 0.0.0.0

Did you look at this faq page yet? Or is that what you followed and still got connection issues?

@timothycarambat commented on GitHub (Jun 10, 2024): Looks like the Endpoint never was saved or set? > cause: Error: connect ECONNREFUSED 127.0.0.1:11434 You are indeed correct that on Ubuntu Docker you will need to use `171.0.1:11434` to map to localhost on the host. IIRC that IP though maps to 127.0.0.1 and not `localhost` or `0.0.0.0` Did you look at [this faq page](https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/AiProviders/ollama/README.md) yet? Or is that what you followed and still got connection issues?
Author
Owner

@timothycarambat commented on GitHub (Jun 28, 2024):

https://docs.useanything.com/ollama-connection-troubleshooting

@timothycarambat commented on GitHub (Jun 28, 2024): https://docs.useanything.com/ollama-connection-troubleshooting
yindo changed title from Ollama Connection issues FAQ help to [GH-ISSUE #1640] Ollama Connection issues FAQ help 2026-06-05 14:38:48 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1067