Hello,
I am running n8n v1.98.2
in the ai-stack
Docker environment and have a persistent fetch failed
error that I cannot solve.
My Goal: Connect a Basic LLM Chain
node to an Ollama Model
node to communicate with a local Ollama service running in the same Docker Compose project.
The Error: I consistently get a fetch failed
error with an empty error cause.
Here is a complete summary of my troubleshooting:
- Network Connectivity: The network connection between the containers is working. I have used
docker exec
to get a shell inside then8n
container and awget --spider http://ollama:11434
command connects successfully and instantly with a200 OK
response. - Timeout Issue: The problem is not a timeout. The
fetch failed
error occurs with both large models (llama3.2
) and tiny models (tinydolphin:1.1b
). - DNS Issue: I tried adding the
NODE_OPTIONS=--dns-result-order=ipv4first
environment variable to mydocker-compose.yaml
for then8n
service and restarted the stack, but the error remains exactly the same. - Node Installation: The
n8n-nodes-ollama
community node is correctly installed via theN8N_EXTENSIONS_INSTALL
environment variable and the nodes appear in the n8n UI.
The core question is: Why is the Node.js fetch
call inside the n8n node failing when a wget
call from the exact same container to the exact same address succeeds?
This seems to be a very low-level issue. Any help or ideas would be greatly appreciated.