infiniflow/ragflow

[Question]: elastic_transport.ConnectionError

Opened this issue · 1 comments

wrl02 commented

Describe your problem

when Retrieval testing

Traceback (most recent call last):
File "/ragflow/rag/utils/es_conn.py", line 198, in search
res = self.es.search(index=indexNames,
File "/ragflow/.venv/lib/python3.10/site-packages/elasticsearch/_sync/client/utils.py", line 446, in wrapped
return api(*args, **kwargs)
File "/ragflow/.venv/lib/python3.10/site-packages/elasticsearch/_sync/client/init.py", line 3836, in search
return self.perform_request( # type: ignore[return-value]
File "/ragflow/.venv/lib/python3.10/site-packages/elasticsearch/_sync/client/_base.py", line 285, in perform_request
meta, resp_body = self.transport.perform_request(
File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
meta, raw_data = node.perform_request(
File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
raise err from None
elastic_transport.ConnectionError: Connection error caused by: ConnectionError(Connection error caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7fd228f3f310>: Failed to establish a new connection: [Errno 111] Connection refused))
2024-12-05 22:51:33,717 ERROR 873 Connection error caused by: ConnectionError(Connection error caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7fd228f3f310>: Failed to establish a new connection: [Errno 111] Connection refused))
Traceback (most recent call last):
File "/ragflow/api/apps/chunk_app.py", line 302, in retrieval_test
ranks = retr.retrieval(question, embd_mdl, tenant_ids, kb_ids, page, size,
File "/ragflow/rag/nlp/search.py", line 310, in retrieval
sres = self.search(req, [index_name(tid) for tid in tenant_ids], kb_ids, embd_mdl, highlight)
File "/ragflow/rag/nlp/search.py", line 105, in search
res = self.dataStore.search(src, highlightFields, filters, matchExprs, orderBy, offset, limit, idx_names, kb_ids)
File "/ragflow/rag/utils/es_conn.py", line 212, in search
raise e
File "/ragflow/rag/utils/es_conn.py", line 198, in search
res = self.es.search(index=indexNames,
File "/ragflow/.venv/lib/python3.10/site-packages/elasticsearch/_sync/client/utils.py", line 446, in wrapped
return api(*args, **kwargs)
File "/ragflow/.venv/lib/python3.10/site-packages/elasticsearch/_sync/client/init.py", line 3836, in search
return self.perform_request( # type: ignore[return-value]
File "/ragflow/.venv/lib/python3.10/site-packages/elasticsearch/_sync/client/_base.py", line 285, in perform_request
meta, resp_body = self.transport.perform_request(
File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_transport.py", line 328, in perform_request
meta, raw_data = node.perform_request(
File "/ragflow/.venv/lib/python3.10/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
raise err from None
elastic_transport.ConnectionError: Connection error caused by: ConnectionError(Connection error caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7fd228f3f310>: Failed to establish a new connection: [Errno 111] Connection refused))
2024-12-05 22:51:33,719 INFO 873 172.18.0.6 - - [05/Dec/2024 22:51:33] "POST /v1/chunk/retrieval_test HTTP/1.1" 200 -
./entrypoint.sh: line 35: 873 Killed $PY api/ragflow_server.py

Make sure the health status of ES, and host address of ES is reachable in conf/service_conf.ymal.