dify icon indicating copy to clipboard operation
dify copied to clipboard

Vector database connection failure

Open miaoxiannv opened this issue 9 months ago • 8 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

v1.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Because weaivate could not connect to the host IP when I used it, I changed the network connection mode of this container to host. After this modification, I no longer restarted, but the vector database still failed to connect

✔️ Expected Behavior

After uploading the file, the vector database connection is successful

❌ Actual Behavior

Although weaivate no longer keeps restarting, the vector database still cannot connect

miaoxiannv avatar Mar 10 '25 15:03 miaoxiannv

Image

Image

miaoxiannv avatar Mar 10 '25 15:03 miaoxiannv

I found some similar threads that might help you resolve the vector database connection failure:

  1. Open Issue: Vector database connection error suggests ensuring that your configuration settings for the vector database are correct. Check environment variables like VECTOR_STORE, WEAVIATE_ENDPOINT, etc., and ensure Docker network settings allow communication between Dify and the vector database [1].

  2. Open Issue: qdrant connection issue recommends checking environment variables, network configuration, and Docker Compose settings to ensure proper connectivity [2].

  3. Closed Issue: failed to init dify plugin db suggests checking Docker network configuration, restarting Docker services, and verifying database container status [3].

For your specific issue, ensure that the Weaviate service is started using Docker Compose, as it is not started by default. The error message 'Failed to resolve 'weaviate'' indicates that the Weaviate service is not running. Starting the Weaviate service should resolve the connection error [4].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 10 '25 16:03 dosubot[bot]

I found some similar threads that might help you resolve the vector database connection failure:

  1. Open Issue: Vector database connection error suggests ensuring that your configuration settings for the vector database are correct. Check environment variables like VECTOR_STORE, WEAVIATE_ENDPOINT, etc., and ensure Docker network settings allow communication between Dify and the vector database [1].
  2. Open Issue: qdrant connection issue recommends checking environment variables, network configuration, and Docker Compose settings to ensure proper connectivity [2].
  3. Closed Issue: failed to init dify plugin db suggests checking Docker network configuration, restarting Docker services, and verifying database container status [3].

For your specific issue, ensure that the Weaviate service is started using Docker Compose, as it is not started by default. The error message 'Failed to resolve 'weaviate'' indicates that the Weaviate service is not running. Starting the Weaviate service should resolve the connection error [4].

To continue talking to Dosu, mention @dosu.

Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

I got this error once I set weaivate to host, docker-worker-1. I tried without host mode, but found that I couldn't start weaivate properly without host

miaoxiannv avatar Mar 10 '25 18:03 miaoxiannv

@dosubot

miaoxiannv avatar Mar 10 '25 18:03 miaoxiannv

To resolve the vector database connection issue with Weaviate, ensure the following:

  1. Configuration Settings: Verify that your environment variables are correctly set. For Weaviate, ensure VECTOR_STORE is set to 'weaviate', and WEAVIATE_ENDPOINT points to the correct URL, such as 'http://localhost:8080'. Also, check WEAVIATE_API_KEY and other related settings [1].

  2. Docker Network Configuration: Ensure that the Docker network settings allow proper communication between Dify and Weaviate. If using host mode resolves the issue, it might indicate network configuration problems. Check that the Docker Compose setup does not impose port restrictions that could affect connectivity [2].

  3. Starting Weaviate: Make sure the Weaviate service is started using Docker Compose with the correct profile. Follow these steps:

    • Navigate to the docker directory.
    • Copy the example environment file: cp middleware.env.example middleware.env.
    • Start the Docker Compose stack with the Weaviate profile: docker compose -f docker-compose.middleware.yaml --profile weaviate -p dify up -d [3].

These steps should help resolve the connection issues. If the problem persists, double-check the Docker network settings and ensure all services are correctly configured and running.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 10 '25 18:03 dosubot[bot]

It is my logs docker logs docker-worker-1 Running migrations 2025-03-10 18:52:40.176 INFO [MainThread] [utils.py:146] - Note: detected 80 virtual cores but NumExpr set to maximum of 64, check "NUMEXPR_MAX_THREADS" environment variable. 2025-03-10 18:52:40.176 INFO [MainThread] [utils.py:149] - Note: NumExpr detected 80 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 16. 2025-03-10 18:52:40.176 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 16 threads. /app/api/.venv/lib/python3.12/site-packages/opik/evaluation/metrics/heuristics/regex_match.py:8: SyntaxWarning: invalid escape sequence '\d' """ Preparing database migration... Starting database migration. INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. Database migration successful! 2025-03-10 18:53:15.192 INFO [MainThread] [utils.py:146] - Note: detected 80 virtual cores but NumExpr set to maximum of 64, check "NUMEXPR_MAX_THREADS" environment variable. 2025-03-10 18:53:15.192 INFO [MainThread] [utils.py:149] - Note: NumExpr detected 80 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 16. 2025-03-10 18:53:15.192 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 16 threads. /app/api/.venv/lib/python3.12/site-packages/celery/platforms.py:829: SecurityWarning: You're running the worker with superuser privileges: this is absolutely not recommended!

Please specify a different user using the --uid option.

User information: uid=0 euid=0 gid=0 egid=0

warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(

-------------- celery@c8a90642aa41 v5.4.0 (opalescent) --- ***** ----- -- ******* ---- Linux-5.15.0-130-generic-x86_64-with-glibc2.36 2025-03-10 18:53:40

  • *** --- * ---
  • ** ---------- [config]
  • ** ---------- .> app: app_factory:0x7fbdd01ddaf0
  • ** ---------- .> transport: redis://:**@redis:6379/1
  • ** ---------- .> results: postgresql://postgres:**@db:5432/dify
  • *** --- * --- .> concurrency: 1 (gevent) -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> app_deletion exchange=app_deletion(direct) key=app_deletion .> dataset exchange=dataset(direct) key=dataset .> mail exchange=mail(direct) key=mail .> ops_trace exchange=ops_trace(direct) key=ops_trace

[tasks] . schedule.clean_embedding_cache_task.clean_embedding_cache_task . schedule.clean_messages.clean_messages . schedule.clean_unused_datasets_task.clean_unused_datasets_task . schedule.create_tidb_serverless_task.create_tidb_serverless_task . schedule.mail_clean_document_notify_task.send_document_clean_notify_task . schedule.update_tidb_serverless_status_task.update_tidb_serverless_status_task . tasks.add_document_to_index_task.add_document_to_index_task . tasks.annotation.add_annotation_to_index_task.add_annotation_to_index_task . tasks.annotation.batch_import_annotations_task.batch_import_annotations_task . tasks.annotation.delete_annotation_index_task.delete_annotation_index_task . tasks.annotation.disable_annotation_reply_task.disable_annotation_reply_task . tasks.annotation.enable_annotation_reply_task.enable_annotation_reply_task . tasks.annotation.update_annotation_to_index_task.update_annotation_to_index_task . tasks.batch_clean_document_task.batch_clean_document_task . tasks.batch_create_segment_to_index_task.batch_create_segment_to_index_task . tasks.clean_dataset_task.clean_dataset_task . tasks.clean_document_task.clean_document_task . tasks.clean_notion_document_task.clean_notion_document_task . tasks.deal_dataset_vector_index_task.deal_dataset_vector_index_task . tasks.delete_account_task.delete_account_task . tasks.delete_segment_from_index_task.delete_segment_from_index_task . tasks.disable_segment_from_index_task.disable_segment_from_index_task . tasks.disable_segments_from_index_task.disable_segments_from_index_task . tasks.document_indexing_sync_task.document_indexing_sync_task . tasks.document_indexing_task.document_indexing_task . tasks.document_indexing_update_task.document_indexing_update_task . tasks.duplicate_document_indexing_task.duplicate_document_indexing_task . tasks.enable_segments_to_index_task.enable_segments_to_index_task . tasks.mail_account_deletion_task.send_account_deletion_verification_code . tasks.mail_account_deletion_task.send_deletion_success_task . tasks.mail_email_code_login.send_email_code_login_mail_task . tasks.mail_invite_member_task.send_invite_member_mail_task . tasks.mail_reset_password_task.send_reset_password_mail_task . tasks.ops_trace_task.process_trace_tasks . tasks.recover_document_indexing_task.recover_document_indexing_task . tasks.remove_app_and_related_data_task.remove_app_and_related_data_task . tasks.remove_document_from_index_task.remove_document_from_index_task . tasks.retry_document_indexing_task.retry_document_indexing_task . tasks.sync_website_document_indexing_task.sync_website_document_indexing_task

2025-03-10 18:53:40.580 INFO [MainThread] [connection.py:22] - Connected to redis://:@redis:6379/1 2025-03-10 18:53:40.584 INFO [MainThread] [mingle.py:40] - mingle: searching for neighbors 2025-03-10 18:53:41.595 INFO [MainThread] [mingle.py:49] - mingle: all alone 2025-03-10 18:53:41.609 INFO [Dummy-1] [pidbox.py:111] - pidbox: Connected to redis://:@redis:6379/1. 2025-03-10 18:53:41.615 INFO [MainThread] [worker.py:175] - celery@c8a90642aa41 ready. 2025-03-10 18:53:42.788 INFO [MainThread] [strategy.py:161] - Task tasks.duplicate_document_indexing_task.duplicate_document_indexing_task[c046498a-85c1-456f-9cda-4d7ff14dc3c3] received 2025-03-10 18:53:42.853 INFO [Dummy-2] [duplicate_document_indexing_task.py:60] - Start process document: 477d335e-8555-4955-83df-c3081b282219 2025-03-10 18:53:43.633 ERROR [Dummy-2] [trace.py:267] - Task tasks.duplicate_document_indexing_task.duplicate_document_indexing_task[c046498a-85c1-456f-9cda-4d7ff14dc3c3] raised unexpected: ConnectionError('Vector database connection error') Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/_socketcommon.py", line 221, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo return self.pool.apply(_socket.getaddrinfo, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/gevent/event.py", line 330, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 360, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 348, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 328, in gevent._gevent_cevent.AsyncResult._raise_exception File "/app/api/.venv/lib/python3.12/site-packages/gevent/_compat.py", line 50, in reraise raise value.with_traceback(tb) File "/app/api/.venv/lib/python3.12/site-packages/gevent/threadpool.py", line 173, in __run_task thread_result.set(func(*args, **kwargs)) ^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/local/lib/python3.12/http/client.py", line 1333, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1093, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1037, in send self.connect() File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7fbe80ca79b0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80ca79b0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 45, in _init_client client = weaviate.Client( ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/client.py", line 150, in init self._connection = Connection( ^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 654, in init self._server_version = self.get_meta()["version"] ^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 675, in get_meta response = self.get(path="/meta") ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 516, in get return self._session.get( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80ca79b0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/celery/app/trace.py", line 453, in trace_task R = retval = fun(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ File "/app/api/extensions/ext_celery.py", line 15, in call return self.run(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/tasks/duplicate_document_indexing_task.py", line 76, in duplicate_document_indexing_task index_processor.clean(dataset, index_node_ids, with_keywords=True, delete_child_chunks=True) File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 89, in clean vector = Vector(dataset) ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 35, in init self._vector_processor = self._init_vector() ^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 56, in _init_vector return vector_factory_cls().init_vector(self._dataset, self._attributes, self._embeddings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 277, in init_vector return WeaviateVector( ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 36, in init self._client = self._init_client(config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 49, in _init_client raise ConnectionError("Vector database connection error") ConnectionError: Vector database connection error 2025-03-10 18:53:59.401 INFO [MainThread] [strategy.py:161] - Task tasks.clean_dataset_task.clean_dataset_task[acfb4f91-3f73-4dc2-a6f7-b9a056cd5cb4] received 2025-03-10 18:53:59.402 INFO [Dummy-3] [clean_dataset_task.py:43] - Start clean dataset when dataset deleted: f62e7941-5207-41a7-80ab-35c4230f18a4 2025-03-10 18:53:59.410 INFO [Dummy-3] [clean_dataset_task.py:60] - Cleaning documents for dataset: f62e7941-5207-41a7-80ab-35c4230f18a4 2025-03-10 18:53:59.450 ERROR [Dummy-3] [clean_dataset_task.py:119] - Cleaned dataset when dataset deleted failed Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/_socketcommon.py", line 221, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo return self.pool.apply(_socket.getaddrinfo, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/gevent/event.py", line 330, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 360, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 348, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 328, in gevent._gevent_cevent.AsyncResult._raise_exception File "/app/api/.venv/lib/python3.12/site-packages/gevent/_compat.py", line 50, in reraise raise value.with_traceback(tb) File "/app/api/.venv/lib/python3.12/site-packages/gevent/threadpool.py", line 173, in __run_task thread_result.set(func(*args, **kwargs)) ^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/local/lib/python3.12/http/client.py", line 1333, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1093, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1037, in send self.connect() File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7fbe808149e0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe808149e0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 45, in _init_client client = weaviate.Client( ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/client.py", line 150, in init self._connection = Connection( ^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 654, in init self._server_version = self.get_meta()["version"] ^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 675, in get_meta response = self.get(path="/meta") ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 516, in get return self._session.get( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe808149e0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/tasks/clean_dataset_task.py", line 65, in clean_dataset_task index_processor.clean(dataset, None, with_keywords=True, delete_child_chunks=True) File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 89, in clean vector = Vector(dataset) ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 35, in init self._vector_processor = self._init_vector() ^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 56, in _init_vector return vector_factory_cls().init_vector(self._dataset, self._attributes, self._embeddings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 277, in init_vector return WeaviateVector( ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 36, in init self._client = self._init_client(config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 49, in _init_client raise ConnectionError("Vector database connection error") ConnectionError: Vector database connection error 2025-03-10 18:53:59.474 INFO [Dummy-3] [trace.py:128] - Task tasks.clean_dataset_task.clean_dataset_task[acfb4f91-3f73-4dc2-a6f7-b9a056cd5cb4] succeeded in 0.07224894687533379s: None 2025-03-10 18:54:04.261 INFO [MainThread] [strategy.py:161] - Task tasks.clean_dataset_task.clean_dataset_task[a50abfa6-298d-4033-8a23-219085dabe2e] received 2025-03-10 18:54:04.262 INFO [Dummy-4] [clean_dataset_task.py:43] - Start clean dataset when dataset deleted: bc3cd266-d04e-499a-a1d0-22ebffbd4721 2025-03-10 18:54:04.266 INFO [Dummy-4] [clean_dataset_task.py:60] - Cleaning documents for dataset: bc3cd266-d04e-499a-a1d0-22ebffbd4721 2025-03-10 18:54:04.301 ERROR [Dummy-4] [clean_dataset_task.py:119] - Cleaned dataset when dataset deleted failed Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/_socketcommon.py", line 221, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo return self.pool.apply(_socket.getaddrinfo, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/gevent/event.py", line 330, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 360, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 348, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 328, in gevent._gevent_cevent.AsyncResult._raise_exception File "/app/api/.venv/lib/python3.12/site-packages/gevent/_compat.py", line 50, in reraise raise value.with_traceback(tb) File "/app/api/.venv/lib/python3.12/site-packages/gevent/threadpool.py", line 173, in __run_task thread_result.set(func(*args, **kwargs)) ^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/local/lib/python3.12/http/client.py", line 1333, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1093, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1037, in send self.connect() File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7fbe80cc1c40>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80cc1c40>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 45, in _init_client client = weaviate.Client( ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/client.py", line 150, in init self._connection = Connection( ^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 654, in init self._server_version = self.get_meta()["version"] ^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 675, in get_meta response = self.get(path="/meta") ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 516, in get return self._session.get( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80cc1c40>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/tasks/clean_dataset_task.py", line 65, in clean_dataset_task index_processor.clean(dataset, None, with_keywords=True, delete_child_chunks=True) File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 89, in clean vector = Vector(dataset) ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 35, in init self._vector_processor = self._init_vector() ^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 56, in _init_vector return vector_factory_cls().init_vector(self._dataset, self._attributes, self._embeddings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 277, in init_vector return WeaviateVector( ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 36, in init self._client = self._init_client(config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 49, in _init_client raise ConnectionError("Vector database connection error") ConnectionError: Vector database connection error 2025-03-10 18:54:04.326 INFO [Dummy-4] [trace.py:128] - Task tasks.clean_dataset_task.clean_dataset_task[a50abfa6-298d-4033-8a23-219085dabe2e] succeeded in 0.06409004284068942s: None 2025-03-10 18:54:09.469 INFO [MainThread] [strategy.py:161] - Task tasks.clean_dataset_task.clean_dataset_task[0a1a12d0-20e7-4e46-bd8e-a44e7d0e5a35] received 2025-03-10 18:54:09.469 INFO [Dummy-5] [clean_dataset_task.py:43] - Start clean dataset when dataset deleted: ada47697-2769-41db-9e3d-bc059a13b23b 2025-03-10 18:54:09.474 INFO [Dummy-5] [clean_dataset_task.py:60] - Cleaning documents for dataset: ada47697-2769-41db-9e3d-bc059a13b23b 2025-03-10 18:54:09.509 ERROR [Dummy-5] [clean_dataset_task.py:119] - Cleaned dataset when dataset deleted failed Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/_socketcommon.py", line 221, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo return self.pool.apply(_socket.getaddrinfo, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/gevent/event.py", line 330, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 360, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 348, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 328, in gevent._gevent_cevent.AsyncResult._raise_exception File "/app/api/.venv/lib/python3.12/site-packages/gevent/_compat.py", line 50, in reraise raise value.with_traceback(tb) File "/app/api/.venv/lib/python3.12/site-packages/gevent/threadpool.py", line 173, in __run_task thread_result.set(func(*args, **kwargs)) ^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/local/lib/python3.12/http/client.py", line 1333, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1093, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1037, in send self.connect() File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7fbe80b0fbc0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80b0fbc0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 45, in _init_client client = weaviate.Client( ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/client.py", line 150, in init self._connection = Connection( ^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 654, in init self._server_version = self.get_meta()["version"] ^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 675, in get_meta response = self.get(path="/meta") ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 516, in get return self._session.get( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80b0fbc0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/tasks/clean_dataset_task.py", line 65, in clean_dataset_task index_processor.clean(dataset, None, with_keywords=True, delete_child_chunks=True) File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 89, in clean vector = Vector(dataset) ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 35, in init self._vector_processor = self._init_vector() ^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 56, in _init_vector return vector_factory_cls().init_vector(self._dataset, self._attributes, self._embeddings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 277, in init_vector return WeaviateVector( ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 36, in init self._client = self._init_client(config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 49, in _init_client raise ConnectionError("Vector database connection error") ConnectionError: Vector database connection error 2025-03-10 18:54:09.533 INFO [Dummy-5] [trace.py:128] - Task tasks.clean_dataset_task.clean_dataset_task[0a1a12d0-20e7-4e46-bd8e-a44e7d0e5a35] succeeded in 0.0639925878494978s: None 2025-03-10 18:54:13.320 INFO [MainThread] [strategy.py:161] - Task tasks.clean_dataset_task.clean_dataset_task[39b00637-f6e0-43af-b6ff-3cbcd411ae13] received 2025-03-10 18:54:13.321 INFO [Dummy-6] [clean_dataset_task.py:43] - Start clean dataset when dataset deleted: 3a8ece86-94de-45f4-81cf-5a09a0972155 2025-03-10 18:54:13.325 INFO [Dummy-6] [clean_dataset_task.py:60] - Cleaning documents for dataset: 3a8ece86-94de-45f4-81cf-5a09a0972155 2025-03-10 18:54:13.361 ERROR [Dummy-6] [clean_dataset_task.py:119] - Cleaned dataset when dataset deleted failed Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/_socketcommon.py", line 221, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo return self.pool.apply(_socket.getaddrinfo, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/gevent/event.py", line 330, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 360, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 348, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 328, in gevent._gevent_cevent.AsyncResult._raise_exception File "/app/api/.venv/lib/python3.12/site-packages/gevent/_compat.py", line 50, in reraise raise value.with_traceback(tb) File "/app/api/.venv/lib/python3.12/site-packages/gevent/threadpool.py", line 173, in __run_task thread_result.set(func(*args, **kwargs)) ^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/local/lib/python3.12/http/client.py", line 1333, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1093, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1037, in send self.connect() File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7fbe80b0f890>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80b0f890>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 45, in _init_client client = weaviate.Client( ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/client.py", line 150, in init self._connection = Connection( ^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 654, in init self._server_version = self.get_meta()["version"] ^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 675, in get_meta response = self.get(path="/meta") ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 516, in get return self._session.get( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80b0f890>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/tasks/clean_dataset_task.py", line 65, in clean_dataset_task index_processor.clean(dataset, None, with_keywords=True, delete_child_chunks=True) File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 89, in clean vector = Vector(dataset) ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 35, in init self._vector_processor = self._init_vector() ^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 56, in _init_vector return vector_factory_cls().init_vector(self._dataset, self._attributes, self._embeddings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 277, in init_vector return WeaviateVector( ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 36, in init self._client = self._init_client(config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 49, in _init_client raise ConnectionError("Vector database connection error") ConnectionError: Vector database connection error 2025-03-10 18:54:13.384 INFO [Dummy-6] [trace.py:128] - Task tasks.clean_dataset_task.clean_dataset_task[39b00637-f6e0-43af-b6ff-3cbcd411ae13] succeeded in 0.06380895897746086s: None 2025-03-10 18:56:33.227 INFO [MainThread] [strategy.py:161] - Task tasks.clean_dataset_task.clean_dataset_task[fda1babc-088b-42d6-944b-3d2227d68fe6] received 2025-03-10 18:56:33.228 INFO [Dummy-7] [clean_dataset_task.py:43] - Start clean dataset when dataset deleted: 205dc0f2-c9e7-41c3-afbc-7879f533ec9f 2025-03-10 18:56:33.232 INFO [Dummy-7] [clean_dataset_task.py:60] - Cleaning documents for dataset: 205dc0f2-c9e7-41c3-afbc-7879f533ec9f 2025-03-10 18:56:33.276 ERROR [Dummy-7] [clean_dataset_task.py:119] - Cleaned dataset when dataset deleted failed Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/_socketcommon.py", line 221, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo return self.pool.apply(_socket.getaddrinfo, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/gevent/event.py", line 330, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 360, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 348, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 328, in gevent._gevent_cevent.AsyncResult._raise_exception File "/app/api/.venv/lib/python3.12/site-packages/gevent/_compat.py", line 50, in reraise raise value.with_traceback(tb) File "/app/api/.venv/lib/python3.12/site-packages/gevent/threadpool.py", line 173, in __run_task thread_result.set(func(*args, **kwargs)) ^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/local/lib/python3.12/http/client.py", line 1333, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1093, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1037, in send self.connect() File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7fbe80b0dac0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80b0dac0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 45, in _init_client client = weaviate.Client( ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/client.py", line 150, in init self._connection = Connection( ^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 654, in init self._server_version = self.get_meta()["version"] ^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 675, in get_meta response = self.get(path="/meta") ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 516, in get return self._session.get( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe80b0dac0>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/tasks/clean_dataset_task.py", line 65, in clean_dataset_task index_processor.clean(dataset, None, with_keywords=True, delete_child_chunks=True) File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 89, in clean vector = Vector(dataset) ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 35, in init self._vector_processor = self._init_vector() ^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 56, in _init_vector return vector_factory_cls().init_vector(self._dataset, self._attributes, self._embeddings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 277, in init_vector return WeaviateVector( ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 36, in init self._client = self._init_client(config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 49, in _init_client raise ConnectionError("Vector database connection error") ConnectionError: Vector database connection error 2025-03-10 18:56:33.311 INFO [Dummy-7] [trace.py:128] - Task tasks.clean_dataset_task.clean_dataset_task[fda1babc-088b-42d6-944b-3d2227d68fe6] succeeded in 0.08380095614120364s: None 2025-03-10 18:56:49.737 INFO [MainThread] [strategy.py:161] - Task tasks.document_indexing_task.document_indexing_task[f309b664-624d-4b18-b2af-730c9877e3c7] received 2025-03-10 18:56:49.742 INFO [Dummy-8] [document_indexing_task.py:59] - Start process document: c3005dcb-6cd7-4f76-8757-7b59b9231d39 2025-03-10 18:56:52.513 WARNING [Thread-9 (process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/init.py:44: SyntaxWarning: invalid escape sequence '.' re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&.%-]+)", re.U)

2025-03-10 18:56:52.513 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/init.py:46: SyntaxWarning: invalid escape sequence '\s' re_skip_default = re.compile("(\r\n|\s)", re.U)

2025-03-10 18:56:52.520 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/init.py:78: SyntaxWarning: invalid escape sequence '.' re_skip = re.compile("([a-zA-Z0-9]+(?:.\d+)?%?)")

2025-03-10 18:56:52.634 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/_compat.py:18: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources

2025-03-10 18:56:52.671 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/pkg_resources/init.py:3142: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg)

2025-03-10 18:56:52.672 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/pkg_resources/init.py:3142: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google.cloud'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg)

2025-03-10 18:56:52.672 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/pkg_resources/init.py:2554: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(parent)

2025-03-10 18:56:52.687 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/pkg_resources/init.py:3142: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('zope'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg)

2025-03-10 18:56:53.023 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/init.py:16: SyntaxWarning: invalid escape sequence '.' re_skip_detail = re.compile("([.0-9]+|[a-zA-Z0-9]+)")

2025-03-10 18:56:53.023 WARNING [Thread-9 (process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/init.py:17: SyntaxWarning: invalid escape sequence '.' re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&.]+)")

2025-03-10 18:56:53.023 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/init.py:18: SyntaxWarning: invalid escape sequence '\s' re_skip_internal = re.compile("(\r\n|\s)")

2025-03-10 18:56:53.023 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/init.py:21: SyntaxWarning: invalid escape sequence '.' re_num = re.compile("[.0-9]+")

2025-03-10 18:56:54.751 WARNING [Thread-9 (_process_keyword_index)] [warnings.py:112] - /app/api/.venv/lib/python3.12/site-packages/jieba/analyse/tfidf.py:47: ResourceWarning: unclosed file <_io.BufferedReader name='/app/api/.venv/lib/python3.12/site-packages/jieba/analyse/idf.txt'> content = open(new_idf_path, 'rb').read().decode('utf-8')

2025-03-10 18:56:55.099 WARNING [Thread-9 (_process_keyword_index)] [log.py:232] - Building prefix dict from the default dictionary ... 2025-03-10 18:56:55.098 DEBUG [Thread-9 (_process_keyword_index)] [init.py:113] - Building prefix dict from the default dictionary ... 2025-03-10 18:56:56.042 WARNING [Thread-9 (_process_keyword_index)] [log.py:232] - Dumping model to file cache /tmp/jieba.cache 2025-03-10 18:56:56.041 DEBUG [Thread-9 (_process_keyword_index)] [init.py:146] - Dumping model to file cache /tmp/jieba.cache 2025-03-10 18:56:56.125 WARNING [Thread-9 (_process_keyword_index)] [log.py:232] - Loading model cost 1.026 seconds. 2025-03-10 18:56:56.125 DEBUG [Thread-9 (_process_keyword_index)] [init.py:164] - Loading model cost 1.026 seconds. 2025-03-10 18:56:56.125 WARNING [Thread-9 (_process_keyword_index)] [log.py:232] - Prefix dict has been built successfully. 2025-03-10 18:56:56.125 DEBUG [Thread-9 (_process_keyword_index)] [init.py:166] - Prefix dict has been built successfully. 2025-03-10 18:56:56.453 ERROR [Dummy-8] [indexing_runner.py:96] - consume document failed Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/_socketcommon.py", line 221, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo return self.pool.apply(_socket.getaddrinfo, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/gevent/pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/gevent/event.py", line 330, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 360, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 348, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 328, in gevent._gevent_cevent.AsyncResult._raise_exception File "/app/api/.venv/lib/python3.12/site-packages/gevent/_compat.py", line 50, in reraise raise value.with_traceback(tb) File "/app/api/.venv/lib/python3.12/site-packages/gevent/threadpool.py", line 173, in __run_task thread_result.set(func(*args, **kwargs)) ^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/local/lib/python3.12/http/client.py", line 1333, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1093, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1037, in send self.connect() File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7fbe5612c800>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe5612c800>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 45, in _init_client client = weaviate.Client( ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/client.py", line 150, in init self._connection = Connection( ^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 654, in init self._server_version = self.get_meta()["version"] ^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 675, in get_meta response = self.get(path="/meta") ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/weaviate/connect/connection.py", line 516, in get return self._session.get( ^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='weaviate', port=8080): Max retries exceeded with url: /v1/meta (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fbe5612c800>: Failed to resolve 'weaviate' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/core/indexing_runner.py", line 80, in run self._load( File "/app/api/core/indexing_runner.py", line 570, in _load tokens += future.result() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/indexing_runner.py", line 625, in _process_chunk index_processor.load(dataset, chunk_documents, with_keywords=False) File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 77, in load vector = Vector(dataset) ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 35, in init self._vector_processor = self._init_vector() ^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 56, in _init_vector return vector_factory_cls().init_vector(self._dataset, self._attributes, self._embeddings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 277, in init_vector return WeaviateVector( ^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 36, in init self._client = self._init_client(config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/datasource/vdb/weaviate/weaviate_vector.py", line 49, in _init_client raise ConnectionError("Vector database connection error") ConnectionError: Vector database connection error 2025-03-10 18:56:56.462 INFO [Dummy-8] [document_indexing_task.py:76] - Processed dataset: 4253402f-2610-4da1-aff3-02e5c04e442f latency: 6.723775469232351 2025-03-10 18:56:56.487 INFO [Dummy-8] [trace.py:128] - Task tasks.document_indexing_task.document_indexing_task[f309b664-624d-4b18-b2af-730c9877e3c7] succeeded in 6.748985664919019s: None

miaoxiannv avatar Mar 10 '25 19:03 miaoxiannv

@dosubot

miaoxiannv avatar Mar 10 '25 19:03 miaoxiannv

The "Temporary failure in name resolution" error indicates that the Weaviate service is not being resolved correctly within your Docker setup. Here are some steps to address this issue:

  1. Ensure Weaviate is Running: Make sure the Weaviate service is started using Docker Compose. It is not started by default, so you need to explicitly start it. Use the following command to start Weaviate with the correct profile:

    docker compose --profile weaviate up -d
    
  2. Check Docker Network Configuration: Verify that the Docker network settings allow communication between the Dify services and Weaviate. Ensure that the Weaviate service is on the same network as the other services that need to communicate with it. You can check and modify the network settings in your docker-compose.yaml file.

  3. DNS Configuration: If you are using a custom DNS or have specific network configurations, ensure that the DNS settings are correctly configured for Docker. You can specify DNS servers in the Docker daemon configuration or in the Docker Compose file.

  4. Environment Variables: Double-check the environment variables related to Weaviate in your configuration files. Ensure that WEAVIATE_ENDPOINT is set correctly, typically to something like http://weaviate:8080 if using Docker's internal DNS.

  5. Avoid Host Network Mode: Using host network mode can sometimes cause issues with service discovery in Docker. If possible, revert to using the default bridge network and ensure proper network configuration.

By following these steps, you should be able to resolve the name resolution error and establish a connection to the Weaviate vector database [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 10 '25 19:03 dosubot[bot]