[GH-ISSUE #4227] [BUG]: Could not respond to message. An error occurred while streaming response. NetworkError when attempting to fetch resource. #4886

Closed
opened 2026-06-05 14:47:59 -04:00 by yindo · 1 comment
Owner

Originally created by @marev3 on GitHub (Jul 31, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4227

How are you running AnythingLLM?

Docker (remote machine)

What happened?

I deployed anythingllm on an i3-8100t pc in my LAN with the following compose.yaml:

services:
anythingllm:
image: mintplexlabs/anythingllm
container_name: anythingllm
ports:
- "8412:3001"
cap_add:
- SYS_ADMIN
environment:
# Adjust for your environment
- STORAGE_DIR=/app/server/storage
- JWT_SECRET=EjWpuQGHks069xQxT445loTnJSzQxDQAzzgbo4sYkT8=
- LLM_PROVIDER=ollama
- OLLAMA_BASE_PATH=http://192.168.1.31:11434
- OLLAMA_MODEL_PREF=gemma3:12b
- OLLAMA_MODEL_TOKEN_LIMIT=8192
- EMBEDDING_ENGINE=ollama
- EMBEDDING_BASE_PATH=http://192.168.1.31:11434
- EMBEDDING_MODEL_PREF=nomic-embed-text:latest
# - EMBEDDING_MODEL_MAX_CHUNK_LENGTH=8192
- VECTOR_DB=lancedb
- WHISPER_PROVIDER=local
- TTS_PROVIDER=native
- PASSWORDMINCHAR=8
# Add any other keys here for services or settings
# you can find in the docker/.env.example file
volumes:
- anythingllm_storage:/app/server/storage
restart: always
volumes:
anythingllm_storage:
driver: local
driver_opts:
type: none
o: bind
device: /mnt/docker-nfs/anythingllm/data

ollama under http://192.168.1.31:11434 is working fine and can be reached.

sudo docker compose up -d and then sudo docker compose logs gives me:

anythingllm | [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
anythingllm | [backend] info: [TokenManager] Initialized new TokenManager instance for model: gpt-3.5-turbo
anythingllm | [backend] info: [TokenManager] Returning existing instance for model: gpt-3.5-turbo
anythingllm | [backend] info: [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM.
anythingllm | [backend] info: prisma:info Starting a sqlite pool with 9 connections.
anythingllm | [backend] info: [TELEMETRY SENT] {"event":"server_boot","distinctId":"52992428-e88f-4fdc-b8fd-72d8d5d9d2f7","properties":{"commit":"--","runtime":"docker"}}
anythingllm | [backend] info: [CommunicationKey] RSA key pair generated for signed payloads within AnythingLLM services.
anythingllm | [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
anythingllm | [backend] info: Primary server in HTTP mode listening on port 3001
anythingllm | [backend] info: [BackgroundWorkerService] Feature is not enabled and will not be started.

The web interface works as expected but when I type a message and hit Enter I get:

Could not respond to message.
An error occurred while streaming response. NetworkError when attempting to fetch resource.

Could you please help me?

Are there known steps to reproduce?

No response

Originally created by @marev3 on GitHub (Jul 31, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4227 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? I deployed anythingllm on an i3-8100t pc in my LAN with the following compose.yaml: > services: anythingllm: image: mintplexlabs/anythingllm container_name: anythingllm ports: - "8412:3001" cap_add: - SYS_ADMIN environment: # Adjust for your environment - STORAGE_DIR=/app/server/storage - JWT_SECRET=EjWpuQGHks069xQxT445loTnJSzQxDQAzzgbo4sYkT8= - LLM_PROVIDER=ollama - OLLAMA_BASE_PATH=http://192.168.1.31:11434 - OLLAMA_MODEL_PREF=gemma3:12b - OLLAMA_MODEL_TOKEN_LIMIT=8192 - EMBEDDING_ENGINE=ollama - EMBEDDING_BASE_PATH=http://192.168.1.31:11434 - EMBEDDING_MODEL_PREF=nomic-embed-text:latest # - EMBEDDING_MODEL_MAX_CHUNK_LENGTH=8192 - VECTOR_DB=lancedb - WHISPER_PROVIDER=local - TTS_PROVIDER=native - PASSWORDMINCHAR=8 # Add any other keys here for services or settings # you can find in the docker/.env.example file volumes: - anythingllm_storage:/app/server/storage restart: always volumes: anythingllm_storage: driver: local driver_opts: type: none o: bind device: /mnt/docker-nfs/anythingllm/data ollama under http://192.168.1.31:11434 is working fine and can be reached. sudo docker compose up -d and then sudo docker compose logs gives me: > anythingllm | [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data. anythingllm | [backend] info: [TokenManager] Initialized new TokenManager instance for model: gpt-3.5-turbo anythingllm | [backend] info: [TokenManager] Returning existing instance for model: gpt-3.5-turbo anythingllm | [backend] info: [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM. anythingllm | [backend] info: prisma:info Starting a sqlite pool with 9 connections. anythingllm | [backend] info: [TELEMETRY SENT] {"event":"server_boot","distinctId":"52992428-e88f-4fdc-b8fd-72d8d5d9d2f7","properties":{"commit":"--","runtime":"docker"}} anythingllm | [backend] info: [CommunicationKey] RSA key pair generated for signed payloads within AnythingLLM services. anythingllm | [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data. anythingllm | [backend] info: Primary server in HTTP mode listening on port 3001 anythingllm | [backend] info: [BackgroundWorkerService] Feature is not enabled and will not be started. The web interface works as expected but when I type a message and hit Enter I get: > Could not respond to message. An error occurred while streaming response. NetworkError when attempting to fetch resource. Could you please help me? ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-06-05 14:47:59 -04:00
yindo closed this issue 2026-06-05 14:47:59 -04:00
Author
Owner

@timothycarambat commented on GitHub (Jul 31, 2025):

ollama under http://192.168.1.31:11434/ is working fine and can be reached.

This is because you are accessing this LAN IP from the host machine, the docker container network cannot access the LAN via direct IP since the container if not on LAN. host.docker.internal is how you would normally reach the host network layer.

There is a whole doc about this already: https://docs.anythingllm.com/ollama-connection-troubleshooting

If the docker remote container and ollama are on the same machine - just use http://host.docker.internal:11434 as the base.

If both machines are deployed on the same LAN - you need to add a host-gateway bridge to that compose so the container can resolve LAN IPs.

And the most unlikely case, you are hosting docker remotely outside your LAN (on AWS for example) and want it to use your Ollama instance running on LAN - well for that you will need to tunnel ollama with something like ngrok so the server can reach into your network externally. This is unsafe and not recommended.

TLDR; Its networking, its always networking!

<!-- gh-comment-id:3140661871 --> @timothycarambat commented on GitHub (Jul 31, 2025): > ollama under http://192.168.1.31:11434/ is working fine and can be reached. This is because you are accessing this LAN IP from the host machine, the docker container network cannot access the LAN via direct IP since the container if not on LAN. `host.docker.internal` is how you would normally reach the host network layer. There is a whole doc about this already: https://docs.anythingllm.com/ollama-connection-troubleshooting If the docker remote container and ollama are on the same _machine_ - just use `http://host.docker.internal:11434` as the base. If both machines are deployed on the same LAN - you need to add a host-gateway bridge to that compose so the container can resolve LAN IPs. And the most unlikely case, you are hosting docker remotely outside your LAN (on AWS for example) and want it to use your Ollama instance running on LAN - well for that you will need to tunnel ollama with something like `ngrok` so the server can reach into your network externally. This is unsafe and not recommended. TLDR; Its networking, its always networking!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4886