LightRAG Upload Fails with "NanoVectorDBStorage[entities] index flush failed: 404 page not found" #3342
|
Hi everyone, When uploading a .docx file in LightRAG, parsing and analysis complete successfully, but the process fails during the entity index flush stage. This suggests the document is parsed and processed correctly, but LightRAG fails when flushing the entities index to the configured vector storage backend. The error looks like an incorrect vector DB endpoint, an unsupported API path, or a backend configuration mismatch. |
Replies: 3 comments 3 replies
|
A 404 error during vector db index flush typically indicates an issue with accessing the embedded model, which can be diagnosed by reviewing backend logs. This error is usually caused by an incorrect model URL—for example, the URL may require the inclusion or removal of the 'v1' path, such as https://api.openai.com/v1 or https://api.myapi.com. |
|
Kindly provide the backend server logs for further analysis. Ollama's default port is 11434. Pls make sure 12434 is the correct one. |
|
Thanks for the backend log — it makes the root cause clear. This is a configuration issue, not a bug in NanoVectorDBStorage. The NanoVectorDBStorage[entities] index flush failed error is only a downstream symptom: the flush has to embed the vectors, and the embedding call itself is returning 404 page not found. Root causeYou're pointing the Ollama binding at Docker Model Runner (DMR), but DMR is not Ollama. DMR only exposes an OpenAI-compatible API; it does not implement Ollama's native endpoints. From your config: EMBEDDING_BINDING=ollama
EMBEDDING_BINDING_HOST=host.docker.internal:12434
Why extraction "worked" but embedding failed This is misleading — the LLM binding is misconfigured the same way. Your run was a rebuild/resume, and entity extraction was served from llm_response_cache (the log loads llm_response_cache with 4 records), so no live LLM request was made. Embeddings can't be cached, so the embedding call is the first one to actually hit DMR and expose the 404. Once the LLM cache misses, LLM_BINDING=ollama on port 12434 will 404 too. FixConfigure DMR as an OpenAI-compatible endpoint, not Ollama: # Embedding
EMBEDDING_BINDING=openai
EMBEDDING_BINDING_HOST=http://host.docker.internal:12434/engines/v1
EMBEDDING_BINDING_API_KEY=anything # DMR ignores it, but it can't be empty
EMBEDDING_MODEL=ai/nomic-embed-text # use DMR's actual model name
# LLM (same fix)
LLM_BINDING=openai
LLM_BINDING_HOST=http://host.docker.internal:12434/engines/v1
LLM_BINDING_API_KEY=anything
LLM_MODEL=ai/llama3.2Notes:
One more thing (not the 404, but it'll bite you next) EMBEDDING_DIM=3072 is wrong for nomic-embed-text-v1.5 — that model outputs 768 dimensions. After fixing the binding, set the correct EMBEDDING_DIM. Since embedding settings must not change after the first document is processed, clear your rag_storage and re-ingest. Alternatively, if you'd rather keep the ollama binding, run a real Ollama server on port 11434 and point at that instead of DMR. |

Thanks for the backend log — it makes the root cause clear. This is a configuration issue, not a bug in NanoVectorDBStorage. The NanoVectorDBStorage[entities] index flush failed error is only a downstream symptom: the flush has to embed the vectors, and the embedding call itself is returning 404 page not found.
Root cause
You're pointing the Ollama binding at Docker Model Runner (DMR), but DMR is not Ollama. DMR only exposes an OpenAI-compatible API; it does not implement Ollama's native endpoints.
From your config: