PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.11k stars 2.94k forks source link

[Question]: elasticsearch.exceptions.ConnectionTimeout #5364

Closed halenfly closed 1 year ago

halenfly commented 1 year ago

请提出你的问题

在执行以下命令时提示连接超时,但是es运行成功的。

以DuReader-Robust 数据集为例建立 ANN 索引库

python utils/offline_ann.py --index_name dureader_robust_query_encoder \ --doc_dir data/dureader_dev \ --search_engine elastic \ --embed_title True \ --delete_index

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "I:\ODOO\Envs\spacy\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 245, in perform_request response = self.pool.urlopen( File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\connectionpool.py", line 726, in urlopen retries = retries.increment( File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\util\retry.py", line 386, in increment raise six.reraise(type(error), error, _stacktrace) File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\packages\six.py", line 735, in reraise raise value File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\connectionpool.py", line 428, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\connectionpool.py", line 335, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='127.0.0.1', port='9200'): Read timed out. (read timeout=30) image

w5688414 commented 1 year ago

请提出你的问题

在执行以下命令时提示连接超时,但是es运行成功的。

以DuReader-Robust 数据集为例建立 ANN 索引库

python utils/offline_ann.py --index_name dureader_robust_query_encoder --doc_dir data/dureader_dev --search_engine elastic --embed_title True --delete_index

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "I:\ODOO\Envs\spacy\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 245, in perform_request response = self.pool.urlopen( File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\connectionpool.py", line 726, in urlopen retries = retries.increment( File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\util\retry.py", line 386, in increment raise six.reraise(type(error), error, _stacktrace) File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\packages\six.py", line 735, in reraise raise value File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\connectionpool.py", line 428, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "I:\ODOO\Envs\spacy\lib\site-packages\urllib3\connectionpool.py", line 335, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='127.0.0.1', port='9200'): Read timed out. (read timeout=30) image

是加了什么代理吗?可以把代理关掉再试试,另外windows稍稍有点复杂,会有出现不通的情况,需要多试几次

halenfly commented 1 year ago

换了一个电脑安装es,可以了。