[GH-ISSUE #5736] Rag broken in 0.3.30 - collection errors #29633

Closed
opened 2026-04-25 03:59:56 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @arsaboo on GitHub (Sep 26, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5736

Bug Report

Installation Method

Docker

Environment

  • Open WebUI Version: v0.3.30

  • Ollama (if applicable): 0.3.12

  • Operating System: Ubuntu

  • Browser (if applicable): Chrome

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Rag was working until recently. But now, it stopped working:
image

I keep seeing these two errors in the logs:

ERROR [open_webui.apps.rag.utils] Error when querying the collection: Collection 42d66e301b53a9859cb98ba3066dd30477bfc5ed6f97e2222bc7ec8e0920846 does not exist.
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/rag/utils.py", line 191, in query_collection
    result = query_doc(
             ^^^^^^^^^^
  File "/app/backend/open_webui/apps/rag/utils.py", line 85, in query_doc
    raise e
  File "/app/backend/open_webui/apps/rag/utils.py", line 73, in query_doc
    result = VECTOR_DB_CLIENT.search(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/rag/vector/dbs/chroma.py", line 52, in search
    collection = self.client.get_collection(name=collection_name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 142, in get_collection
    model = self._server.get_collection(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/chromadb/telemetry/opentelemetry/__init__.py", line 146, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/chromadb/api/fastapi.py", line 226, in get_collection
    resp_json = self._make_request(
                ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/chromadb/api/fastapi.py", line 87, in _make_request
    BaseHTTPClient._raise_chroma_error(response)
  File "/usr/local/lib/python3.11/site-packages/chromadb/api/base_http_client.py", line 92, in _raise_chroma_error
    raise chroma_error
chromadb.errors.InvalidCollectionException: Collection 42d66e301b53a9859cb98ba3066dd30477bfc5ed6f97e2222bc7ec8e0920846 does not exist.
INFO  [open_webui.apps.ollama.main] url: http://host.docker.internal:11434
Collection 42d66e301b53a9859cb98ba3066dd30477bfc5ed6f97e2222bc7ec8e0920846 does not exist.
ERROR [open_webui.apps.rag.utils] Error when querying the collection: Collection.__init__() got an unexpected keyword argument 'log_position'
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/rag/utils.py", line 191, in query_collection
    result = query_doc(
             ^^^^^^^^^^
  File "/app/backend/open_webui/apps/rag/utils.py", line 85, in query_doc
    raise e
  File "/app/backend/open_webui/apps/rag/utils.py", line 73, in query_doc
    result = VECTOR_DB_CLIENT.search(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/rag/vector/dbs/chroma.py", line 52, in search
    collection = self.client.get_collection(name=collection_name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 142, in get_collection
    model = self._server.get_collection(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/chromadb/telemetry/opentelemetry/__init__.py", line 146, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/chromadb/api/fastapi.py", line 232, in get_collection
    model = CollectionModel.from_json(resp_json)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/chromadb/types.py", line 143, in from_json
    return cls(configuration=configuration, **params_map)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Collection.__init__() got an unexpected keyword argument 'log_position'
INFO  [open_webui.apps.ollama.main] url: http://host.docker.internal:11434
Collection.__init__() got an unexpected keyword argument 'log_position'

Happy to provide any additional details.

Originally created by @arsaboo on GitHub (Sep 26, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5736 # Bug Report ## Installation Method Docker ## Environment - **Open WebUI Version:** v0.3.30 - **Ollama (if applicable):** 0.3.12 - **Operating System:** Ubuntu - **Browser (if applicable):** Chrome **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. Rag was working until recently. But now, it stopped working: ![image](https://github.com/user-attachments/assets/973b0107-33c7-480c-a178-3198b5780da0) I keep seeing these two errors in the logs: ```bash ERROR [open_webui.apps.rag.utils] Error when querying the collection: Collection 42d66e301b53a9859cb98ba3066dd30477bfc5ed6f97e2222bc7ec8e0920846 does not exist. Traceback (most recent call last): File "/app/backend/open_webui/apps/rag/utils.py", line 191, in query_collection result = query_doc( ^^^^^^^^^^ File "/app/backend/open_webui/apps/rag/utils.py", line 85, in query_doc raise e File "/app/backend/open_webui/apps/rag/utils.py", line 73, in query_doc result = VECTOR_DB_CLIENT.search( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/rag/vector/dbs/chroma.py", line 52, in search collection = self.client.get_collection(name=collection_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 142, in get_collection model = self._server.get_collection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/telemetry/opentelemetry/__init__.py", line 146, in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/api/fastapi.py", line 226, in get_collection resp_json = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/api/fastapi.py", line 87, in _make_request BaseHTTPClient._raise_chroma_error(response) File "/usr/local/lib/python3.11/site-packages/chromadb/api/base_http_client.py", line 92, in _raise_chroma_error raise chroma_error chromadb.errors.InvalidCollectionException: Collection 42d66e301b53a9859cb98ba3066dd30477bfc5ed6f97e2222bc7ec8e0920846 does not exist. INFO [open_webui.apps.ollama.main] url: http://host.docker.internal:11434 Collection 42d66e301b53a9859cb98ba3066dd30477bfc5ed6f97e2222bc7ec8e0920846 does not exist. ``` ```bash ERROR [open_webui.apps.rag.utils] Error when querying the collection: Collection.__init__() got an unexpected keyword argument 'log_position' Traceback (most recent call last): File "/app/backend/open_webui/apps/rag/utils.py", line 191, in query_collection result = query_doc( ^^^^^^^^^^ File "/app/backend/open_webui/apps/rag/utils.py", line 85, in query_doc raise e File "/app/backend/open_webui/apps/rag/utils.py", line 73, in query_doc result = VECTOR_DB_CLIENT.search( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/rag/vector/dbs/chroma.py", line 52, in search collection = self.client.get_collection(name=collection_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 142, in get_collection model = self._server.get_collection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/telemetry/opentelemetry/__init__.py", line 146, in wrapper return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/api/fastapi.py", line 232, in get_collection model = CollectionModel.from_json(resp_json) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/types.py", line 143, in from_json return cls(configuration=configuration, **params_map) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Collection.__init__() got an unexpected keyword argument 'log_position' INFO [open_webui.apps.ollama.main] url: http://host.docker.internal:11434 Collection.__init__() got an unexpected keyword argument 'log_position' ``` Happy to provide any additional details.
Author
Owner

@arsaboo commented on GitHub (Sep 26, 2024):

RAG works fine if I remove chromaDB

<!-- gh-comment-id:2377186334 --> @arsaboo commented on GitHub (Sep 26, 2024): RAG works fine if I remove chromaDB
Author
Owner

@mbelur commented on GitHub (Sep 26, 2024):

I see the same with milvus db as well.

ERROR [open_webui.apps.rag.utils] Error when querying the collection: <MilvusException: (code=101, message=failed to search: collection not loaded[collection=452817282104588693])>
Traceback (most recent call last):
File "/app/backend/open_webui/apps/rag/utils.py", line 191, in query_collection
result = query_doc(
^^^^^^^^^^
File "/app/backend/open_webui/apps/rag/utils.py", line 85, in query_doc
raise e
File "/app/backend/open_webui/apps/rag/utils.py", line 73, in query_doc
result = VECTOR_DB_CLIENT.search(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/rag/vector/dbs/milvus.py", line 130, in search
result = self.client.search(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 336, in search
raise ex from ex
File "/usr/local/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 322, in search
res = conn.search(
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 148, in handler
raise e from e
File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 144, in handler
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 183, in handler
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 123, in handler
raise e from e
File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 87, in handler
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 800, in search
return self._execute_search(request, timeout, round_decimal=round_decimal, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 741, in _execute_search
raise e from e
File "/usr/local/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 734, in _execute_search
check_status(response.status)
File "/usr/local/lib/python3.11/site-packages/pymilvus/client/utils.py", line 63, in check_status
raise MilvusException(status.code, status.reason, status.error_code)
pymilvus.exceptions.MilvusException: <MilvusException: (code=101, message=failed to search: collection not loaded[collection=452817282104588693])>

<!-- gh-comment-id:2377491892 --> @mbelur commented on GitHub (Sep 26, 2024): I see the same with milvus db as well. > ERROR [open_webui.apps.rag.utils] Error when querying the collection: <MilvusException: (code=101, message=failed to search: collection not loaded[collection=452817282104588693])> Traceback (most recent call last): File "/app/backend/open_webui/apps/rag/utils.py", line 191, in query_collection result = query_doc( ^^^^^^^^^^ File "/app/backend/open_webui/apps/rag/utils.py", line 85, in query_doc raise e File "/app/backend/open_webui/apps/rag/utils.py", line 73, in query_doc result = VECTOR_DB_CLIENT.search( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/rag/vector/dbs/milvus.py", line 130, in search result = self.client.search( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 336, in search raise ex from ex File "/usr/local/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 322, in search res = conn.search( ^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 148, in handler raise e from e File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 144, in handler return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 183, in handler return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 123, in handler raise e from e File "/usr/local/lib/python3.11/site-packages/pymilvus/decorators.py", line 87, in handler return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 800, in search return self._execute_search(request, timeout, round_decimal=round_decimal, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 741, in _execute_search raise e from e File "/usr/local/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 734, in _execute_search check_status(response.status) File "/usr/local/lib/python3.11/site-packages/pymilvus/client/utils.py", line 63, in check_status raise MilvusException(status.code, status.reason, status.error_code) pymilvus.exceptions.MilvusException: <MilvusException: (code=101, message=failed to search: collection not loaded[collection=452817282104588693])>
Author
Owner

@arsaboo commented on GitHub (Sep 26, 2024):

@mbelur well, that is good. At least the error is reproducible. Hopefully, someone can get to it.

<!-- gh-comment-id:2377568195 --> @arsaboo commented on GitHub (Sep 26, 2024): @mbelur well, that is good. At least the error is reproducible. Hopefully, someone can get to it.
Author
Owner

@bgeneto commented on GitHub (Sep 26, 2024):

RAG works fine for me in dev branch, better yet after #5728 :-)

<!-- gh-comment-id:2377569571 --> @bgeneto commented on GitHub (Sep 26, 2024): RAG works fine for me in dev branch, better yet after #5728 :-)
Author
Owner

@arsaboo commented on GitHub (Sep 26, 2024):

@bgeneto are you using any of the external DBs?

<!-- gh-comment-id:2377589568 --> @arsaboo commented on GitHub (Sep 26, 2024): @bgeneto are you using any of the external DBs?
Author
Owner

@bgeneto commented on GitHub (Sep 26, 2024):

@bgeneto are you using any of the external DBs?

I prefer using Chroma DB, but tested with Chroma, Milvus, Ollama, and the built-in sentence transformer. Best results for me so far was with jina-embeddings-v3 + mxbai-rerank-xsmall-v1 reranker. Ollama with mxbai-emded-large:latest + cross-encoder/ms-marco-MiniLM-L-6-v2. I can't run a stronger reranker.

<!-- gh-comment-id:2377615841 --> @bgeneto commented on GitHub (Sep 26, 2024): > @bgeneto are you using any of the external DBs? I prefer using Chroma DB, but tested with Chroma, Milvus, Ollama, and the built-in sentence transformer. Best results for me so far was with `jina-embeddings-v3` + `mxbai-rerank-xsmall-v1` reranker. Ollama with `mxbai-emded-large:latest` + `cross-encoder/ms-marco-MiniLM-L-6-v2`. I can't run a stronger reranker.
Author
Owner

@tjbck commented on GitHub (Sep 26, 2024):

@mbelur milvus issue is not related to this issue #5622

<!-- gh-comment-id:2377910622 --> @tjbck commented on GitHub (Sep 26, 2024): @mbelur milvus issue is not related to this issue #5622
Author
Owner

@tjbck commented on GitHub (Sep 26, 2024):

In case someone comes across this in the future, this issue is most likely caused by a version mismatch between an external chromadb and internal open-webui chromadb package version, I was able to reproduce the issue with the latest chromadb image with the current main. After the version bump in the latest dev, I'm no longer able to reproduce the issue.

<!-- gh-comment-id:2377913984 --> @tjbck commented on GitHub (Sep 26, 2024): In case someone comes across this in the future, this issue is most likely caused by a version mismatch between an external chromadb and internal open-webui chromadb package version, I was able to reproduce the issue with the latest chromadb image with the current main. After the version bump in the latest dev, I'm no longer able to reproduce the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#29633