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 Бахтияр –