"Hindsight inside Docker cannot connect to the Ollama instance on my Windows host machine." #1244
Unanswered
Zhouziheng3188
asked this question in
Q&A
Replies: 1 comment
-
|
Hey, that is 99% a docker issue and not hindsight. Check that both containers are on the same docker network and that your IP bindings match your actual network infrastructure. You can bind to 0.0.0.0 then it becomes accessible from any IP, but if the host is publicly accessible that would be a huge security issue. Accessing a container within a docker network is usually easier by container name rather than ip. e.g. if your ollama container is called ollama then ollama:11434 will do the job hth |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Title:Unable to connect to local Ollama model from Hindsight container on Windows Docker
Body: "After deploying Hindsight in a container, I've been unable to connect to my local model.
I've tried various IP configurations, but it keeps defaulting to or failing at http://localhost:11434, and changing the settings doesn't seem to help.
Here is what I've debugged so far:
I entered the container from the Windows terminal.
I successfully pinged the Ollama address from inside the container.
I also ran curl on the Ollama address from the container, and it was successful.
This confirms that the network connectivity between the container and the Windows host is working fine. Therefore, the issue likely lies within Hindsight's configuration itself.
I've hit a wall with my limited technical skills. Could someone please help me resolve this?"
Operating System: Windows Server
Python Version: 3.14
Container Runtime: Docker Desktop
AI Runtime: Ollama
Error Log:
2026-04-24 04:56:59,988 - INFO - hindsight_api.engine.providers.openai_compatible_llm - OpenAI-compatible client initialized: provider=ollama, model=qwen2.5, base_url=http://localhost:11434/v1
2026-04-24 04:57:00,000 - INFO - hindsight_api.engine.providers.openai_compatible_llm - OpenAI-compatible client initialized: provider=ollama, model=qwen2.5, base_url=http://localhost:11434/v1
2026-04-24 04:57:00,024 - INFO - hindsight_api.engine.providers.openai_compatible_llm - OpenAI-compatible client initialized: provider=ollama, model=qwen2.5, base_url=http://localhost:11434/v1
2026-04-24 04:57:00,037 - INFO - hindsight_api.engine.providers.openai_compatible_llm - OpenAI-compatible client initialized: provider=ollama, model=qwen2.5, base_url=http://localhost:11434/v1
2026-04-24 04:57:00,381 - INFO - hindsight_api.api.mcp - MCP servers created (stateless_http=False)
2026-04-24 04:57:00,761 - INFO - hindsight_api.api - HTTP REST API enabled
2026-04-24 04:57:00,761 - INFO - hindsight_api.api - MCP server enabled at /mcp/
uvloop available, will use for event loop
Starting Hindsight API...
Version: v0.5.3
4 Starting Hindsight API...
2026-04-24 13:22:04 Version: v0.5.3
2026-04-24 13:22:04 URL: http://0.0.0.0:8888
2026-04-24 13:22:04 Database: postgresql://:@192.168.1.15:5432/hindsight
2026-04-24 13:22:04 LLM: ollama / qwen2.5
2026-04-24 13:22:04 Embeddings: local
2026-04-24 13:22:04 Reranker: local
2026-04-24 13:22:04 Extensions: pgvector (vector) / native (text)
2026-04-24 13:22:04 MCP: enabled at /mcp
WARNING: pg0 data directory exists at /home/hindsight/.pg0 but no PG_VERSION found.
2026-04-24 12:48:40 This may indicate data corruption or an incomplete previous shutdown.
2026-04-24 12:48:40 If you see all migrations running from scratch after this, your data may have been lost.
2026-04-24 12:48:40 See: #675
2026-04-24 12:48:20 | return await anext(self.gen)
2026-04-24 12:48:20 | ^^^^^^^^^^^^^^^^^^^^^
2026-04-24 12:48:20 | File "/app/api/hindsight_api/api/http.py", line 2565, in lifespan
2026-04-24 12:48:20 | await memory.initialize()
2026-04-24 12:48:20 | File "/app/api/hindsight_api/engine/memory_engine.py", line 1766, in initialize
2026-04-24 12:48:20 | await asyncio.gather(*init_tasks)
2026-04-24 12:48:20 | File "/app/api/hindsight_api/engine/memory_engine.py", line 1714, in verify_llm
2026-04-24 12:48:20 | await self._llm_config.verify_connection()
2026-04-24 12:48:20 | File "/app/api/hindsight_api/engine/llm_wrapper.py", line 499, in verify_connection
2026-04-24 12:48:20 | await self._provider_impl.verify_connection()
2026-04-24 12:48:20 | File "/app/api/hindsight_api/engine/providers/openai_compatible_llm.py", line 204, in verify_connection
2026-04-24 12:48:20 | raise RuntimeError(f"Connection verification failed for {self.provider}/{self.model}: {e}") from e
2026-04-24 12:48:20 | RuntimeError: Connection verification failed for ollama/qwen2.5:1.5b: Connection error.
Beta Was this translation helpful? Give feedback.
All reactions