0
elasticsearch接続を確立してインデックスを作成しようとしています。しかし、私は次のエラーを取得する:次のように最大再試行超過 - Elasticsearch
elasticsearch.exceptions.ConnectionError: ConnectionError(HTTPConnectionPool(host='localhost', port=9200): Max retries exceeded with url: /test-index (Caused by <class 'socket.error'>: [Errno 111] Connection refused)) caused by: MaxRetryError(HTTPConnectionPool(host='localhost', port=9200): Max retries exceeded with url: /test-index (Caused by <class 'socket.error'>: [Errno 111] Connection refused))
私のコードは次のとおりです。
self.es = Elasticsearch(hosts=[{"host": "http://192.168.0.5:9200", "port": 9200}], timeout=10)
self.es.indices.create(index='test-index', ignore=400)
でより多くの情報を見つけることができる非常に多くの@Yasin Bahtiyarありがとう –